-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not possible to install translations for en_US #84
Comments
Sounds like a reasonable thing to fix 👍 |
Any progress on this? It seems that the fix is a oneliner. |
@vielhuber PRs welcome :-) I haven't had time to work on this myself so far. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Hello! I pick this 😄 |
After working on this, I am not sure the solution to this issue lies in the portion of code highlighted. WordPress Core defaults to |
Hello again! I continue to confirm that this is an edge case out of the standard: gettext expects to be fed with English strings (see the homepage and the best practices). I would like to ask to @danielbachhuber and @schlessera what should be the approach of the CLI here: rigid on the standard or not? If not, the only solution I see (that's not the original PR I created) targets these sections of code language-command/src/Plugin_Language_Command.php Lines 280 to 283 in 257b536
language-command/src/Plugin_Language_Command.php Lines 348 to 352 in 257b536
by adding to the command a |
CommandWithTranslation::get_installed_languages()
currently assumes that translations for en_US are always installed.language-command/src/WP_CLI/CommandWithTranslation.php
Lines 251 to 257 in beedcd2
But that's not always true. For example if you have a plugin which is by default provided in a different language than English. While translate.w.org doesn't support en_US as a locale, a custom implementation can support and hook into core filters to tell WordPress that there are translations for en_US.
Worth nothing that I can update en_US translation via WP-CLI once installed via
wp-admin/network/update-core.php
.The text was updated successfully, but these errors were encountered: