Skip to content
This repository was archived by the owner on Jun 26, 2024. It is now read-only.

Commit ecf937b

Browse files
committed
# [joomla#28954] *Administrator templates positions untranslated when editing
Module position
1 parent 602a15c commit ecf937b

File tree

5 files changed

+34
-4
lines changed

5 files changed

+34
-4
lines changed

administrator/components/com_modules/helpers/modules.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,16 @@ public static function getAssignmentOptions($clientId)
232232
*
233233
* @since 3.0
234234
*/
235-
public static function getTranslatedModulePosition($template, $position)
235+
public static function getTranslatedModulePosition($clientId, $template, $position)
236236
{
237237
// Template translation
238238
$lang = JFactory::getLanguage();
239-
$lang->load('tpl_' . $template . '.sys', JPATH_SITE . '/templates/' . $template, $lang->getDefault(), false, false);
239+
$path = $clientId ? JPATH_ADMINISTRATOR : JPATH_SITE;
240+
241+
$lang->load('tpl_'.$template.'.sys', $path, null, false, false)
242+
|| $lang->load('tpl_'.$template.'.sys', $path.'/templates/'.$template, null, false, false)
243+
|| $lang->load('tpl_'.$template.'.sys', $path, $lang->getDefault(), false, false)
244+
|| $lang->load('tpl_'.$template.'.sys', $path.'/templates/'.$template, $lang->getDefault(), false, false);
240245

241246
$langKey = strtoupper('TPL_' . $template . '_POSITION_' . $position);
242247
$text = JText::_($langKey);

administrator/components/com_modules/views/module/tmpl/edit_positions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
$positions = TemplatesHelper::getPositions($clientId, $template);
3131
foreach ($positions as $position)
3232
{
33-
$text = ModulesHelper::getTranslatedModulePosition($template, $position) . ' [' . $position . ']';
33+
$text = ModulesHelper::getTranslatedModulePosition($clientId, $template, $position) . ' [' . $position . ']';
3434
$options[] = ModulesHelper::createOption($position, $text);
3535

3636
if (!$isTemplatePosition && $this->item->position === $position)

administrator/language/en-GB/en-GB.tpl_isis.sys.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,15 @@
33
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
44
; Note : All ini files need to be saved as UTF-8
55

6+
TPL_ISIS_POSITION_CPANEL="Cpanel"
7+
TPL_ISIS_POSITION_CP_SHELL="Unused"
8+
TPL_ISIS_POSITION_DEBUG="Debug"
9+
TPL_ISIS_POSITION_FOOTER="Footer"
10+
TPL_ISIS_POSITION_ICON="Quick Icons"
11+
TPL_ISIS_POSITION_LOGIN="Login"
12+
TPL_ISIS_POSITION_MENU="Menu"
13+
TPL_ISIS_POSITION_STATUS="Status"
14+
TPL_ISIS_POSITION_SUBMENU="Submenu"
15+
TPL_ISIS_POSITION_TITLE="Title"
16+
TPL_ISIS_POSITION_TOOLBAR="Toolbar"
617
TPL_ISIS_XML_DESCRIPTION="Continuing the Egyptian god/goddess theme (Khepri from 1.5 and Hathor from 1.6), Isis is the Joomla 3.0 admin template based on Bootstrap from Twitter and the launch of the Joomla User Interface library (JUI)."

administrator/templates/isis/language/en-GB/en-GB.tpl_isis.sys.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,15 @@
33
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
44
; Note : All ini files need to be saved as UTF-8
55

6+
TPL_ISIS_POSITION_CPANEL="Cpanel"
7+
TPL_ISIS_POSITION_CP_SHELL="Unused"
8+
TPL_ISIS_POSITION_DEBUG="Debug"
9+
TPL_ISIS_POSITION_FOOTER="Footer"
10+
TPL_ISIS_POSITION_ICON="Quick Icons"
11+
TPL_ISIS_POSITION_LOGIN="Login"
12+
TPL_ISIS_POSITION_MENU="Menu"
13+
TPL_ISIS_POSITION_STATUS="Status"
14+
TPL_ISIS_POSITION_SUBMENU="Submenu"
15+
TPL_ISIS_POSITION_TITLE="Title"
16+
TPL_ISIS_POSITION_TOOLBAR="Toolbar"
617
TPL_ISIS_XML_DESCRIPTION="Continuing the Egyptian god/goddess theme (Khepri from 1.5 and Hathor from 1.6), Isis is the Joomla 3.0 admin template based on Bootstrap from Twitter and the launch of the Joomla User Interface library (JUI)."

installation/CHANGELOG

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ $ -> Language fix or change
2626
- -> Removed
2727
! -> Note
2828

29-
12-Aug-2012 Rouven Weßling
29+
21-Aug-2012 Jean-Marie Simonet
30+
# [#28954] *Administrator templates positions untranslated when editing Module position
31+
32+
21-Aug-2012 Rouven Weßling
3033
^ Merge latest platform (bf746b2389fbea9c0fa48ea015320c18beb8d0f3)
3134
^ Remove use of the deprecated JProfiler::getMemory().
3235

0 commit comments

Comments
 (0)