User tests: Successful: Unsuccessful:
Pull Request resolves # .
There is a bug in the "order" languages are loaded and cached in com_modules in combination with certain field layouts that are rendered in the backend when creating or editing a module. Here, different methods to load the respective language are used where one overrides the other.
Debug Language set to "On" masks the bug because it skips the preload.
When selecting an alternative layout provided by a site template (override) for a module, the layout dropdown renders labels in en-GB instead of the admin's current language. If no translation exists, of course the filename would be displayed.
A practical / real life scenario would be, if you created a custom site template and ship that with an override for, let's say: mod_articles. This override introduces a new layout called: fancy-with-sugar-on-top.php
The corresponding language string for that layout would then be:
TPL_YOURTEMPLATE_MOD_ARTICLES_LAYOUT_FANCY-WITH-SUGAR-ON-TOP="Fancy article layout with sugar on top"
Download and install the demo template tpl_acme.zip. It has got a custom layout for mod_articles called: translateme.php. The template / style does not have to be activated.
I've included language files for en, es and de to test this with. Now, set the backend language either to Spanish or German, given you installed one of these first.
Create a new module instance of mod_articles and switch over to the Advanced Tab -> Layout. The dropdown should list all available overrides / layouts grouped by template + the default option.
Thanks to @joomdonation for proposing a better solution than my previous attempt.
Regardless of the selected backend language, the en-GB version of the translation is used.
The drowdown shows the translation currently selected as the default.
Please select:
Documentation link for guide.joomla.org: n/a
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org: n/a
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Administration com_modules |
| Labels |
Added:
PR-5.4-dev
|
||
| Title |
|
||||||