Feature RTC Unit/System Tests bug PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
10 Apr 2023

Summary of Changes

Alternative to #40309
The patch changes language auto-loading to be safe for plugins that loaded before language exists.
This allows to restore #27155.

Testing Instructions

Apply patch, and make sure all works as before. All plugins translated.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org: IDK
  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed
  • Pull Request link for manual.joomla.org: IDK
avatar joomla-cms-bot joomla-cms-bot - change - 10 Apr 2023
Category Libraries
avatar Fedik Fedik - open - 10 Apr 2023
avatar Fedik Fedik - change - 10 Apr 2023
Status New Pending
avatar Fedik Fedik - change - 10 Apr 2023
The description was changed
avatar Fedik Fedik - edited - 10 Apr 2023
avatar Fedik Fedik - change - 23 Apr 2023
Title
Move language autoload out from CMSPlugin constructor
[5.0] Move language autoload out from CMSPlugin constructor
avatar Fedik Fedik - edited - 23 Apr 2023
avatar HLeithner HLeithner - change - 21 Jul 2023
The description was changed
avatar HLeithner HLeithner - edited - 21 Jul 2023
avatar HLeithner
HLeithner - comment - 22 Jul 2023

I think it's not a good idea to force the application in the plugin to load the languages, wouldn't it be better to provide the language in the register process?

avatar Fedik
Fedik - comment - 22 Jul 2023

Accessing language in constructor of the System plugins should be forbiden (and for any other group also).
Because the Language available not early than afterInitialise.
That will limit the plugin usage, and will not allow to use it for early stages. And this is a main reason why I tries to move language loading out from constructor ;)

avatar Fedik Fedik - change - 6 Aug 2023
Labels Added: Feature bug PR-5.0-dev
avatar ceford ceford - test_item - 14 Sep 2023 - Tested successfully
avatar ceford
ceford - comment - 14 Sep 2023

I have tested this item ✅ successfully on 2bf6090

I applied patch, logged in with German selected and opened several plugins - all strings were in German. Is that a valid test?


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

avatar HLeithner
HLeithner - comment - 17 Sep 2023

I'm not so happy to merge this in to 5.0 anymore, since it would effect existing plugins depending for the loaded language in the constructor. I think we have to postpone this to 6.0 or find a better b/c way.

avatar Fedik
Fedik - comment - 18 Sep 2023

Yeah, it would be need before first alpha :)

But I thinking to moving it in to bootPlugin(), will be smarter.

if ($plugin->autoloadLanguage()) {
  ... here some code for checking if language is ready, then:  
  $plugin->loadLanguage();
}

For 6 or maybe can get in one of 5.x.
Loading language in the plugin constructor is very bad.

avatar HLeithner
HLeithner - comment - 30 Sep 2023

This pull request has been automatically rebased to 5.1-dev.

avatar HLeithner HLeithner - change - 24 Apr 2024
Title
[5.0] Move language autoload out from CMSPlugin constructor
[5.2] Move language autoload out from CMSPlugin constructor
avatar HLeithner HLeithner - edited - 24 Apr 2024
avatar Fedik Fedik - change - 28 Apr 2024
Labels Added: PR-5.2-dev
Removed: PR-5.0-dev
avatar Fedik
Fedik - comment - 28 Apr 2024

I have changed approach, should be better now.

avatar HLeithner
HLeithner - comment - 2 Sep 2024

This pull request has been automatically rebased to 5.3-dev.

avatar HLeithner HLeithner - change - 2 Sep 2024
Title
[5.2] Move language autoload out from CMSPlugin constructor
[5.3] Move language autoload out from CMSPlugin constructor
avatar HLeithner HLeithner - edited - 2 Sep 2024
avatar laoneo laoneo - change - 29 Jan 2025
Labels Added: PR-5.3-dev
Removed: PR-5.2-dev
3ee5fb3 1 Feb 2025 avatar Fedik cs
avatar HLeithner
HLeithner - comment - 4 Mar 2025

This pull request has been automatically rebased to 6.0-dev.

avatar HLeithner HLeithner - change - 4 Mar 2025
Title
[5.3] Move language autoload out from CMSPlugin constructor
[6.0] Move language autoload out from CMSPlugin constructor
avatar HLeithner HLeithner - edited - 4 Mar 2025
avatar Fedik Fedik - change - 4 May 2025
Labels Added: PR-6.0-dev
Removed: PR-5.3-dev
avatar Fedik
Fedik - comment - 4 May 2025

hmhm, with this approach the plugins cannot be lazy

avatar Fedik Fedik - change - 15 May 2025
The description was changed
avatar Fedik Fedik - edited - 15 May 2025
avatar Fedik Fedik - change - 15 May 2025
Title
[6.0] Move language autoload out from CMSPlugin constructor
[6.0] Fix language autoload in CMSPlugin constructor to work safely
avatar Fedik Fedik - edited - 15 May 2025
avatar joomla-cms-bot joomla-cms-bot - change - 15 May 2025
Category Libraries Libraries Unit Tests
avatar Fedik Fedik - change - 15 May 2025
Labels Added: Unit/System Tests
avatar Fedik Fedik - change - 1 Jun 2025
Status Pending Ready to Commit
avatar Fedik
Fedik - comment - 1 Jun 2025

I setting this to RTC, because it was tested with #45426


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

avatar QuyTon QuyTon - change - 14 Jun 2025
Labels Added: RTC
avatar exlemor
exlemor - comment - 16 Jun 2025

Hi @Fedik,

Before I fail the test which I don't want to do ;) ...
When testing and putting the entire site in French
(with latest French language pack: fr-FR_joomla_lang_full_5.3.1v2.zip)

I found 10 plugins that seemed off (partially, incorrect or fully untranslated):

3rd party plugins:

  1. System - Tassos GeoIP | system | tgeoip | Public | 267
    Assuming is an issue with the 3rd party not having provided translation ?

  2. System - Tassos Framework | system | nrframework | Public | 254
    Assuming is an issue with the 3rd party not having provided translation ?

Joomla Core plugins:

-1. Behaviour - Backward Compatibility 6
the title and text inside the plugin is also in English - due to the new nature of the Backware Compatibility 6 assuming untranslated in French as of yet.

  1. Quick Icon - Joomla! Automated Update Health Notification
    the title and the text inside the plugin is also in English - due to the new nature of Automated Update Health assuming untranslated in French as of yet.

  2. Recherche avancée | content | finder | Public | 101
    As per the others in that group, it should be translated to: Contenu - Recherche avancée vs Recherche avancée.

  3. Action Média - Redimensionner - the others 2 are translated to Action média and not Action Média, so for consistency should be the same.

  4. Icône rapide - Notification de fin de support de Joomla 5
    should be like the others translated to Icône raccourci - Notification de fin de support de Joomla 5 not Icône rapide.

  5. Web Services - Joomlaupdate | webservices | joomlaupdate | Public | 224
    (when clicking inside the text is untranslated in English as well)

it's title should also be: Services Web - Joomlaupdate

  1. Web Services - Média
    while this one is correctly translate when plugin into it the title is partially translated.

all other Web Services are translated in French as Services Web - , so Web Services - Média above is partially incorrect and should be: Services Web - Média not Web Services - Média.

  1. Services web - Redirection ---> all other Web Services in French have been translated/labelled: Services Web - not Services web

  2. Système - Purge des données de session | task | sessiongc | Public | 206
    This should be translated to Tâches - Purge des données de session and not Système - Purge des données de session.

For the 3rd party, I can reach out to Tassos and for the others, to Stefan if just translation and not related to this PR patch.

Are all of these language translation issues or are some a patch issue?

avatar Fedik
Fedik - comment - 16 Jun 2025

If it is partly/not fully translated then it more likely translation issue. Otherwise all plugins would be untranslated.

avatar exlemor
exlemor - comment - 18 Jun 2025

If it is partly/not fully translated then it more likely translation issue. Otherwise all plugins would be untranslated.

Hi @Fedik, I went into Crowdin and fixed 1., 2., 3., 5., 6., and 7. above in the French Translation and alerted our language hero Stefan... and asked him how I can fix -1, 0. and 4. which don't exist in Crowdin.

Thanks.

Add a Comment

Login with GitHub to post a comment