Module: check_mk
Branch: master
Commit: 7681d221a3a51f69beb9c88dca36c362b17d3367
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7681d221a3a51f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Mar 5 12:30:36 2012 +0100
FIX: Fixed localization of empty host tags
---
ChangeLog | 1 +
web/htdocs/wato.py | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 27c8b92..134ef85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,7 @@
(formerly also called secondary tags)
* FIX: Fixed wrong label "Main Overview" shown for moved WATO folders
in foldertree snapin
+ * FIX: Fixed localization of empty host tags
Checks & Agents:
* hpux_if: fix missing default parameter errors
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 83d627c..9ca6133 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -3706,7 +3706,7 @@ class HostTagAttribute(Attribute):
return "", "%s %s" % (_("not"), title)
for entry in self._taglist:
if value == entry[0]:
- return "", _(entry[1])
+ return "", entry[1] and _(entry[1]) or ''
return "", "" # Should never happen, at least one entry
should match
# But case could occur if tags definitions have been changed.
@@ -3726,7 +3726,7 @@ class HostTagAttribute(Attribute):
secondary_tags = e[2]
else:
secondary_tags = []
- choices.append(("|".join([ tagvalue ] + secondary_tags), _(e[1])))
+ choices.append(("|".join([ tagvalue ] + secondary_tags), e[1] and
_(e[1]) or ''))
if value != "" and value == tagvalue and secondary_tags:
value = value + "|" + "|".join(secondary_tags)