Fix translation
Remove calls to deprecated translation function. Always use plural forms for commands in multi-view to indicate that this will cause multiple commands to be issued. refs #8565
This commit is contained in:
parent
5c71f5a8ef
commit
2591f055d8
|
@ -23,7 +23,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||||
<?= $this->icon('reschedule') ?>
|
<?= $this->icon('reschedule') ?>
|
||||||
<?= $this->translate('Commands') ?>
|
<?= $this->translate('Commands') ?>
|
||||||
</h3>
|
</h3>
|
||||||
<?= sprintf(t('Issue commands to all %d selected hosts:'), count($objects)) ?>
|
<?= sprintf($this->translate('Issue commands to all %d selected hosts:'), count($objects)) ?>
|
||||||
|
|
||||||
<?php if (($hostCount = count($objects)) === 0): ?>
|
<?php if (($hostCount = count($objects)) === 0): ?>
|
||||||
<?= $this->translate('No hosts matching the filter'); ?>
|
<?= $this->translate('No hosts matching the filter'); ?>
|
||||||
|
@ -36,7 +36,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<?= $this->qlink(
|
<?= $this->qlink(
|
||||||
$this->translate('Reschedule the next check'),
|
$this->translate('Reschedule next checks'),
|
||||||
$rescheduleAllLink,
|
$rescheduleAllLink,
|
||||||
null,
|
null,
|
||||||
array('icon' => 'reschedule')
|
array('icon' => 'reschedule')
|
||||||
|
@ -45,7 +45,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<?= $this->qlink(
|
<?= $this->qlink(
|
||||||
$this->translate('Schedule a downtime'),
|
$this->translate('Schedule downtimes'),
|
||||||
$downtimeAllLink,
|
$downtimeAllLink,
|
||||||
null,
|
null,
|
||||||
array('icon' => 'plug')
|
array('icon' => 'plug')
|
||||||
|
@ -54,7 +54,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<?= $this->qlink(
|
<?= $this->qlink(
|
||||||
$this->translate('Submit a passive check result'),
|
$this->translate('Submit passive check results'),
|
||||||
$processCheckResultAllLink,
|
$processCheckResultAllLink,
|
||||||
null,
|
null,
|
||||||
array('icon' => 'reply')
|
array('icon' => 'reply')
|
||||||
|
@ -63,7 +63,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<?= $this->qlink(
|
<?= $this->qlink(
|
||||||
$this->translate('Add a comment'),
|
$this->translate('Add comments'),
|
||||||
$addCommentLink,
|
$addCommentLink,
|
||||||
null,
|
null,
|
||||||
array('icon' => 'comment')
|
array('icon' => 'comment')
|
||||||
|
@ -85,7 +85,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<?= sprintf(
|
<?= sprintf(
|
||||||
t('There are %s unhandled problems. Issue commands to the problematic hosts:'),
|
$this->translate('There are %s unhandled problems. Issue commands to the problematic hosts:'),
|
||||||
'<span class="badge badge-critical">' . $unhandledCount . '</span>'
|
'<span class="badge badge-critical">' . $unhandledCount . '</span>'
|
||||||
) ?>
|
) ?>
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||||
|
|
||||||
<?php if (($inDowntimeCount = count($objectsInDowntime)) > 0): ?>
|
<?php if (($inDowntimeCount = count($objectsInDowntime)) > 0): ?>
|
||||||
|
|
||||||
<h3><?= $this->translate('Downtimes') ?></h3>
|
<h3><?= $this->icon('plug', $this->translate('Downtimes'))?> <?=$this->translate('Downtimes')?></h3>
|
||||||
<p><?= sprintf(
|
<p><?= sprintf(
|
||||||
$this->translatePlural(
|
$this->translatePlural(
|
||||||
'%u Host currently in downtime.',
|
'%u Host currently in downtime.',
|
||||||
|
@ -161,7 +161,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<?php if (($commentCount = count($objects->getComments())) > 0): ?>
|
<?php if (($commentCount = count($objects->getComments())) > 0): ?>
|
||||||
<h3> <?= $this->translate('Comments') ?></h3>
|
<h3> <?= $this->icon('comment', $this->translate('Comments'))?> <?=$this->translate('Comments') ?></h3>
|
||||||
<p>
|
<p>
|
||||||
<?= sprintf(
|
<?= sprintf(
|
||||||
$this->translatePlural(
|
$this->translatePlural(
|
||||||
|
|
|
@ -74,7 +74,7 @@ $hiddenRich = array();
|
||||||
<td>
|
<td>
|
||||||
<div class="selection-info" data-title-rich="<span align='left'><?= join('<br>', $hiddenRich) ?></span>"
|
<div class="selection-info" data-title-rich="<span align='left'><?= join('<br>', $hiddenRich) ?></span>"
|
||||||
title="<?= join(', ', $hidden) ?>">
|
title="<?= join(', ', $hidden) ?>">
|
||||||
<?= sprintf(t('%d more ...'), count($hidden)) ?>
|
<?= sprintf($this->translate('%d more ...'), count($hidden)) ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -34,7 +34,9 @@ use Icinga\Web\Url;
|
||||||
|
|
||||||
<tr class="state <?= Service::getStateText($service->service_state); ?><?= $service->service_handled ? ' handled' : '' ?>">
|
<tr class="state <?= Service::getStateText($service->service_state); ?><?= $service->service_handled ? ' handled' : '' ?>">
|
||||||
<td class="state"><?= Service::getStateText($service->service_state, true); ?><br /></td>
|
<td class="state"><?= Service::getStateText($service->service_state, true); ?><br /></td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
<?php if (!$service->service_handled && $service->service_state > 0): ?>
|
<?php if (!$service->service_handled && $service->service_state > 0): ?>
|
||||||
<?= $this->icon('attention-alt', $this->translate('Unhandled')) ?>
|
<?= $this->icon('attention-alt', $this->translate('Unhandled')) ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
@ -60,6 +62,7 @@ use Icinga\Web\Url;
|
||||||
<?php if (isset($service->service_last_comment) && $service->service_last_comment !== null): ?>
|
<?php if (isset($service->service_last_comment) && $service->service_last_comment !== null): ?>
|
||||||
<?= $this->icon('comment', $this->translate('Last Comment: ') . $service->service_last_comment) ?>
|
<?= $this->icon('comment', $this->translate('Last Comment: ') . $service->service_last_comment) ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td class="name oneline"><?= $this->escape($service->getName()); ?></td>
|
<td class="name oneline"><?= $this->escape($service->getName()); ?></td>
|
||||||
<td class="name oneline"><?= $this->escape($service->getHost()->getName()); ?></b></td>
|
<td class="name oneline"><?= $this->escape($service->getHost()->getName()); ?></b></td>
|
||||||
|
@ -72,7 +75,7 @@ use Icinga\Web\Url;
|
||||||
<td class="state">
|
<td class="state">
|
||||||
<div data-title-rich="<span align='left'><?= join('<br>', $hiddenRich) ?></span>"
|
<div data-title-rich="<span align='left'><?= join('<br>', $hiddenRich) ?></span>"
|
||||||
title="<?= join(', ', $hidden) ?>">
|
title="<?= join(', ', $hidden) ?>">
|
||||||
<?= sprintf(t('%d more ...'), count($hidden)) ?>
|
<?= sprintf($this->translate('%d more ...'), count($hidden)) ?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -21,7 +21,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||||
<?php if (($serviceCount = count($objects)) === 0): ?>
|
<?php if (($serviceCount = count($objects)) === 0): ?>
|
||||||
<?= $this->translate('No services matching the filter'); ?>
|
<?= $this->translate('No services matching the filter'); ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?= sprintf(t('Issue commands to all %d selected services:'), count($objects)) ?>
|
<?= sprintf($this->translate('Issue commands to all %d selected services:'), count($objects)) ?>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<div>
|
<div>
|
||||||
|
@ -30,7 +30,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<?= $this->qlink(
|
<?= $this->qlink(
|
||||||
$this->translate('Reschedule the next check'),
|
$this->translate('Reschedule next checks'),
|
||||||
$rescheduleAllLink,
|
$rescheduleAllLink,
|
||||||
null,
|
null,
|
||||||
array('icon' => 'reschedule')
|
array('icon' => 'reschedule')
|
||||||
|
@ -39,7 +39,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<?= $this->qlink(
|
<?= $this->qlink(
|
||||||
$this->translate('Schedule a downtime'),
|
$this->translate('Schedule downtimes'),
|
||||||
$downtimeAllLink,
|
$downtimeAllLink,
|
||||||
null,
|
null,
|
||||||
array('icon' => 'plug')
|
array('icon' => 'plug')
|
||||||
|
@ -48,7 +48,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<?= $this->qlink(
|
<?= $this->qlink(
|
||||||
$this->translate('Submit a passive check result'),
|
$this->translate('Submit passive check results'),
|
||||||
$processCheckResultAllLink,
|
$processCheckResultAllLink,
|
||||||
null,
|
null,
|
||||||
array('icon' => 'reply')
|
array('icon' => 'reply')
|
||||||
|
@ -57,7 +57,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<?= $this->qlink(
|
<?= $this->qlink(
|
||||||
$this->translate('Add a comment'),
|
$this->translate('Add comments'),
|
||||||
$addCommentLink,
|
$addCommentLink,
|
||||||
null,
|
null,
|
||||||
array('icon' => 'comment')
|
array('icon' => 'comment')
|
||||||
|
@ -76,7 +76,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||||
) ?>
|
) ?>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<p><?= sprintf(t('There are %s unhandled problems. ' .
|
<p><?= sprintf($this->translate('There are %s unhandled problems. ' .
|
||||||
'Issue commands to the problematic services:'),
|
'Issue commands to the problematic services:'),
|
||||||
'<span class="badge badge-critical">' . $unhandledCount . '</span>') ?>
|
'<span class="badge badge-critical">' . $unhandledCount . '</span>') ?>
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
|
||||||
|
|
||||||
<?php $commentCount = count($objects->getComments()) ?>
|
<?php $commentCount = count($objects->getComments()) ?>
|
||||||
<?php if ($commentCount > 0): ?>
|
<?php if ($commentCount > 0): ?>
|
||||||
<h3> <?= $this->icon('comment') ?> <?= t('Comments') ?> </h3>
|
<h3> <?= $this->icon('comment') ?> <?= $this->translate('Comments') ?> </h3>
|
||||||
<p><?= sprintf(
|
<p><?= sprintf(
|
||||||
$this->translatePlural(
|
$this->translatePlural(
|
||||||
'There is %d comment.',
|
'There is %d comment.',
|
||||||
|
|
Loading…
Reference in New Issue