Skip to content
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

Merged
merged 3 commits into from
Apr 26, 2024

Conversation

chrisdavenport
Copy link
Contributor

@chrisdavenport chrisdavenport commented Apr 4, 2024

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

@brianteeman
Copy link
Contributor

Not usre this is the correct fix. Everything else in the cli is hardcoded english strings and not translatable

@chrisdavenport
Copy link
Contributor Author

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.

@brianteeman
Copy link
Contributor

are you sure? Everything here is hardcoded english

image

@chrisdavenport
Copy link
Contributor Author

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
Copy link
Contributor

alikon commented Apr 4, 2024

i'll do it in the CheckUpdatesCommand

image

and only the html_entity_decode in the UpdateAdapter

my 0.02 €

@chrisdavenport
Copy link
Contributor Author

@alikon Okay, done.

@alikon
Copy link
Contributor

alikon commented Apr 4, 2024

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
@viocassel
Copy link
Contributor

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.

@alikon
Copy link
Contributor

alikon commented Apr 4, 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43208.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Apr 4, 2024
@HLeithner HLeithner changed the title Untranslated string for warning message in update:extensions:check CLI [4.4] Untranslated string for warning message in update:extensions:check CLI Apr 24, 2024
@MacJoom MacJoom self-assigned this Apr 26, 2024
@MacJoom MacJoom added this to the Joomla! 4.4.5 milestone Apr 26, 2024
@MacJoom MacJoom merged commit 7b48c5b into joomla:4.4-dev Apr 26, 2024
3 checks passed
@MacJoom
Copy link
Contributor

MacJoom commented Apr 26, 2024

Thank you!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants