From 489fbee34b93ffc29374e9b1b68bb4abca646bb2 Mon Sep 17 00:00:00 2001 From: Kader Bouyakoub Date: Sun, 27 May 2018 04:02:55 +0100 Subject: [PATCH] Fixed modules translations and added translatable license and author names. --- skeleton/controllers/admin/Modules.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/skeleton/controllers/admin/Modules.php b/skeleton/controllers/admin/Modules.php index 9bcd1c9..313a3d3 100644 --- a/skeleton/controllers/admin/Modules.php +++ b/skeleton/controllers/admin/Modules.php @@ -99,7 +99,7 @@ public function __construct() public function index() { $modules = $this->router->list_modules(true); - $i18n = $this->config->item('language'); + $i18n = $this->lang->lang('folder'); foreach ($modules as $folder => &$m) { @@ -112,6 +112,12 @@ public function index() if (isset($m['translations'][$i18n]['description'])) { $m['description'] = $m['translations'][$i18n]['description']; } + if (isset($m['translations'][$i18n]['license'])) { + $m['license'] = $m['translations'][$i18n]['license']; + } + if (isset($m['translations'][$i18n]['author'])) { + $m['author'] = $m['translations'][$i18n]['author']; + } } // Add module actions. @@ -122,7 +128,7 @@ public function index() $m['actions'][] = html_tag('a', array( 'href' => admin_url('settings/'.$folder), 'class' => 'btn btn-default btn-xs btn-icon ml-2', - 'aria-label' => sprintf(line('CSK_BTN_ACTIVATE_COM'), $m['name']), + 'aria-label' => sprintf(line('CSK_BTN_SETTINGS_COM'), $m['name']), ), fa_icon('cogs').line('CSK_MODULES_SETTINGS')); }