[icinga-checkins] icinga.org: icingaweb2/master: helpers/MonitoringState: translate 'since'

git at icinga.org git at icinga.org
Wed Nov 12 09:16:13 CET 2014


Module: icingaweb2
Branch: master
Commit: e5ac319cbb85a9e30e6f8bbf07f15f864ba3d6cc
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=e5ac319cbb85a9e30e6f8bbf07f15f864ba3d6cc

Author: Thomas Gelf <thomas at gelf.net>
Date:   Wed Nov 12 08:23:56 2014 +0100

helpers/MonitoringState: translate 'since'

---

 .../monitoring/application/views/helpers/MonitoringState.php  |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/modules/monitoring/application/views/helpers/MonitoringState.php b/modules/monitoring/application/views/helpers/MonitoringState.php
index 871e8ad..4db1a7a 100644
--- a/modules/monitoring/application/views/helpers/MonitoringState.php
+++ b/modules/monitoring/application/views/helpers/MonitoringState.php
@@ -95,8 +95,11 @@ class Zend_View_Helper_MonitoringState extends Zend_View_Helper_Abstract
      */
     public function getStateTitle($object, $type)
     {
-        return strtoupper($this->monitoringState($object, $type))
-        . ' since '
-        . date('Y-m-d H:i:s', $object->{$type.'_last_state_change'});
+        return sprintf(
+            '%s %s %s',
+             $this->view->translate(strtoupper($this->monitoringState($object, $type))),
+            $this->view->translate('since'),
+            date('Y-m-d H:i:s', $object->{$type.'_last_state_change'})
+        );
     }
 }



More information about the icinga-checkins mailing list