From 8d8b65473a87e7556737adfa9b4c2ea7119ba46c Mon Sep 17 00:00:00 2001 From: Carlos Cesario Date: Wed, 3 Dec 2014 10:00:54 +0100 Subject: [PATCH] Add translation to some strings Thank you Carlos. resolves #7787 Signed-off-by: Eric Lippmann --- application/controllers/ConfigController.php | 2 +- application/views/scripts/config/module.phtml | 16 +++++++-------- .../views/scripts/config/modules.phtml | 2 +- .../controllers/AlertsummaryController.php | 2 +- .../controllers/ListController.php | 20 +++++++++---------- .../controllers/ShowController.php | 8 ++++---- .../Controller/MonitoredObjectController.php | 8 ++++---- 7 files changed, 29 insertions(+), 29 deletions(-) diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php index 031423ff2..15ba0a6ff 100644 --- a/application/controllers/ConfigController.php +++ b/application/controllers/ConfigController.php @@ -62,7 +62,7 @@ class ConfigController extends ActionController public function modulesAction() { $this->view->tabs = Widget::create('tabs')->add('modules', array( - 'title' => 'Modules', + 'title' => $this->translate('Modules'), 'url' => 'config/modules' )); diff --git a/application/views/scripts/config/module.phtml b/application/views/scripts/config/module.phtml index b7f6bf346..cd6ad5af8 100644 --- a/application/views/scripts/config/module.phtml +++ b/application/views/scripts/config/module.phtml @@ -15,31 +15,31 @@ $state = $moduleData->enabled ? ($moduleData->loaded ? 'enabled' : 'failed') : ' ?> - + - + - + - + - + @@ -59,7 +59,7 @@ else: foreach ($dependencies as $name => $versionString): ?> - + diff --git a/application/views/scripts/config/modules.phtml b/application/views/scripts/config/modules.phtml index 95c9fa731..ed5a2426c 100644 --- a/application/views/scripts/config/modules.phtml +++ b/application/views/scripts/config/modules.phtml @@ -19,7 +19,7 @@ 'config/module/', array('name' => $module->name) ) ?>">escape($module->name); ?> (enabled ? ($module->loaded ? 'enabled' : 'failed') : 'disabled' + $module->enabled ? ($module->loaded ? $this->translate('enabled') : $this->translate('failed')) : $this->translate('disabled') ?>) diff --git a/modules/monitoring/application/controllers/AlertsummaryController.php b/modules/monitoring/application/controllers/AlertsummaryController.php index 8fd70627d..75f0fc1fe 100644 --- a/modules/monitoring/application/controllers/AlertsummaryController.php +++ b/modules/monitoring/application/controllers/AlertsummaryController.php @@ -64,7 +64,7 @@ class Monitoring_AlertsummaryController extends Controller */ public function indexAction() { - $this->addTitleTab('alertsummary', t('Alert Summary')); + $this->addTitleTab('alertsummary', $this->translate('Alert Summary')); $this->view->intervalBox = $this->createIntervalBox(); $this->view->recentAlerts = $this->createRecentAlerts(); $this->view->interval = $this->getInterval(); diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index 1a37c6ee5..2f0c7b391 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -107,7 +107,7 @@ class Monitoring_ListController extends Controller $stateChangeColumn = 'host_last_state_change'; } - $this->addTitleTab('hosts'); + $this->addTitleTab('hosts', $this->translate('Hosts')); $this->setAutorefreshInterval(10); $query = $this->backend->select()->from('hostStatus', array_merge(array( 'host_icon_image', @@ -181,7 +181,7 @@ class Monitoring_ListController extends Controller $stateType = 'soft'; } - $this->addTitleTab('services'); + $this->addTitleTab('services', $this->translate('Services')); $this->view->showHost = true; if ($host = $this->_getParam('host')) { if (strpos($host, '*') === false) { @@ -276,7 +276,7 @@ class Monitoring_ListController extends Controller if ($url = $this->hasBetterUrl()) { return $this->redirectNow($url); } - $this->addTitleTab('downtimes'); + $this->addTitleTab('downtimes', $this->translate('Downtimes')); $this->setAutorefreshInterval(12); $query = $this->backend->select()->from('downtime', array( 'id' => 'downtime_internal_id', @@ -325,7 +325,7 @@ class Monitoring_ListController extends Controller if ($url = $this->hasBetterUrl()) { return $this->redirectNow($url); } - $this->addTitleTab('notifications'); + $this->addTitleTab('notifications', $this->translate('Notifications')); $this->setAutorefreshInterval(15); $query = $this->backend->select()->from('notification', array( 'host', @@ -347,7 +347,7 @@ class Monitoring_ListController extends Controller if ($url = $this->hasBetterUrl()) { return $this->redirectNow($url); } - $this->addTitleTab('contacts'); + $this->addTitleTab('contacts', $this->translate('Contacts')); $query = $this->backend->select()->from('contact', array( 'contact_name', 'contact_id', @@ -386,7 +386,7 @@ class Monitoring_ListController extends Controller if ($url = $this->hasBetterUrl()) { return $this->redirectNow($url); } - $this->addTitleTab('eventgrid', t('Event Grid')); + $this->addTitleTab('eventgrid', $this->translate('Event Grid')); $form = new StatehistoryForm(); $form->setEnctype(Zend_Form::ENCTYPE_URLENCODED); @@ -427,7 +427,7 @@ class Monitoring_ListController extends Controller if ($url = $this->hasBetterUrl()) { return $this->redirectNow($url); } - $this->addTitleTab('contactgroups'); + $this->addTitleTab('contactgroups', $this->translate('Contact Groups')); $query = $this->backend->select()->from('contactgroup', array( 'contactgroup_name', 'contactgroup_alias', @@ -459,7 +459,7 @@ class Monitoring_ListController extends Controller if ($url = $this->hasBetterUrl()) { return $this->redirectNow($url); } - $this->addTitleTab('comments'); + $this->addTitleTab('comments', $this->translate('Comments')); $this->setAutorefreshInterval(12); $query = $this->backend->select()->from('comment', array( 'id' => 'comment_internal_id', @@ -492,7 +492,7 @@ class Monitoring_ListController extends Controller if ($url = $this->hasBetterUrl()) { return $this->redirectNow($url); } - $this->addTitleTab('servicegroups'); + $this->addTitleTab('servicegroups', $this->translate('Service Groups')); $this->setAutorefreshInterval(12); $query = $this->backend->select()->from('groupsummary', array( 'servicegroup', @@ -539,7 +539,7 @@ class Monitoring_ListController extends Controller if ($url = $this->hasBetterUrl()) { return $this->redirectNow($url); } - $this->addTitleTab('hostgroups'); + $this->addTitleTab('hostgroups', $this->translate('Host Groups')); $this->setAutorefreshInterval(12); $query = $this->backend->select()->from('groupsummary', array( 'hostgroup', diff --git a/modules/monitoring/application/controllers/ShowController.php b/modules/monitoring/application/controllers/ShowController.php index e42a7e046..efec6665a 100644 --- a/modules/monitoring/application/controllers/ShowController.php +++ b/modules/monitoring/application/controllers/ShowController.php @@ -202,7 +202,7 @@ class Monitoring_ShowController extends Controller $tabs->add( 'host', array( - 'title' => 'Host', + 'title' => $this->translate('Host'), 'icon' => 'host', 'url' => 'monitoring/show/host', 'urlParams' => $params, @@ -212,7 +212,7 @@ class Monitoring_ShowController extends Controller $tabs->add( 'service', array( - 'title' => 'Service', + 'title' => $this->translate('Service'), 'icon' => 'service', 'url' => 'monitoring/show/service', 'urlParams' => $params, @@ -222,7 +222,7 @@ class Monitoring_ShowController extends Controller $tabs->add( 'services', array( - 'title' => 'Services', + 'title' => $this->translate('Services'), 'icon' => 'services', 'url' => 'monitoring/show/services', 'urlParams' => $params, @@ -232,7 +232,7 @@ class Monitoring_ShowController extends Controller $tabs->add( 'history', array( - 'title' => 'History', + 'title' => $this->translate('History'), 'icon' => 'rewind', 'url' => 'monitoring/show/history', 'urlParams' => $params, diff --git a/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php b/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php index 06ef5c7ce..7ee73d575 100644 --- a/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php +++ b/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php @@ -186,7 +186,7 @@ abstract class MonitoredObjectController extends Controller $tabs->add( 'host', array( - 'title' => 'Host', + 'title' => $this->translate('Host'), 'icon' => 'host', 'url' => 'monitoring/host/show', 'urlParams' => $params @@ -196,7 +196,7 @@ abstract class MonitoredObjectController extends Controller $tabs->add( 'service', array( - 'title' => 'Service', + 'title' => $this->translate('Service'), 'icon' => 'service', 'url' => 'monitoring/service/show', 'urlParams' => $params @@ -206,7 +206,7 @@ abstract class MonitoredObjectController extends Controller $tabs->add( 'services', array( - 'title' => 'Services', + 'title' => $this->translate('Services'), 'icon' => 'services', 'url' => 'monitoring/show/services', 'urlParams' => $params @@ -216,7 +216,7 @@ abstract class MonitoredObjectController extends Controller $tabs->add( 'history', array( - 'title' => 'History', + 'title' => $this->translate('History'), 'icon' => 'rewind', 'url' => 'monitoring/show/history', 'urlParams' => $params
escape('Name') ?>escape($this->translate('Name')) ?> escape($module->getName()) ?>
translate('State') ?> - qlink('disable', 'config/moduledisable', array( + qlink($this->translate('disable'), 'config/moduledisable', array( 'name' => $module->getName() )) ?> - qlink('enable', 'config/moduleenable', array( + qlink($this->translate('enable'), 'config/moduleenable', array( 'name' => $module->getName() )) ?>
escape('Version') ?>escape($this->translate('Version')) ?> escape($module->getVersion()) ?>
escape('Description') ?>escape($this->translate('Description')) ?> escape($module->getDescription())) ?>
escape('Dependencies') ?>escape($this->translate('Dependencies')) ?> $versionString): ?>
escape('Permissions') ?>escape($this->translate('Permissions')) ?> escape($permission->name) ?>: escape($permission->description) ?>
escape('Restrictions') ?>escape($this->translate('Restrictions')) ?> escape($restriction->name) ?>: escape($restriction->description) ?>