Problem/Motivation
Currently there are no drush commands for this module.
Proposed resolution
Add similar command to drush locale
'config_translation_po:export'
'config_translation_po:import'
'config_translation_po:import-all'
Remaining tasks
Currently added a patch for the import command "config_translation_po:import" as it was needed for a project I am working on.
All commands should be added.
| Comment | File | Size | Author |
|---|---|---|---|
| drush.patch | 4.28 KB | alexandru.dumitru |
Issue fork config_translation_po-3439416
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
alexandru.dumitru commentedComment #3
vighneshh commentedComment #4
alexandru.dumitru commentedComment #5
dj1999 commentedComment #7
dj1999 commentedNeeds working on coding standard.
Comment #8
rimi@aarhus.dk commentedGood 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.
Comment #9
dj1999 commentedComment #11
ressaThis 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:exportandlocale:importcommands?EXPORT
IMPORT
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?
Comment #12
dj1999 commentedComment #13
ressaIn the end, I did not use the Config Translation PO module for configuration translation.
Instead, for elements such as block titles, and field names, I copied the relevant Twig template files to my theme, and added
|transto the labels. I updated the doc page with this tip, under Alternative solution: Make configuration elements translatable.