?
avatar Scrabble96
Scrabble96
9 Jan 2019

Steps to reproduce the issue

In Joomla! 4.0 (Alpha 7.0-dev) go to the Cassiopeia template files and open the Cassiopeia language file (cassiopeia/language/en-GB/en-GB.tpl_cassiopeia.ini)
Change text for TPL_CASSIOPEIA_XML_DESCRIPTION which is the quickest one to test, save, then look in the Template Details tab of the editor.

Expected result

Changed text

Actual result

Unchanged text.

System information (as much as possible)

Additional comments

HOWEVER, if you edit the file /httpdocs/language/en-GB/en-GB.tpl_cassiopeia.ini
you will see the results in the Template Details tab of the editor.

avatar Scrabble96 Scrabble96 - open - 9 Jan 2019
avatar joomla-cms-bot joomla-cms-bot - change - 9 Jan 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 9 Jan 2019
avatar Scrabble96 Scrabble96 - change - 9 Jan 2019
The description was changed
avatar Scrabble96 Scrabble96 - edited - 9 Jan 2019
avatar ReLater
ReLater - comment - 9 Jan 2019

Joomla always searches first in the Joomla /language/xx-XX/ folder for the language file. Only if it is not present there it searches for the files in templates/cass.../langugae/xx-XX/

This behavior is the same like in Joomla 3 for all extensions. Compare with protostar or beez3

Reason are these lines in the manifest file that tell the installer to copy the language files
https://github.com/joomla/joomla-cms/blob/4.0-dev/templates/cassiopeia/templateDetails.xml#L43-L46
I never use them in my extensions to avoid confusion.

I don't say that I like this irritating double storage in "core" templates but it's the "expected" behavior at the moment.

avatar Bakual
Bakual - comment - 9 Jan 2019

Actually, there should be no language folder within the template folder. In core, we have all language files within the global language folder. That template folder should be removed.
It likely is there because the template initially was developed in another repo and moved over.

avatar Bakual
Bakual - comment - 9 Jan 2019

Closing as I created a PR to remove the superfluous files.

avatar Bakual Bakual - change - 9 Jan 2019
Status New Closed
Closed_Date 0000-00-00 00:00:00 2019-01-09 20:37:25
Closed_By Bakual
avatar Bakual Bakual - close - 9 Jan 2019
avatar Scrabble96
Scrabble96 - comment - 10 Jan 2019

I still have an issue with these files:

I have created a copy of the Cassiopeia template and renamed and installed it as Cassiopeiaasix (as it is a copy of the Alpha 6 version). I changed all references in its files from Cassiopeia to Cassiopeiaasix.

In the templates/cassiopeiaasix/language/en-GB/en-GB.tpl_cassiopeiaasix.ini I have changed the 'back-to-top' text and this new text is displaying as expected.

However, I also changed the TPL_CASSIOPEIAASIX_XML_DESCRIPTION in both cassiopeiaasix/language/en-GB/en-GB.tpl_cassiopeiaasix.ini and cassiopeiaasix/language/en-GB/en-GB.tpl_cassiopeiaasix.sys.ini and there is no text displayed at all:

image

avatar infograf768
infograf768 - comment - 10 Jan 2019

bug. Code only looks in core language folder.
Looking into this.

avatar infograf768
infograf768 - comment - 11 Jan 2019

In fact, it is not a bug.
The files which are used after copy template are put in the main core language folder.

Therefore the change has to be made in these via an override.
Also beware, the string constants AND values are the same as the original template.

avatar Scrabble96
Scrabble96 - comment - 11 Jan 2019

Thank you, @infograf768
I have created a languages folder override which is now in the html folder. I then created a sub-folder called en-GB.
I then attempted to create a new file called en-GB.tpl_cassiopeiaasix with a file type 'ini'.
It failed - because the file name contains a full stop after the GB and before sys in the other file.

Add a Comment

Login with GitHub to post a comment