From 64d2c52d95364c8fd2aab93b183332184e277c19 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Tue, 12 Mar 2024 10:01:07 +0100 Subject: [PATCH] #12714 Fixed traslations --- pandora_console/godmode/menu.php | 2 +- .../godmode/wizards/Applications.class.php | 2 +- .../godmode/wizards/Cloud.class.php | 2 +- .../godmode/wizards/HostDevices.class.php | 2 +- .../wizards/ManageExtensions.class.php | 2 +- .../lib/TacticalView/GeneralTacticalView.php | 40 +++++++++---------- pandora_console/operation/menu.php | 10 ++++- 7 files changed, 34 insertions(+), 26 deletions(-) diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index dc75260465..97ce59e2b6 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -71,7 +71,7 @@ if ((bool) check_acl($config['id_user'], 0, 'AR') === true $sub2['godmode/servers/discovery&wiz=hd&mode=managenetscanscripts']['text'] = __('Manage scan scripts'); } - $sub['godmode/servers/discovery&wiz=hd']['text'] = __('Host & devices'); + $sub['godmode/servers/discovery&wiz=hd']['text'] = __('Host & Devices'); $sub['godmode/servers/discovery&wiz=hd']['id'] = 'hd'; $sub['godmode/servers/discovery&wiz=hd']['type'] = 'direct'; $sub['godmode/servers/discovery&wiz=hd']['subtype'] = 'nolink'; diff --git a/pandora_console/godmode/wizards/Applications.class.php b/pandora_console/godmode/wizards/Applications.class.php index 7bdbe13ee9..2c848d650d 100644 --- a/pandora_console/godmode/wizards/Applications.class.php +++ b/pandora_console/godmode/wizards/Applications.class.php @@ -76,7 +76,7 @@ class Applications extends Wizard $this->msg = $msg; $this->icon = $icon; $this->class = $class_style; - $this->label = $label; + $this->label = __($label); $this->page = $page; $this->url = ui_get_full_url( 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=app' diff --git a/pandora_console/godmode/wizards/Cloud.class.php b/pandora_console/godmode/wizards/Cloud.class.php index 62191efe3f..ecbe1d8178 100644 --- a/pandora_console/godmode/wizards/Cloud.class.php +++ b/pandora_console/godmode/wizards/Cloud.class.php @@ -97,7 +97,7 @@ class Cloud extends Wizard $this->task = []; $this->msg = $msg; $this->icon = $icon; - $this->label = $label; + $this->label = __($label); $this->page = $page; $this->url = ui_get_full_url( 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=cloud' diff --git a/pandora_console/godmode/wizards/HostDevices.class.php b/pandora_console/godmode/wizards/HostDevices.class.php index 5399020612..3679db253b 100755 --- a/pandora_console/godmode/wizards/HostDevices.class.php +++ b/pandora_console/godmode/wizards/HostDevices.class.php @@ -90,7 +90,7 @@ class HostDevices extends Wizard $this->task = []; $this->msg = $msg; $this->icon = $icon; - $this->label = $label; + $this->label = __($label); $this->page = $page; $this->url = ui_get_full_url( 'index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=hd' diff --git a/pandora_console/godmode/wizards/ManageExtensions.class.php b/pandora_console/godmode/wizards/ManageExtensions.class.php index deb2a4dbf5..648792224e 100644 --- a/pandora_console/godmode/wizards/ManageExtensions.class.php +++ b/pandora_console/godmode/wizards/ManageExtensions.class.php @@ -129,7 +129,7 @@ class ManageExtensions extends HTML { return [ 'icon' => $this->icon, - 'label' => $this->label, + 'label' => __($this->label), 'url' => $this->url, ]; diff --git a/pandora_console/include/lib/TacticalView/GeneralTacticalView.php b/pandora_console/include/lib/TacticalView/GeneralTacticalView.php index 02f60f8252..13fa6d54f0 100644 --- a/pandora_console/include/lib/TacticalView/GeneralTacticalView.php +++ b/pandora_console/include/lib/TacticalView/GeneralTacticalView.php @@ -228,29 +228,29 @@ class GeneralTacticalView if ($name !== '') { $emojiOptions = [ - 'have_good_day' => __('Have a good day %s ✌', $name), - 'welcome_back' => __('Welcome back! %s 👋', $name), - 'merry_christmas' => __('Welcome back! %s 🎅', $name), - 'good_morning' => __('Good morning, %s! ☕', $name), - 'good_evening' => __('Good evening, %s 🌇', $name), - 'good_night' => __('Good night, %s 🌕', $name), - 'happy_summer' => __('Happy summer, %s 🌞', $name), - 'happy_winter' => __('Happy winter, %s ⛄', $name), - 'happy_autumn' => __('Happy autumn, %s 🍂', $name), - 'happy_spring' => __('Happy spring, %s 🌻', $name), + 'have_good_day' => __('Have a good day %s', $name).' ✌', + 'welcome_back' => __('Welcome back! %s', $name).' 👋', + 'merry_christmas' => __('Welcome back! %s', $name).' 🎅', + 'good_morning' => __('Good morning, %s!', $name).' ☕', + 'good_evening' => __('Good evening, %s', $name).' 🌇', + 'good_night' => __('Good night, %s', $name).' 🌕', + 'happy_summer' => __('Happy summer, %s', $name).' 🌞', + 'happy_winter' => __('Happy winter, %s', $name).' ⛄', + 'happy_autumn' => __('Happy autumn, %s', $name).' 🍂', + 'happy_spring' => __('Happy spring, %s', $name).' 🌻', ]; } else { $emojiOptions = [ - 'have_good_day' => __('Have a good day ✌'), - 'welcome_back' => __('Welcome back! 👋'), - 'merry_christmas' => __('Welcome back! 🎅'), - 'good_morning' => __('Good morning! ☕'), - 'good_evening' => __('Good evening 🌇'), - 'good_night' => __('Good night 🌕'), - 'happy_summer' => __('Happy summer 🌞'), - 'happy_winter' => __('Happy winter ⛄'), - 'happy_autumn' => __('Happy autumn 🍂'), - 'happy_spring' => __('Happy spring 🌻'), + 'have_good_day' => __('Have a good day').' ✌', + 'welcome_back' => __('Welcome back!').' 👋', + 'merry_christmas' => __('Welcome back!').' 🎅', + 'good_morning' => __('Good morning!').' ☕', + 'good_evening' => __('Good evening').' 🌇', + 'good_night' => __('Good night').' 🌕', + 'happy_summer' => __('Happy summer').' 🌞', + 'happy_winter' => __('Happy winter').' ⛄', + 'happy_autumn' => __('Happy autumn').' 🍂', + 'happy_spring' => __('Happy spring').' 🌻', ]; } diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index 89101f5b64..7df609d59f 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -655,9 +655,17 @@ if (!empty($rows)) { $menu_operation['links']['sec2'] = ''; $menu_operation['links']['id'] = 'god-links'; + $traslations = [ + 'Get support' => __('Get support'), + 'Report a bug' => __('Report a bug'), + 'Suggest new feature' => __('Suggest new feature'), + ]; + $sub = []; foreach ($rows as $row) { - $sub[$row['link']]['text'] = __($row['name']); + $sub[$row['link']]['text'] = (empty($traslations[$row['name']]) === false) + ? $traslations[$row['name']] + : __($row['name']); $sub[$row['link']]['id'] = $row['name']; $sub[$row['link']]['type'] = 'direct'; $sub[$row['link']]['subtype'] = 'new_blank';