? ? ? Pending

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
9 Jan 2017

Summary of Changes

Right now in Joomla core, the way to override a language string is to define the key in either the designated overrides file or load it in a file loaded after the version you want to override. This is problematic in some cases because a key gets used in multiple contexts and if you were to load files in the wrong order this results in the wrong translation being displayed. Additionally, this behavior makes it really difficult to create a process for caching a JLanguage instance with all of the language strings loaded into memory (you replace the processing time loading INIs into memory by just starting with the object having everything).

JText already exposes an API for using alternate language strings; it should be used in locations where we know localized contexts of a string may be created. This PR does just that for the two keys in the rules form field that are commonly overridden by extensions.

Testing Instructions

In the com_content component config and article edit view, the permissions strings should use the localized keys for this component.

Documentation Changes Required

N/A

Language B/C Concerns

Though these keys are renamed in this PR, there is no B/C concern with translations. JText::alt() checks if the alternate key (built by appending the second parameter to the first parameter) exists before using it, so if it doesn't exist, the base key (which will probably already be translated on a current 3.6 package) will be used.

avatar mbabker mbabker - open - 9 Jan 2017
avatar mbabker mbabker - change - 9 Jan 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Jan 2017
Category Administration Language & Strings Libraries
avatar infograf768
infograf768 - comment - 10 Jan 2017

@mbabker
we are using 22 instances of JLIB_RULES_SETTING_NOTES in core. (took off the lib ones)

Does it mean this PR should be enlarged to all these places?

avatar mbabker
mbabker - comment - 10 Jan 2017

I didn't want to waste time doing them all if the idea was going to be rejected, I also wanted to have proof that this wasn't going to break anything. If it's fine though I can work through them all.

avatar AlexRed AlexRed - test_item - 31 Mar 2017 - Tested successfully
avatar AlexRed
AlexRed - comment - 31 Mar 2017

I have tested this item successfully on 9ad4281

Patch ok for me


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

avatar jeckodevelopment
jeckodevelopment - comment - 31 Mar 2017

@mbabker can you please look at the conflicts?

avatar infograf768
infograf768 - comment - 31 Mar 2017

folks, i think'it is a goog idea. let's keep it, if b/c, for 3.8

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 28 May 2017

@mbabker as Release Lead: Milestone Joomla 3.8.0?


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

avatar mbabker
mbabker - comment - 29 May 2017

Rebased for 3.8. I did all the strings except the one in com_categories, with this patch to have a unique string we would have to duplicate it in every extension supporting categories (the key would be JLIB_RULES_SETTING_NOTES_ITEM_<extension>_CATEGORY or we hardcode some rule into the form field to have yet another lookup for that context, doesn't seem worth the effort to do that.

avatar mbabker mbabker - change - 2 Jun 2017
Labels Added: ? ?
avatar brianteeman brianteeman - test_item - 12 Aug 2017 - Tested successfully
avatar brianteeman
brianteeman - comment - 12 Aug 2017

I have tested this item successfully on 6e895de


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

avatar sanderpotjer sanderpotjer - test_item - 30 Aug 2017 - Tested successfully
avatar sanderpotjer
sanderpotjer - comment - 30 Aug 2017

I have tested this item successfully on 6e895de


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 31 Aug 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 31 Aug 2017

RTC after two successful tests.

avatar infograf768
infograf768 - comment - 27 Feb 2018

Not sure this should go in 3.8.6. It can safely wait 3.9

avatar mbabker mbabker - change - 31 Mar 2018
Labels Added: ? ?
Removed: ?
avatar mbabker
mbabker - comment - 31 Mar 2018

Rebased to 3.9.

avatar zero-24
zero-24 - comment - 1 Apr 2018

cc @wilsonge for 3.9. Drone is happy now too ?

avatar mbabker
mbabker - comment - 2 Jun 2018

This has been RTC for 10 months. Is this getting merged or not?

avatar infograf768
infograf768 - comment - 2 Jun 2018

You are the one in charge. No opposition here for merging in 3.10

avatar brianteeman
brianteeman - comment - 2 Jun 2018

@mbabker is following best practice and not merging his own pr.

avatar laoneo laoneo - change - 2 Jun 2018
Labels Added: ?
Removed: ?
avatar laoneo laoneo - change - 2 Jun 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-06-02 08:42:42
Closed_By laoneo
avatar laoneo laoneo - close - 2 Jun 2018
avatar laoneo laoneo - merge - 2 Jun 2018

Add a Comment

Login with GitHub to post a comment