Skip to content

Conversation

@Fedik
Copy link
Member

@Fedik Fedik commented Apr 10, 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

@Fedik Fedik changed the title Move language autoload out from CMSPlugin constructor [5.0] Move language autoload out from CMSPlugin constructor Apr 23, 2023
@HLeithner
Copy link
Member

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?

@Fedik
Copy link
Member Author

Fedik commented Jul 22, 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 ;)

@ceford
Copy link
Contributor

ceford commented Sep 14, 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.

@HLeithner
Copy link
Member

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.

@Fedik
Copy link
Member Author

Fedik commented Sep 18, 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.

@Fedik Fedik marked this pull request as draft September 18, 2023 07:32
@HLeithner HLeithner changed the base branch from 5.0-dev to 5.1-dev September 30, 2023 22:50
@HLeithner
Copy link
Member

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

@Fedik Fedik changed the title [5.0] Move language autoload out from CMSPlugin constructor [5.x] Move language autoload out from CMSPlugin constructor Oct 1, 2023
@Fedik Fedik changed the base branch from 5.1-dev to 5.2-dev March 19, 2024 15:34
@HLeithner HLeithner changed the title [5.x] Move language autoload out from CMSPlugin constructor [5.2] Move language autoload out from CMSPlugin constructor Apr 24, 2024
@Fedik Fedik marked this pull request as ready for review April 28, 2024 11:04
@Fedik
Copy link
Member Author

Fedik commented Apr 28, 2024

I have changed approach, should be better now.

@HLeithner HLeithner changed the base branch from 5.2-dev to 5.3-dev September 2, 2024 08:52
@HLeithner
Copy link
Member

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

@HLeithner HLeithner changed the title [5.2] Move language autoload out from CMSPlugin constructor [5.3] Move language autoload out from CMSPlugin constructor Sep 2, 2024
@Hackwar Hackwar removed the PR-5.2-dev label Sep 3, 2024
@rdeutz rdeutz removed the PR-5.3-dev label Mar 5, 2025
@Fedik

This comment was marked as outdated.

@Fedik Fedik changed the title [6.0] Move language autoload out from CMSPlugin constructor [6.0] Fix language autoload in CMSPlugin constructor to work safely May 15, 2025
@Fedik
Copy link
Member Author

Fedik commented Jun 1, 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.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jun 1, 2025
@exlemor
Copy link

exlemor commented Jun 16, 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?

@Fedik
Copy link
Member Author

Fedik commented Jun 16, 2025

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

@exlemor
Copy link

exlemor commented Jun 18, 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.

@softforge softforge added this to the Joomla! 6.0.0 milestone Aug 13, 2025
@softforge softforge merged commit 3ecac63 into joomla:6.0-dev Aug 13, 2025
30 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Aug 13, 2025
@softforge
Copy link
Contributor

Thank you for your patience and hard work and the reviewers and testers for their work

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.