Add translation to some strings

Thank you Carlos.

resolves #7787

Signed-off-by: Eric Lippmann <eric.lippmann@netways.de>
This commit is contained in:
Carlos Cesario 2014-12-03 10:00:54 +01:00 committed by Eric Lippmann
parent 8150cd7877
commit 8d8b65473a
7 changed files with 29 additions and 29 deletions

View File

@ -62,7 +62,7 @@ class ConfigController extends ActionController
public function modulesAction() public function modulesAction()
{ {
$this->view->tabs = Widget::create('tabs')->add('modules', array( $this->view->tabs = Widget::create('tabs')->add('modules', array(
'title' => 'Modules', 'title' => $this->translate('Modules'),
'url' => 'config/modules' 'url' => 'config/modules'
)); ));

View File

@ -15,31 +15,31 @@ $state = $moduleData->enabled ? ($moduleData->loaded ? 'enabled' : 'failed') : '
?> ?>
<table class="avp"> <table class="avp">
<tr> <tr>
<th><?= $this->escape('Name') ?></th> <th><?= $this->escape($this->translate('Name')) ?></th>
<td><?= $this->escape($module->getName()) ?></td> <td><?= $this->escape($module->getName()) ?></td>
</tr> </tr>
<tr> <tr>
<th><?= $this->translate('State') ?></th> <th><?= $this->translate('State') ?></th>
<td><?= $state ?><?php if ($state === 'enabled'): ?> <td><?= $state ?><?php if ($state === 'enabled'): ?>
<?= $this->qlink('disable', 'config/moduledisable', array( <?= $this->qlink($this->translate('disable'), 'config/moduledisable', array(
'name' => $module->getName() 'name' => $module->getName()
)) ?> )) ?>
<?php endif ?> <?php endif ?>
<?php if ($state === 'disabled'): ?> <?php if ($state === 'disabled'): ?>
<?= $this->qlink('enable', 'config/moduleenable', array( <?= $this->qlink($this->translate('enable'), 'config/moduleenable', array(
'name' => $module->getName() 'name' => $module->getName()
)) ?> )) ?>
<?php endif ?> <?php endif ?>
</td> </td>
<tr> <tr>
<th><?= $this->escape('Version') ?></th> <th><?= $this->escape($this->translate('Version')) ?></th>
<td><?= $this->escape($module->getVersion()) ?></td></tr> <td><?= $this->escape($module->getVersion()) ?></td></tr>
<tr> <tr>
<th><?= $this->escape('Description') ?></th> <th><?= $this->escape($this->translate('Description')) ?></th>
<td><?= nl2br($this->escape($module->getDescription())) ?></td> <td><?= nl2br($this->escape($module->getDescription())) ?></td>
</tr> </tr>
<tr> <tr>
<th><?= $this->escape('Dependencies') ?></th> <th><?= $this->escape($this->translate('Dependencies')) ?></th>
<td><?php <td><?php
if (empty($dependencies)): if (empty($dependencies)):
@ -51,7 +51,7 @@ else: foreach ($dependencies as $name => $versionString): ?>
</tr> </tr>
<?php if (! empty($permissions)): ?> <?php if (! empty($permissions)): ?>
<tr> <tr>
<th><?= $this->escape('Permissions') ?></th> <th><?= $this->escape($this->translate('Permissions')) ?></th>
<td><?php foreach ($permissions as $permission): ?> <td><?php foreach ($permissions as $permission): ?>
<strong><?= $this->escape($permission->name) ?></strong>: <?= $this->escape($permission->description) ?><br /> <strong><?= $this->escape($permission->name) ?></strong>: <?= $this->escape($permission->description) ?><br />
<?php endforeach ?></td> <?php endforeach ?></td>
@ -59,7 +59,7 @@ else: foreach ($dependencies as $name => $versionString): ?>
<?php endif ?> <?php endif ?>
<?php if (! empty($restrictions)): ?> <?php if (! empty($restrictions)): ?>
<tr> <tr>
<th><?= $this->escape('Restrictions') ?></th> <th><?= $this->escape($this->translate('Restrictions')) ?></th>
<td><?php foreach ($restrictions as $restriction): ?> <td><?php foreach ($restrictions as $restriction): ?>
<strong><?= $this->escape($restriction->name) ?></strong>: <?= $this->escape($restriction->description) ?><br /> <strong><?= $this->escape($restriction->name) ?></strong>: <?= $this->escape($restriction->description) ?><br />
<?php endforeach ?></td> <?php endforeach ?></td>

View File

@ -19,7 +19,7 @@
'config/module/', 'config/module/',
array('name' => $module->name) array('name' => $module->name)
) ?>"><?= $this->escape($module->name); ?></a> (<?= ) ?>"><?= $this->escape($module->name); ?></a> (<?=
$module->enabled ? ($module->loaded ? 'enabled' : 'failed') : 'disabled' $module->enabled ? ($module->loaded ? $this->translate('enabled') : $this->translate('failed')) : $this->translate('disabled')
?>) ?>)
</td> </td>
</tr> </tr>

View File

@ -64,7 +64,7 @@ class Monitoring_AlertsummaryController extends Controller
*/ */
public function indexAction() public function indexAction()
{ {
$this->addTitleTab('alertsummary', t('Alert Summary')); $this->addTitleTab('alertsummary', $this->translate('Alert Summary'));
$this->view->intervalBox = $this->createIntervalBox(); $this->view->intervalBox = $this->createIntervalBox();
$this->view->recentAlerts = $this->createRecentAlerts(); $this->view->recentAlerts = $this->createRecentAlerts();
$this->view->interval = $this->getInterval(); $this->view->interval = $this->getInterval();

View File

@ -107,7 +107,7 @@ class Monitoring_ListController extends Controller
$stateChangeColumn = 'host_last_state_change'; $stateChangeColumn = 'host_last_state_change';
} }
$this->addTitleTab('hosts'); $this->addTitleTab('hosts', $this->translate('Hosts'));
$this->setAutorefreshInterval(10); $this->setAutorefreshInterval(10);
$query = $this->backend->select()->from('hostStatus', array_merge(array( $query = $this->backend->select()->from('hostStatus', array_merge(array(
'host_icon_image', 'host_icon_image',
@ -181,7 +181,7 @@ class Monitoring_ListController extends Controller
$stateType = 'soft'; $stateType = 'soft';
} }
$this->addTitleTab('services'); $this->addTitleTab('services', $this->translate('Services'));
$this->view->showHost = true; $this->view->showHost = true;
if ($host = $this->_getParam('host')) { if ($host = $this->_getParam('host')) {
if (strpos($host, '*') === false) { if (strpos($host, '*') === false) {
@ -276,7 +276,7 @@ class Monitoring_ListController extends Controller
if ($url = $this->hasBetterUrl()) { if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url); return $this->redirectNow($url);
} }
$this->addTitleTab('downtimes'); $this->addTitleTab('downtimes', $this->translate('Downtimes'));
$this->setAutorefreshInterval(12); $this->setAutorefreshInterval(12);
$query = $this->backend->select()->from('downtime', array( $query = $this->backend->select()->from('downtime', array(
'id' => 'downtime_internal_id', 'id' => 'downtime_internal_id',
@ -325,7 +325,7 @@ class Monitoring_ListController extends Controller
if ($url = $this->hasBetterUrl()) { if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url); return $this->redirectNow($url);
} }
$this->addTitleTab('notifications'); $this->addTitleTab('notifications', $this->translate('Notifications'));
$this->setAutorefreshInterval(15); $this->setAutorefreshInterval(15);
$query = $this->backend->select()->from('notification', array( $query = $this->backend->select()->from('notification', array(
'host', 'host',
@ -347,7 +347,7 @@ class Monitoring_ListController extends Controller
if ($url = $this->hasBetterUrl()) { if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url); return $this->redirectNow($url);
} }
$this->addTitleTab('contacts'); $this->addTitleTab('contacts', $this->translate('Contacts'));
$query = $this->backend->select()->from('contact', array( $query = $this->backend->select()->from('contact', array(
'contact_name', 'contact_name',
'contact_id', 'contact_id',
@ -386,7 +386,7 @@ class Monitoring_ListController extends Controller
if ($url = $this->hasBetterUrl()) { if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url); return $this->redirectNow($url);
} }
$this->addTitleTab('eventgrid', t('Event Grid')); $this->addTitleTab('eventgrid', $this->translate('Event Grid'));
$form = new StatehistoryForm(); $form = new StatehistoryForm();
$form->setEnctype(Zend_Form::ENCTYPE_URLENCODED); $form->setEnctype(Zend_Form::ENCTYPE_URLENCODED);
@ -427,7 +427,7 @@ class Monitoring_ListController extends Controller
if ($url = $this->hasBetterUrl()) { if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url); return $this->redirectNow($url);
} }
$this->addTitleTab('contactgroups'); $this->addTitleTab('contactgroups', $this->translate('Contact Groups'));
$query = $this->backend->select()->from('contactgroup', array( $query = $this->backend->select()->from('contactgroup', array(
'contactgroup_name', 'contactgroup_name',
'contactgroup_alias', 'contactgroup_alias',
@ -459,7 +459,7 @@ class Monitoring_ListController extends Controller
if ($url = $this->hasBetterUrl()) { if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url); return $this->redirectNow($url);
} }
$this->addTitleTab('comments'); $this->addTitleTab('comments', $this->translate('Comments'));
$this->setAutorefreshInterval(12); $this->setAutorefreshInterval(12);
$query = $this->backend->select()->from('comment', array( $query = $this->backend->select()->from('comment', array(
'id' => 'comment_internal_id', 'id' => 'comment_internal_id',
@ -492,7 +492,7 @@ class Monitoring_ListController extends Controller
if ($url = $this->hasBetterUrl()) { if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url); return $this->redirectNow($url);
} }
$this->addTitleTab('servicegroups'); $this->addTitleTab('servicegroups', $this->translate('Service Groups'));
$this->setAutorefreshInterval(12); $this->setAutorefreshInterval(12);
$query = $this->backend->select()->from('groupsummary', array( $query = $this->backend->select()->from('groupsummary', array(
'servicegroup', 'servicegroup',
@ -539,7 +539,7 @@ class Monitoring_ListController extends Controller
if ($url = $this->hasBetterUrl()) { if ($url = $this->hasBetterUrl()) {
return $this->redirectNow($url); return $this->redirectNow($url);
} }
$this->addTitleTab('hostgroups'); $this->addTitleTab('hostgroups', $this->translate('Host Groups'));
$this->setAutorefreshInterval(12); $this->setAutorefreshInterval(12);
$query = $this->backend->select()->from('groupsummary', array( $query = $this->backend->select()->from('groupsummary', array(
'hostgroup', 'hostgroup',

View File

@ -202,7 +202,7 @@ class Monitoring_ShowController extends Controller
$tabs->add( $tabs->add(
'host', 'host',
array( array(
'title' => 'Host', 'title' => $this->translate('Host'),
'icon' => 'host', 'icon' => 'host',
'url' => 'monitoring/show/host', 'url' => 'monitoring/show/host',
'urlParams' => $params, 'urlParams' => $params,
@ -212,7 +212,7 @@ class Monitoring_ShowController extends Controller
$tabs->add( $tabs->add(
'service', 'service',
array( array(
'title' => 'Service', 'title' => $this->translate('Service'),
'icon' => 'service', 'icon' => 'service',
'url' => 'monitoring/show/service', 'url' => 'monitoring/show/service',
'urlParams' => $params, 'urlParams' => $params,
@ -222,7 +222,7 @@ class Monitoring_ShowController extends Controller
$tabs->add( $tabs->add(
'services', 'services',
array( array(
'title' => 'Services', 'title' => $this->translate('Services'),
'icon' => 'services', 'icon' => 'services',
'url' => 'monitoring/show/services', 'url' => 'monitoring/show/services',
'urlParams' => $params, 'urlParams' => $params,
@ -232,7 +232,7 @@ class Monitoring_ShowController extends Controller
$tabs->add( $tabs->add(
'history', 'history',
array( array(
'title' => 'History', 'title' => $this->translate('History'),
'icon' => 'rewind', 'icon' => 'rewind',
'url' => 'monitoring/show/history', 'url' => 'monitoring/show/history',
'urlParams' => $params, 'urlParams' => $params,

View File

@ -186,7 +186,7 @@ abstract class MonitoredObjectController extends Controller
$tabs->add( $tabs->add(
'host', 'host',
array( array(
'title' => 'Host', 'title' => $this->translate('Host'),
'icon' => 'host', 'icon' => 'host',
'url' => 'monitoring/host/show', 'url' => 'monitoring/host/show',
'urlParams' => $params 'urlParams' => $params
@ -196,7 +196,7 @@ abstract class MonitoredObjectController extends Controller
$tabs->add( $tabs->add(
'service', 'service',
array( array(
'title' => 'Service', 'title' => $this->translate('Service'),
'icon' => 'service', 'icon' => 'service',
'url' => 'monitoring/service/show', 'url' => 'monitoring/service/show',
'urlParams' => $params 'urlParams' => $params
@ -206,7 +206,7 @@ abstract class MonitoredObjectController extends Controller
$tabs->add( $tabs->add(
'services', 'services',
array( array(
'title' => 'Services', 'title' => $this->translate('Services'),
'icon' => 'services', 'icon' => 'services',
'url' => 'monitoring/show/services', 'url' => 'monitoring/show/services',
'urlParams' => $params 'urlParams' => $params
@ -216,7 +216,7 @@ abstract class MonitoredObjectController extends Controller
$tabs->add( $tabs->add(
'history', 'history',
array( array(
'title' => 'History', 'title' => $this->translate('History'),
'icon' => 'rewind', 'icon' => 'rewind',
'url' => 'monitoring/show/history', 'url' => 'monitoring/show/history',
'urlParams' => $params 'urlParams' => $params