- Issue created by @alexandru.dumitru
- Assigned to Vighneshh
- Status changed to Needs review
about 1 year ago 5:09pm 8 April 2024 - ๐ฉ๐ฐDenmark rimi@aarhus.dk
rimi@aarhus.dk โ made their first commit to this issueโs fork.
- ๐ฉ๐ฐDenmark rimi@aarhus.dk
Good point. I've cleaned up and defined coding standards.
I'm new to actually contributing to a Drupal module, so please let me know if anything must be done differently.
- Issue was unassigned.
- ๐ฉ๐ฐDenmark ressa Copenhagen
This is great, both that there is a module which offers export and import of translated configuration, but also that a Drush command is close to being available.
The patch worked well for me (I created an MR to get a patch to test) the only thing I would suggest is perhaps add a few examples, like there is in the
locale:export
andlocale:import
commands?EXPORT
$ drush locale:export -h Exports to a gettext translation file. See Drupal Core: \Drupal\locale\Form\ExportForm::submitForm Examples: drush locale:export nl > nl.po Export the Dutch translations with all types. drush locale:export nl --types=customized,not-customized Export the Dutch customized and not customized > nl.po translations. drush locale:export --template > drupal.pot Export the source strings only as template file for translation. Arguments: [langcode] The language code of the exported translations.
IMPORT
$ drush locale:import -h Imports to a gettext translation file. Examples: drush locale-import nl drupal-8.4.2.nl.po Import the Dutch drupal core translation. drush locale-import --type=customized nl Import the Dutch drupal core translation. Treat imported strings as drupal-8.4.2.nl.po custom translations. drush locale-import --override=none nl Import the Dutch drupal core translation. Don't overwrite existing drupal-8.4.2.nl.po translations. Only append new translations. drush locale-import --override=not-customized Import the Dutch drupal core translation. Only override nl drupal-8.4.2.nl.po non-customized translations, customized translations are kept. drush locale-import nl custom-translations.po Import customized Dutch translations and override any existing --type=customized --override=all translation. Arguments: langcode The language code of the imported translations. file Path and file name of the gettext file. Relative paths calculated from Drupal root.
It doesn't have to be as many examples, but 2-3 maybe? Also, I think the odd path situation should be mentioned, where the two commands are "rooted" -- for export in the current folder, but import uses /web.
I added a new section "Deploying Drupal interface translations with Drush" on "Translating site interfaces" the other day, and a similar section for
"Translating configuration" just now, since I could have really used a mention, when I visited that page the other day. Perhaps they can be used for inspiration?