drush
drush copied to clipboard
Drush - Import multiple custom translation po files
This adds new drush command to import multiple custom translation po files from directory, as described in #4235
We are lacking a locale maintainer at the moment so I apologize that nobody from Drush core team is reviewing this. We need a review from outside the team, as next step.
Reviewed and tested on real project, all works fine. Can be merged as-is.
@weitzman what need to do to speed up merge of this changes? thx.
Thanks for the review.
I'm hesitant to add more locale functionality while we have no maintainer for it. Ideally someone maintains these commands outside of Drush core for now.
I'd say it needs tests and then it could be a locale console command patch in core
FYI we have been using this patch in production for years now without any issue
Maybe we can consider making the directory argument an option? That way, you could set a sitewide default directory through a Drush config file. If you guys are on board with this idea I wouldn't mind implementing it.
Hi @DieterHolvoet , Making the directory argument an option would require to have a default value as fallback (because user can then omit this input, as it is optional). So i'd say, why not providing we figure out a meaningful default value for it.
WDYT ?
Or we could add an extra check in code to make sure the option is present? I would probably use ../translations
, relative to the Drupal docroot. In that case we should also support passing relative paths.
Just made a bit of research and discovered that "option" may not necessarily be "optional" (https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html#tag_12_02)
We could add an extra check in code to make sure the option is present
++ as long the helper reflects it
We should also support passing relative paths
I agree that this would be a welcome addition
The the decision about merging and maintaining this falls to the locale maintainer, @Sutharsan. This PR would need tests and needs to target 11.x branch.
Okay, before I continue work on this PR I'll wait for their go ahead.