User tests: Successful: Unsuccessful:
Alternative to #40309
The patch changes language auto-loading to be safe for plugins that loaded before language exists.
This allows to restore #27155.
Apply patch, and make sure all works as before. All plugins translated.
Please select:
Category | ⇒ | Libraries |
Status | New | ⇒ | Pending |
Title |
|
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 ;)
Labels |
Added:
Feature
bug
PR-5.0-dev
|
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?
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.
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.
This pull request has been automatically rebased to 5.1-dev.
Title |
|
Labels |
Added:
PR-5.2-dev
Removed: PR-5.0-dev |
I have changed approach, should be better now.
This pull request has been automatically rebased to 5.3-dev.
Title |
|
Labels |
Added:
PR-5.3-dev
Removed: PR-5.2-dev |
This pull request has been automatically rebased to 6.0-dev.
Title |
|
Labels |
Added:
PR-6.0-dev
Removed: PR-5.3-dev |
hmhm, with this approach the plugins cannot be lazy
Title |
|
Category | Libraries | ⇒ | Libraries Unit Tests |
Labels |
Added:
Unit/System Tests
|
Status | Pending | ⇒ | Ready to Commit |
I setting this to RTC, because it was tested with #45426
Labels |
Added:
RTC
|
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):
System - Tassos GeoIP | system | tgeoip | Public | 267
Assuming is an issue with the 3rd party not having provided translation ?
System - Tassos Framework | system | nrframework | Public | 254
Assuming is an issue with the 3rd party not having provided translation ?
-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.
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.
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.
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.
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.
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
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.
Services web - Redirection ---> all other Web Services in French have been translated/labelled: Services Web - not Services web
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?
If it is partly/not fully translated then it more likely translation issue. Otherwise all plugins would be untranslated.
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.
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?