No Code Attached Yet
avatar BrainforgeUK
BrainforgeUK
26 May 2023

Steps to reproduce the issue

Create a child template of Cassiopeia.
Add file tpl_cassiopeia_mytemplate.ini containing the following line:
TPL_CASSIOPEIA_XML_DESCRIPTION="My Cassiopeia child template."
Create / edit a child template style.

Expected result

TPL_CASSIOPEIA_XML_DESCRIPTION uses the child template text.
All other language constants use the Cassiopeia text.

Actual result

TPL_CASSIOPEIA_XML_DESCRIPTION displayed as expected.
All other language constants displayed without translation.

System information (as much as possible)

PHP 8.2

Additional comments

Suggested fix
File: com_templates/src/Model/StyleModel.php
Replace lines 399-402 with...

// Default to using parent template language constants
$lang->load('tpl_' . $data->parent, $client->path)
|| $lang->load('tpl_' . $data->parent, $client->path . '/templates/' . $data->parent);
// Optional overrides for child template language constants
$lang->load('tpl_' . $template, $client->path)
|| $lang->load('tpl_' . $template, $client->path . '/templates/' . $template);

Votes

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

avatar BrainforgeUK BrainforgeUK - open - 26 May 2023
avatar BrainforgeUK BrainforgeUK - change - 26 May 2023
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 26 May 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 26 May 2023
avatar BrainforgeUK
BrainforgeUK - comment - 27 May 2023

Test - install a child template from a zip file.
See screenshot for actual result.
screen shot 2023-05-27 at 08 32 25
See screenshot for expected result.
screen shot 2023-05-27 at 08 32 25


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

avatar alikon
alikon - comment - 27 May 2023

please test #40665

you don't need to open an issue if have already a pr

avatar alikon alikon - change - 27 May 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-05-27 14:33:09
Closed_By alikon
avatar alikon alikon - close - 27 May 2023

Add a Comment

Login with GitHub to post a comment