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()
{
$this->view->tabs = Widget::create('tabs')->add('modules', array(
'title' => 'Modules',
'title' => $this->translate('Modules'),
'url' => 'config/modules'
));

View File

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

View File

@ -19,7 +19,7 @@
'config/module/',
array('name' => $module->name)
) ?>"><?= $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>
</tr>

View File

@ -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();

View File

@ -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',

View File

@ -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,

View File

@ -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