Use View::translate() instead of mt() and t() ...
This commit is contained in:
parent
f6ea02fec5
commit
48286e0d59
|
@ -4,7 +4,7 @@
|
|||
|
||||
<div class="content">
|
||||
<h1 tabindex="0" id="application-configuration">
|
||||
<?= t('Generic Configuration'); ?>
|
||||
<?= $this->translate('General Configuration'); ?>
|
||||
</h1>
|
||||
<?php if (isset($this->messageBox)): ?>
|
||||
<?= $this->messageBox->render() ?>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<div data-base-target="_next" class="content contacts">
|
||||
<?php
|
||||
if (count($contacts) === 0) {
|
||||
echo mt('monitoring', 'No contacts matching the filter');
|
||||
echo $this->translate('No contacts matching the filter');
|
||||
return;
|
||||
}
|
||||
foreach ($contacts as $contact): ?>
|
||||
|
@ -26,7 +26,7 @@
|
|||
) ?></div>
|
||||
<?php if ($contact->contact_pager): ?>
|
||||
<div>
|
||||
<?= mt('monitoring', 'Pager') ?>:
|
||||
<?= $this->translate('Pager') ?>:
|
||||
<?= $this->escape($contact->contact_pager) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
@ -34,13 +34,13 @@
|
|||
<div class="notification-periods">
|
||||
<?php if ($contact->contact_notify_service_timeperiod): ?>
|
||||
<div>
|
||||
<?= mt('monitoring', 'Service notification period') ?>:
|
||||
<?= $this->translate('Service notification period') ?>:
|
||||
<?= $this->escape($contact->contact_notify_service_timeperiod) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($contact->contact_notify_host_timeperiod): ?>
|
||||
<div>
|
||||
<?= mt('monitoring', 'Host notification period') ?>:
|
||||
<?= $this->translate('Host notification period') ?>:
|
||||
<?= $this->escape($contact->contact_notify_host_timeperiod) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -18,39 +18,39 @@ use Icinga\Web\Widget\Chart\HistoryColorGrid;
|
|||
|
||||
$settings = array(
|
||||
'cnt_up' => array(
|
||||
'tooltip' => mt('monitoring', '%d ok on %s'),
|
||||
'tooltip' => $this->translate('%d hosts ok on %s'),
|
||||
'color' => '#49DF96',
|
||||
'opacity' => '0.55'
|
||||
),
|
||||
'cnt_unreachable_hard' => array(
|
||||
'tooltip' => mt('monitoring', '%d unreachable on %s'),
|
||||
'tooltip' => $this->translate('%d hosts unreachable on %s'),
|
||||
'color' => '#77AAFF',
|
||||
'opacity' => '0.55'
|
||||
),
|
||||
'cnt_critical_hard' => array(
|
||||
'tooltip' => mt('monitoring', '%d critical on %s'),
|
||||
'tooltip' => $this->translate('%d services critical on %s'),
|
||||
'color' => '#ff5566',
|
||||
'opacity' => '0.9'
|
||||
),
|
||||
|
||||
'cnt_warning_hard' => array(
|
||||
'tooltip' => mt('monitoring', '%d warning on %s'),
|
||||
'tooltip' => $this->translate('%d services warning on %s'),
|
||||
'color' => '#ffaa44',
|
||||
'opacity' => '1.0'
|
||||
),
|
||||
|
||||
'cnt_down_hard' => array(
|
||||
'tooltip' => mt('monitoring', '%d down on %s'),
|
||||
'tooltip' => $this->translate('%d hosts down on %s'),
|
||||
'color' => '#ff5566',
|
||||
'opacity' => '0.9'
|
||||
),
|
||||
'cnt_unknown_hard' => array(
|
||||
'tooltip' => mt('monitoring', '%d unknown on %s'),
|
||||
'tooltip' => $this->translate('%d services unknown on %s'),
|
||||
'color' => '#cc77ff',
|
||||
'opacity' => '0.7'
|
||||
),
|
||||
'cnt_ok' => array(
|
||||
'tooltip' => mt('monitoring', '%d ok on %s'),
|
||||
'tooltip' => $this->translate('%d services ok on %s'),
|
||||
'color' => '#49DF96',
|
||||
'opacity' => '0.55'
|
||||
)
|
||||
|
@ -66,7 +66,7 @@ if ($to - $from > 315360000) {
|
|||
$data = array();
|
||||
|
||||
if (count($summary) === 0) {
|
||||
echo mt('monitoring', 'No state changes in the selected time period.');
|
||||
echo $this->translate('No state changes in the selected time period.');
|
||||
}
|
||||
foreach ($summary as $entry) {
|
||||
$day = $entry->day;
|
||||
|
|
|
@ -19,23 +19,23 @@
|
|||
</tr>
|
||||
<?php if ($contact->contact_email): ?>
|
||||
<tr>
|
||||
<th><?= mt('monitoring', 'Email') ?></th>
|
||||
<td><?= sprintf('<a href="mailto:%1$s">%1$s</a>', $this->escape($contact->contact_email)) ?></td>
|
||||
<th><?= $this->translate('Email') ?></th>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
<?php if ($contact->contact_pager): ?>
|
||||
<tr>
|
||||
<th><?= mt('monitoring', 'Pager') ?></th>
|
||||
<th><?= $this->translate('Pager') ?></th>
|
||||
<td><?= $this->escape($contact->contact_pager) ?></td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
<tr>
|
||||
<th><?= mt('monitoring', 'Hosts') ?></th>
|
||||
<th><?= $this->translate('Hosts') ?></th>
|
||||
<td><?= $this->escape($contactHelper->contactFlags($contact, 'host')) ?><br />
|
||||
<?= $this->escape($contact->contact_notify_host_timeperiod) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= mt('monitoring', 'Services') ?></th>
|
||||
<th><?= $this->translate('Services') ?></th>
|
||||
<td><?= $this->escape($contactHelper->contactFlags($contact, 'service')) ?><br />
|
||||
<?= $this->escape($contact->contact_notify_service_timeperiod) ?></td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue