?
avatar ak1961
ak1961
28 May 2017

Steps to reproduce the issue

Template Manager -> Copy Template

Expected result

xx-XX.tpl_.ini and xx-XX.tpl_.sys.ini contains language constants with the name changed according new template name, like so:
TPL_NEW-TEMPLATE-NAME_POSITION...

Actual result

original language constants names, i.e. TPL_ORIGINAL-TEMPLATE-NAME_POSITION...

System information (as much as possible)

Joomla! 3.7.2 Stable

Additional comments

this leads in luck of descriptive positions labels in Module's position selection

avatar ak1961 ak1961 - open - 28 May 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 May 2017
avatar ak1961 ak1961 - change - 28 May 2017
The description was changed
avatar ak1961 ak1961 - edited - 28 May 2017
avatar ak1961 ak1961 - change - 28 May 2017
The description was changed
avatar ak1961 ak1961 - change - 28 May 2017
The description was changed
avatar franz-wohlkoenig franz-wohlkoenig - change - 28 May 2017
Category com_languages Templates (site)
avatar infograf768
infograf768 - comment - 29 May 2017

Not sure I understand.
Although the constants are indeed the same as the original, the name of the ini files correspond to the new template name and the strings are loaded fine.
Example for Protostar copied to newprotostar

screen shot 2017-05-29 at 07 52 55

avatar ak1961
ak1961 - comment - 29 May 2017

more details:
compare your picture with this one:
[image: Inline image 1]
to get it, I've replaced "TPL_PROTOSTAR_POSITION_..." with
"TPL_PROTOSTAR-ROCK-CLUB_POSITION_..." in file
/language/en-GB/en-GB.tpl_protostar-rock-club.sys.ini

On Mon, May 29, 2017 at 8:56 AM, infograf768 notifications@github.com
wrote:

Not sure I understand.
Although the constants are indeed the same as the original, the name of
the ini files correspond to the new template name and the strings are
loaded fine.
Example for Protostar copied to newprotostar

[image: screen shot 2017-05-29 at 07 52 55]
https://cloud.githubusercontent.com/assets/869724/26538064/2bae28aa-4444-11e7-9c5a-e5d6fc4a2e2b.png


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#16295 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/Abq0R2q0Ux8WRy8_ZYmGWbobBB9ZzIlwks5r-l4pgaJpZM4Non_k
.

--
Regards, Alexander.

avatar infograf768
infograf768 - comment - 29 May 2017

Your image is not displayed.

avatar ak1961
ak1961 - comment - 29 May 2017

sorry, one more time
correct

avatar franz-wohlkoenig franz-wohlkoenig - change - 29 May 2017
Status New Discussion
avatar tonypartridge
tonypartridge - comment - 30 May 2017

Yeah there is nothing wrong with this, it's a Dev issue if you want to change it. It's just a constant naming, to replace this would be quite a big tasks in all files within the template. It causes no problems and is just a preference.

avatar infograf768
infograf768 - comment - 31 May 2017

Not withstanding the fact that the constants in a specific original template may not follow the core convention. ;)

avatar tonypartridge
tonypartridge - comment - 31 May 2017

Good point! Another reason. Suggest we close this since it's not really an issue or bug.

avatar franz-wohlkoenig franz-wohlkoenig - change - 31 May 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-05-31 07:33:07
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - close - 31 May 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 31 May 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 31 May 2017

closed as no Core Issue.


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

avatar ot2sen
ot2sen - comment - 31 May 2017

It does sound like a valid core concern that @ak1961 is reporting.
What if a user wish to use multiple copies of a template in their site and have different values for the constants where the copy is assigned? This would be a problem to simple override because it would override the original values too.

A language constant should always match an extension, and this extension only. Similar to that you shouldn´t use component constants in a related module but instead use a unique constant in the module.
A copy of a template makes this an individual unique template and the constants in the inis and the source files should optimally be adjusted to this, just as the naming of the files were adjusted when copied.

avatar infograf768
infograf768 - comment - 31 May 2017

we would get into a LOT of problems to get that done, as the constants are also used in the template php and js code... And they may not be obvious (complex constants).

avatar tonypartridge
tonypartridge - comment - 31 May 2017

But it’s not, the copy template is there so you can load in some custom styles etc easily. Language strings are irrelevant for this purpose.

I really don’t see the problem with this. If you are developing a template further than some additional positions / css / images then you should be downloading it and renaming everything within it anyway.

As it stands, you are expecting Joomla! to do all the heavy work. To start copying files, then opening EVERY file in the template, and doing a find and replace based of the constants within the language files is just starting to get a bit crazy, since any developer can do this much quicker with a editor and a find and replace.

On 31 May 2017, 10:09 +0100, infograf768 notifications@github.com, wrote:

we would get into a LOT of problems to get that done, as the constants are also used in the template php and js code... And they may not be obvious (complex constants).

You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Add a Comment

Login with GitHub to post a comment