RTC PR-5.2-dev Pending

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
15 May 2024

Summary of Changes

Load the template language files via the MailsHelper over an manuall code which not handles it correctly for example for plugins.

Testing Instructions

  1. Install this extension: https://github.com/zero-24/plg_task_extensionupdates/releases
  2. check the mail templates (system -> Mail Templates -> Extensions Update Notification)
  3. notice that the mail template is not translated
  4. apply this patch
  5. notice the templates are now translated
  6. check other mail templates
  7. confirm they are also still translated

Actual result BEFORE applying this Pull Request

On the detail view an mail template shipped with an plugin is not translated
image

Expected result AFTER applying this Pull Request

Once that patch is applied the issue is solved
image

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar zero-24 zero-24 - open - 15 May 2024
avatar zero-24 zero-24 - change - 15 May 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 May 2024
Category Administration
avatar zero-24 zero-24 - change - 15 May 2024
Labels Added: PR-5.1-dev
avatar zero-24 zero-24 - change - 16 May 2024
Easy No Yes
avatar JeroenMoolenschot JeroenMoolenschot - test_item - 23 May 2024 - Tested unsuccessfully
avatar JeroenMoolenschot
JeroenMoolenschot - comment - 23 May 2024

I have tested this item ? unsuccessfully on 3ccce67

After applying the patch i see:

An error has occurred.
0 Class "Joomla\Component\Mails\Administrator\View\Template\MailsHelper" not found

Seems like this line is missing.
use Joomla\Component\Mails\Administrator\Helper\MailsHelper;


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43475.
avatar zero-24
zero-24 - comment - 23 May 2024

Yes sorry i have added it to my test Installation but not to the patch. Its added now, please try again. Thanks

avatar JeroenMoolenschot JeroenMoolenschot - test_item - 23 May 2024 - Tested unsuccessfully
avatar JeroenMoolenschot
JeroenMoolenschot - comment - 23 May 2024

I have tested this item ? unsuccessfully on c903f7c

The added line solved the error indeed.

But after applying the patch, the subject and bodytexts are only in English, even when i select the German flag for example.
This occurs to all mailtemplates, not only plg_task_extensionupdates


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

avatar zero-24
zero-24 - comment - 23 May 2024

Hmm need to look into this deeper later. When its happening with and without the patch it looks like a different issue.

avatar JeroenMoolenschot
JeroenMoolenschot - comment - 23 May 2024

I looks like the core templates work in the right language without the patch.

Without the patch your extension only shows English
Only when i move your languagefiles to the /administrator/language/de-DE folder it works for German too.
(I have the same issue with a plugin i'm developing right now, so i was hoping this was the solution. :) )

avatar zero-24
zero-24 - comment - 23 May 2024

Can you see that the german language file is loaded when logged in as german in the language debug?

avatar JeroenMoolenschot
JeroenMoolenschot - comment - 23 May 2024

With the Patch disabled:
afbeelding

With the Patch enabled:
When i change the backend language to german, all mails switch to german (even en-GB as in this screenshot)
afbeelding

avatar zero-24
zero-24 - comment - 23 May 2024

Ok so the issue i saw is solved now but the switch of language seams not to be respected not by the current nor by the new coding. That needs more debugging than how it should work and why it does not work right now. Thanks ?

avatar zero-24
zero-24 - comment - 23 May 2024

@JeroenMoolenschot I think i have found the issue, please try again.

avatar JeroenMoolenschot JeroenMoolenschot - test_item - 23 May 2024 - Tested successfully
avatar JeroenMoolenschot
JeroenMoolenschot - comment - 23 May 2024

I have tested this item ✅ successfully on 423ec91

Thank you! This works for me.


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

avatar richard67
richard67 - comment - 2 Jun 2024

@zero-24 Is this a bug fix or a new feature?
If bug fix: Does the bug also apply to 4.4-dev? If so, then it should be fixed there, too (or only there and later be merged up to 5.1-dev).
But if new feature: Shouldn't it be made for 5.2-dev?

avatar zero-24 zero-24 - change - 2 Jun 2024
Title
[5.1] Mail Templates language file loading not using the MailsHelper::loadTranslationFiles
[5.2] Mail Templates language file loading not using the MailsHelper::loadTranslationFiles
avatar zero-24 zero-24 - edited - 2 Jun 2024
avatar joomla-cms-bot joomla-cms-bot - change - 2 Jun 2024
Category Administration Administration Language & Strings Installation Libraries NPM Change
avatar zero-24
zero-24 - comment - 2 Jun 2024

Moved to 5.2 looking forward to tests on this PR so it can be merged.

avatar zero-24 zero-24 - change - 9 Jun 2024
Labels Added: Language Change NPM Resource Changed PR-5.2-dev
avatar joomla-cms-bot joomla-cms-bot - change - 9 Jun 2024
Category Administration Language & Strings Installation Libraries NPM Change Administration Libraries
avatar zero-24 zero-24 - change - 9 Jun 2024
Labels Removed: Language Change NPM Resource Changed
avatar joomla-cms-bot joomla-cms-bot - change - 9 Jun 2024
Category Administration Libraries Administration
avatar pe7er pe7er - change - 16 Jul 2024
Labels Removed: PR-5.1-dev
avatar tecpromotion tecpromotion - test_item - 16 Jul 2024 - Tested successfully
avatar tecpromotion
tecpromotion - comment - 16 Jul 2024

I have tested this item ✅ successfully on 53f137e


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

avatar Quy Quy - alter_testresult - 16 Jul 2024 - JeroenMoolenschot: Tested successfully
avatar Quy Quy - change - 16 Jul 2024
Status Pending Ready to Commit
avatar Quy
Quy - comment - 16 Jul 2024

RTC


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

avatar pe7er pe7er - close - 16 Jul 2024
avatar pe7er pe7er - merge - 16 Jul 2024
avatar pe7er pe7er - change - 16 Jul 2024
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-07-16 15:44:58
Closed_By pe7er
Labels Added: RTC
avatar pe7er
pe7er - comment - 16 Jul 2024

Thanks @zero-24 !

avatar zero-24
zero-24 - comment - 16 Jul 2024

Thanks ?

Add a Comment

Login with GitHub to post a comment