drush_pet
This project provides a developer-friendly way to extract translation strings from custom Drupal codebases using Drush, building on the POTX ecosystem.
Features
- Adds a custom Drush command (pet) to export translations.
- Supports extracting strings from modules, themes, and installation profiles.
- Enables both single-project and bulk extraction workflows.
You would use this module when you need a fast, easy and repeatable way to generate translation files without navigating UI tools.
Post-Installation
The module contains only a Drush Command, make sure the module is only active on a development environment.
Additional Requirements
POTX module (Translation template extractor)
Recommended patches
- https://www.drupal.org/files/issues/2022-01-26/1299966-28.patch
- https://www.drupal.org/files/issues/2022-05-05/3017733-11.patch
- https://www.drupal.org/files/issues/2022-06-03/3013103-plural-translatio...
Similar projects
Translation Bliss; Centralizes translations.
Project status / long-term outlook
This project exists as a workaround for limitations in the POTX module. If the issue https://www.drupal.org/project/potx/issues/3444016 is resolved in POTX, the need for this module may disappear. In that case, the functionality provided here should ideally be handled natively by POTX, and this project would no longer be necessary.