-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[4.4] Untranslated string for warning message in update:extensions:check CLI #43208
Conversation
Not usre this is the correct fix. Everything else in the cli is hardcoded english strings and not translatable |
Not sure what the "official" convention is so you'll need to educate me on that. However, from looking at the code, log messages are untranslated English strings, but messages intended for CLI output, which is the case here, are translated into the default language. This PR ensures that the CLI user gets to see the same message as the web user in the default language. |
If the convention is that the CLI is always in English, then fine, I've learnt something today. :-) But, thinking about it, the code I'm modifying here (UpdateAdapter.php) is also used by the web interface (when you click "Check For Updates"), so it needs to be translated. The correct language file is already loaded in the web interface, but isn't for CLI. Or maybe a better fix would be to load the lang file in cli/joomla.php? Dunno. |
@alikon Okay, done. |
I have tested this item ✅ successfully on 223769c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43208. |
1 similar comment
I have tested this item ✅ successfully on 223769c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43208. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43208. |
Thank you! |
Pull Request for Issue #43206 .
Summary of Changes
Language file is now loaded before outputting the warning message.
Testing Instructions
Arrange for an extension update site to have an invalid URL (eg. temporarily mangle the URL in the extensions database). Then run
php cli/joomla.php update:extensions:check
from the command line.Actual result BEFORE applying this Pull Request
Warning message:
[WARNING] JLIB_UPDATER_ERROR_OPEN_UPDATE_SITE
Expected result AFTER applying this Pull Request
Warning message something like
[WARNING] Update: Could not open update site #4 "xxxxxxxxxxx Package Update Site", URL: https://example.com/xxxxx/update.xml
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed