Module: check_mk
Branch: master
Commit: f64d34fc47c5378ac3ee2f0a4239f11aea52c7b1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f64d34fc47c537…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 25 09:50:16 2012 +0100
WATO: Only localizing non empty host tag titles
---
web/htdocs/wato.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 0bb819f..7ba93db 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -3580,12 +3580,16 @@ class HostTagAttribute(Attribute):
def paint(self, value, hostname):
# Localize the titles. To make the strings available in the scanned localization
# files the _() function must also be placed in the configuration files
+ # But don't localize empty strings - This empty string is connected to the
header
+ # of the .mo file
if len(self._taglist) == 1:
title = self._taglist[0][1]
+ if title:
+ title = _(title)
if value:
- return "", _(title)
+ return "", title
else:
- return "", "%s %s" % (_("not"), _(title))
+ return "", "%s %s" % (_("not"), title)
for entry in self._taglist:
if value == entry[0]:
return "", _(entry[1])