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.
TPL_CASSIOPEIA_XML_DESCRIPTION uses the child template text.
All other language constants use the Cassiopeia text.
TPL_CASSIOPEIA_XML_DESCRIPTION displayed as expected.
All other language constants displayed without translation.
PHP 8.2
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);
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-05-27 14:33:09 |
Closed_By | ⇒ | alikon |
Test - install a child template from a zip file.
See screenshot for actual result.
See screenshot for expected result.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40660.