Improve plural string translation
Improve plural translation for some statements refs #8000
This commit is contained in:
parent
f0b470870a
commit
571df0a5ab
|
@ -7,7 +7,7 @@ $currentUrl = Url::fromRequest()->without('limit')->getRelativeUrl();
|
||||||
?>
|
?>
|
||||||
<h1 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
|
<h1 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
|
||||||
<?php if ($object->stats->services_total > 0): ?>
|
<?php if ($object->stats->services_total > 0): ?>
|
||||||
<?= $this->qlink(sprintf($this->translate('%s configured services:'), $object->stats->services_total), $selfUrl) ?>
|
<?= $this->qlink(sprintf($this->translatePlural('%d configured service:', '%d configured services:', $object->stats->services_total), $object->stats->services_total), $selfUrl) ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?= $this->translate('No services configured on this host'); ?>
|
<?= $this->translate('No services configured on this host'); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
'monitoring/list/hosts',
|
'monitoring/list/hosts',
|
||||||
array('host_active_checks_enabled' => 1)
|
array('host_active_checks_enabled' => 1)
|
||||||
); ?>">
|
); ?>">
|
||||||
<?= $this->statusSummary->hosts_active . ' ' . $this->translate('Active'); ?>
|
<?= sprintf($this->translatePlural('%d Active', '%d Active', $this->statusSummary->hosts_active), $this->statusSummary->hosts_active); ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
'monitoring/list/hosts',
|
'monitoring/list/hosts',
|
||||||
array('host_active_checks_enabled' => 0, 'host_passive_checks_enabled' => 1)
|
array('host_active_checks_enabled' => 0, 'host_passive_checks_enabled' => 1)
|
||||||
); ?>">
|
); ?>">
|
||||||
<?= $this->statusSummary->hosts_passive . ' ' . $this->translate('Passive'); ?>
|
<?= sprintf($this->translatePlural('%d Passive', '%d Passive', $this->statusSummary->hosts_passive), $this->statusSummary->hosts_passive); ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
'monitoring/list/hosts',
|
'monitoring/list/hosts',
|
||||||
array('host_active_checks_enabled' => 0, 'host_passive_checks_enabled' => 0)
|
array('host_active_checks_enabled' => 0, 'host_passive_checks_enabled' => 0)
|
||||||
); ?>" style="color: red;">
|
); ?>" style="color: red;">
|
||||||
<?= $this->statusSummary->hosts_not_checked . ' ' . $this->translate('Disabled'); ?>
|
<?= sprintf($this->translatePlural('%d Disabled', '%d Disabled', $this->statusSummary->hosts_not_checked), $this->statusSummary->hosts_not_checked); ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
'monitoring/list/services',
|
'monitoring/list/services',
|
||||||
array('service_active_checks_enabled' => 1)
|
array('service_active_checks_enabled' => 1)
|
||||||
); ?>">
|
); ?>">
|
||||||
<?= $this->statusSummary->services_active . ' ' . $this->translate('Active'); ?>
|
<?= sprintf($this->translatePlural('%d Active', '%d Active', $this->statusSummary->services_active), $this->statusSummary->services_active); ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
'monitoring/list/services',
|
'monitoring/list/services',
|
||||||
array('service_active_checks_enabled' => 0, 'service_passive_checks_enabled' => 1)
|
array('service_active_checks_enabled' => 0, 'service_passive_checks_enabled' => 1)
|
||||||
); ?>">
|
); ?>">
|
||||||
<?= $this->statusSummary->services_passive . ' ' . $this->translate('Passive'); ?>
|
<?= $this->statusSummary->services_passive . ' ' . $this->translatePlural('Passive', 'Passive', $this->statusSummary->services_passive); ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
'monitoring/list/services',
|
'monitoring/list/services',
|
||||||
array('service_active_checks_enabled' => 0, 'service_passive_checks_enabled' => 0)
|
array('service_active_checks_enabled' => 0, 'service_passive_checks_enabled' => 0)
|
||||||
); ?>" style="color: red;">
|
); ?>" style="color: red;">
|
||||||
<?= $this->statusSummary->services_not_checked . ' ' . $this->translate('Disabled'); ?>
|
<?= sprintf($this->translatePlural('%d Disabled', '%d Disabled', $this->statusSummary->services_not_checked), $this->statusSummary->services_not_checked); ?>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
'monitoring/list/hosts',
|
'monitoring/list/hosts',
|
||||||
array('host_flap_detection_enabled' => 0)
|
array('host_flap_detection_enabled' => 0)
|
||||||
); ?>" class="feature-highlight">
|
); ?>" class="feature-highlight">
|
||||||
<?= sprintf($this->translate('%d hosts disabled'), $this->statusSummary->hosts_without_flap_detection); ?>
|
<?= sprintf($this->translatePlural('%d host disabled', '%d hosts disabled', $this->statusSummary->hosts_without_flap_detection), $this->statusSummary->hosts_without_flap_detection); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<div class="box entry">
|
<div class="box entry">
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
'monitoring/list/hosts',
|
'monitoring/list/hosts',
|
||||||
array('host_is_flapping' => 1)
|
array('host_is_flapping' => 1)
|
||||||
); ?>" class="feature-highlight">
|
); ?>" class="feature-highlight">
|
||||||
<?= sprintf($this->translate('%d hosts flapping'), $this->statusSummary->hosts_flapping); ?>
|
<?= sprintf($this->translatePlural('%d host flapping', '%d hosts flapping', $this->statusSummary->hosts_flapping), $this->statusSummary->hosts_flapping); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
'monitoring/list/services',
|
'monitoring/list/services',
|
||||||
array('service_flap_detection_enabled' => 0)
|
array('service_flap_detection_enabled' => 0)
|
||||||
); ?>" class="feature-highlight">
|
); ?>" class="feature-highlight">
|
||||||
<?= sprintf($this->translate('%d services disabled'), $this->statusSummary->services_without_flap_detection); ?>
|
<?= sprintf($this->translatePlural('%d service disabled', '%d services disabled', $this->statusSummary->services_without_flap_detection), $this->statusSummary->services_without_flap_detection); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<div class="box entry">
|
<div class="box entry">
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
'monitoring/list/services',
|
'monitoring/list/services',
|
||||||
array('service_is_flapping' => 1)
|
array('service_is_flapping' => 1)
|
||||||
); ?>" class="feature-highlight">
|
); ?>" class="feature-highlight">
|
||||||
<?= sprintf($this->translate('%d services flapping'), $this->statusSummary->services_flapping); ?>
|
<?= sprintf($this->translatePlural('%d service flapping', '%d services flapping', $this->statusSummary->services_flapping), $this->statusSummary->services_flapping); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
'monitoring/list/hosts',
|
'monitoring/list/hosts',
|
||||||
array('host_notifications_enabled' => 0)
|
array('host_notifications_enabled' => 0)
|
||||||
); ?>" class="feature-highlight">
|
); ?>" class="feature-highlight">
|
||||||
<?= sprintf($this->translate('%d hosts disabled'), $this->statusSummary->hosts_not_triggering_notifications); ?>
|
<?= sprintf($this->translatePlural('%d host disabled', '%d hosts disabled', $this->statusSummary->hosts_not_triggering_notifications), $this->statusSummary->hosts_not_triggering_notifications); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<div class="box entry ">
|
<div class="box entry ">
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
'monitoring/list/services',
|
'monitoring/list/services',
|
||||||
array('service_notifications_enabled' => 0)
|
array('service_notifications_enabled' => 0)
|
||||||
); ?>" class="feature-highlight">
|
); ?>" class="feature-highlight">
|
||||||
<?= sprintf($this->translate('%d services disabled'), $this->statusSummary->services_not_triggering_notifications); ?>
|
<?= sprintf($this->translatePlural('%d service disabled', '%d services disabled', $this->statusSummary->services_not_triggering_notifications), $this->statusSummary->services_not_triggering_notifications); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<div class="box entry">
|
<div class="box entry">
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
'monitoring/list/hosts',
|
'monitoring/list/hosts',
|
||||||
array('host_event_handler_enabled' => 0)
|
array('host_event_handler_enabled' => 0)
|
||||||
); ?>" class="feature-highlight">
|
); ?>" class="feature-highlight">
|
||||||
<?= sprintf($this->translate('%d hosts disabled'), $this->statusSummary->hosts_not_processing_event_handlers); ?>
|
<?= sprintf($this->translatePlural('%d host disabled', '%d hosts disabled', $this->statusSummary->hosts_not_processing_event_handlers), $this->statusSummary->hosts_not_processing_event_handlers); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<div class="box entry">
|
<div class="box entry">
|
||||||
|
@ -155,7 +155,7 @@
|
||||||
'monitoring/list/services',
|
'monitoring/list/services',
|
||||||
array('service_event_handler_enabled' => 0)
|
array('service_event_handler_enabled' => 0)
|
||||||
); ?>" class="feature-highlight">
|
); ?>" class="feature-highlight">
|
||||||
<?= sprintf($this->translate('%d services disabled'), $this->statusSummary->services_not_processing_event_handlers); ?>
|
<?= sprintf($this->translatePlural('%d service disabled', '%d services disabled', $this->statusSummary->services_not_processing_event_handlers), $this->statusSummary->services_not_processing_event_handlers); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<div class="box entry">
|
<div class="box entry">
|
||||||
|
|
|
@ -12,14 +12,14 @@ $service_problems = (
|
||||||
<?php if ($this->statusSummary->hosts_up): ?>
|
<?php if ($this->statusSummary->hosts_up): ?>
|
||||||
<h2>
|
<h2>
|
||||||
<a href="<?= $this->href('monitoring/list/hosts', array('host_state' => 0)); ?>">
|
<a href="<?= $this->href('monitoring/list/hosts', array('host_state' => 0)); ?>">
|
||||||
<?= sprintf($this->translate('%d Hosts UP'), $this->statusSummary->hosts_up); ?>
|
<?= sprintf($this->translatePlural('%d Host UP', '%d Hosts UP', $this->statusSummary->hosts_up), $this->statusSummary->hosts_up); ?>
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<?php if ($this->statusSummary->hosts_pending): ?>
|
<?php if ($this->statusSummary->hosts_pending): ?>
|
||||||
<h2>
|
<h2>
|
||||||
<a href="<?= $this->href('monitoring/list/hosts', array('host_state' => 99)); ?>">
|
<a href="<?= $this->href('monitoring/list/hosts', array('host_state' => 99)); ?>">
|
||||||
<?= sprintf($this->translate('%d Hosts PENDING'), $this->statusSummary->hosts_pending); ?>
|
<?= sprintf($this->translatePlural('%d Host PENDING', '%d Hosts PENDING', $this->statusSummary->hosts_pending), $this->statusSummary->hosts_pending); ?>
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
'monitoring/list/services',
|
'monitoring/list/services',
|
||||||
array('host_problem' => $host_problem, 'service_state' => 2, 'service_acknowledged' => 0, 'service_in_downtime' => 0)
|
array('host_problem' => $host_problem, 'service_state' => 2, 'service_acknowledged' => 0, 'service_in_downtime' => 0)
|
||||||
); ?>">
|
); ?>">
|
||||||
<?= $services_critical_unhandled; ?> <?= $this->translate('CRITICAL', 'icinga.state') ?>
|
<?= sprintf($this->translatePlural('%d CRITICAL', '%d CRITICAL', $services_critical_unhandled, 'icinga.state'), $services_critical_unhandled); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<?php if ($services_critical_handled): ?>
|
<?php if ($services_critical_handled): ?>
|
||||||
|
@ -145,7 +145,7 @@
|
||||||
'monitoring/list/services',
|
'monitoring/list/services',
|
||||||
array('host_problem' => $host_problem, 'service_state' => 3, 'service_acknowledged' => 0, 'service_in_downtime' => 0)
|
array('host_problem' => $host_problem, 'service_state' => 3, 'service_acknowledged' => 0, 'service_in_downtime' => 0)
|
||||||
); ?>">
|
); ?>">
|
||||||
<?= $services_unknown_unhandled; ?> <?= $this->translate('UNKNOWN', 'icinga.state') ?>
|
<?= sprintf($this->translatePlural('%d UNKNOWN', '%d UNKNOWN', $services_unknown_unhandled, 'icinga.state'), $services_unknown_unhandled) ?>
|
||||||
</a>
|
</a>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<?php if ($services_unknown_handled): ?>
|
<?php if ($services_unknown_handled): ?>
|
||||||
|
@ -249,7 +249,7 @@
|
||||||
'monitoring/list/services',
|
'monitoring/list/services',
|
||||||
array('host_problem' => $host_problem, 'service_state' => 99)
|
array('host_problem' => $host_problem, 'service_state' => 99)
|
||||||
); ?>">
|
); ?>">
|
||||||
<?= $services_pending; ?> <?= $this->translate('PENDING', 'icinga.state') ?>
|
<?= sprintf($this->translatePlural('%d PENDING', '%d PENDING', $services_pending, 'icinga.state'), $services_pending); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php if ($services_pending_not_checked): ?>
|
<?php if ($services_pending_not_checked): ?>
|
||||||
<a href="<?= $this->href(
|
<a href="<?= $this->href(
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
<?php if ($this->statusSummary->hosts_down): ?>
|
<?php if ($this->statusSummary->hosts_down): ?>
|
||||||
<h2>
|
<h2>
|
||||||
<a href="<?= $this->href('monitoring/list/hosts', array('host_state' => 1)); ?>">
|
<a href="<?= $this->href('monitoring/list/hosts', array('host_state' => 1)); ?>">
|
||||||
<?= sprintf($this->translate('%d Hosts DOWN'), $this->statusSummary->hosts_down); ?>
|
<?= sprintf($this->translatePlural('%d Host DOWN', '%d Hosts DOWN', $this->statusSummary->hosts_down), $this->statusSummary->hosts_down); ?>
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<?php if ($this->statusSummary->hosts_unreachable): ?>
|
<?php if ($this->statusSummary->hosts_unreachable): ?>
|
||||||
<h2>
|
<h2>
|
||||||
<a href="<?= $this->href('monitoring/list/hosts', array('host_state' => 2)); ?>">
|
<a href="<?= $this->href('monitoring/list/hosts', array('host_state' => 2)); ?>">
|
||||||
<?= sprintf($this->translate('%d Hosts UNREACHABLE'), $this->statusSummary->hosts_unreachable); ?>
|
<?= sprintf($this->translatePlural('%d Host UNREACHABLE', '%d Hosts UNREACHABLE', $this->statusSummary->hosts_unreachable), $this->statusSummary->hosts_unreachable); ?>
|
||||||
</a>
|
</a>
|
||||||
</h2>
|
</h2>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
Loading…
Reference in New Issue