Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

Commit

Permalink
Fixed modules translations and added translatable license and author …
Browse files Browse the repository at this point in the history
…names.
  • Loading branch information
bkader committed May 27, 2018
1 parent 5403f37 commit 489fbee
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions skeleton/controllers/admin/Modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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.
Expand All @@ -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'));
}

Expand Down

0 comments on commit 489fbee

Please sign in to comment.