From e49f938f5622718df99d6a9b307c8589878e158b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 18 May 2015 14:33:49 +0200 Subject: [PATCH] Use timeSince and timeUntil when displaying object downtimes refs #6778 --- .../views/scripts/show/components/downtime.phtml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/monitoring/application/views/scripts/show/components/downtime.phtml b/modules/monitoring/application/views/scripts/show/components/downtime.phtml index 9eb4b6c18..f8475b9a6 100644 --- a/modules/monitoring/application/views/scripts/show/components/downtime.phtml +++ b/modules/monitoring/application/views/scripts/show/components/downtime.phtml @@ -47,12 +47,21 @@ foreach ($object->downtimes as $downtime) { ) : $this->escape($downtime->comment); if ((bool) $downtime->is_in_effect) { - $state = 'in downtime since ' . $this->timeSince($downtime->start); + $state = sprintf( + $this->translate('in downtime %s', 'Last format parameter represents the time in downtime'), + $this->timeSince($downtime->start) + ); } else { if ((bool) $downtime->is_fixed) { - $state = 'scheduled ' . $this->timeUntil($downtime->start); + $state = sprintf( + $this->translate('scheduled %s', 'Last format parameter represents the time scheduled'), + $this->timeUntil($downtime->start) + ); } else { - $state = 'scheduled flexible ' . $this->timeUntil($downtime->start); + $state = sprintf( + $this->translate('scheduled flexible %s', 'Last format parameter represents the time scheduled'), + $this->timeUntil($downtime->start) + ); } }