-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[6.0] Fix language autoload in CMSPlugin constructor to work safely #40355
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
Conversation
|
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? |
|
Accessing language in constructor of the System plugins should be forbiden (and for any other group also). |
|
I have tested this item ✅ successfully on 2bf6090 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40355. |
|
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 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. |
|
This pull request has been automatically rebased to 5.1-dev. |
|
I have changed approach, should be better now. |
|
This pull request has been automatically rebased to 5.3-dev. |
This comment was marked as outdated.
This comment was marked as outdated.
|
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. |
|
Hi @Fedik, Before I fail the test which I don't want to do ;) ... I found 10 plugins that seemed off (partially, incorrect or fully untranslated): 3rd party plugins:
Joomla Core plugins:-1. Behaviour - Backward Compatibility 6
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.
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. |
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. |
|
Thank you for your patience and hard work and the reviewers and testers for their work |
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: