Pending

User tests: Successful: Unsuccessful:

avatar julienV
julienV
22 Sep 2018

Pull Request for Issue #22329

Summary of Changes

Load the default language override as well

Testing Instructions

see issue

Expected result

see issue

Actual result

see issue

Documentation Changes Required

avatar julienV julienV - open - 22 Sep 2018
avatar julienV julienV - change - 22 Sep 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Sep 2018
Category Libraries
avatar ReLater
ReLater - comment - 22 Sep 2018

I have tested this item successfully on c3171fb

Thank you! The actual override behavior needled me a lot ;-)


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

avatar ReLater ReLater - test_item - 22 Sep 2018 - Tested successfully
avatar infograf768
infograf768 - comment - 23 Sep 2018

I do understand why this has been proposed, but it is quite arbitrary.

For a monolanguage site
If the string is created for back-end, choosing the site default language would be quite counterproductive.
Let's not forget that a monolanguage site may have multiple languages installed to provide various UI languagess depending on the user choice.
A site with en-GB and de-DE installed, even if de-DE is the default language for frontend, can be displayed in admin (and site) in en-GB if a registered user have set such his preferences.

Also, this does not work at all on a multilingual site.
$this->default will always be en-GB.

I added here the code to var_dump stuff

protected function loadOverride()
	{
		$override = array();

		echo "So-called default site language ";
		var_dump($this->default);
		echo "language used on the page ";
		var_dump($this->lang);

		if ($this->lang !== $this->default)
[...]

I created a simple override for French site (which is my default site language in a multilingual site containing 3 content languages: fr-FR, it-IT, en-GB) and echoed it in Protostar.
OVERRIDE_STRING="Mon override special"

I get when French is used in frontend:
The override IS translated, but en-GB is considered as default.

screen shot 2018-09-23 at 07 28 42

For Italian :
The override is NOT translated. en-GB is considered as default, and language used on the page is at the same time fr-FR (because the override is set in fr-FR and your patch acts such) and it-IT...

screen shot 2018-09-23 at 07 07 39

For English

The override is NOT translated. en-GB is considered as default, and language used on the page is at the same time fr-FR (because the override is set in fr-FR) and your patch acts such) and en-GB...

screen shot 2018-09-23 at 07 13 34

Conclusion:
On a multilingual site, this would work ONLY if the override is created for en-GB site.
same issue in back-end as for monolanguage site

avatar infograf768
infograf768 - comment - 23 Sep 2018

I have tested this item ? unsuccessfully on c3171fb

Set to unsuccessful for the reasons stated above.


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

avatar infograf768 infograf768 - test_item - 23 Sep 2018 - Tested unsuccessfully
avatar Quy Quy - change - 2 Oct 2018
Status Pending Information Required
avatar infograf768
infograf768 - comment - 3 Oct 2018

@julienV
You may want to close this PR until you find another possible solution. In that case it will be easier to make a new PR.

avatar julienV
julienV - comment - 3 Oct 2018

ok sure

avatar julienV julienV - change - 3 Oct 2018
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2018-10-03 08:41:31
Closed_By julienV
avatar julienV julienV - close - 3 Oct 2018

Add a Comment

Login with GitHub to post a comment