Module: check_mk
Branch: master
Commit: d66ec25ba19dc7ebf3c2af9f1de52873680ffdb8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d66ec25ba19dc7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jun 28 09:38:49 2012 +0200
Fixed some localization problems in view/command processing
---
web/htdocs/htmllib.py | 4 ++--
web/htdocs/views.py | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index c9426ad..7f9adf3 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -948,7 +948,7 @@ class html:
return True
def do_actions(self):
- return self.var("_do_actions") not in [ "", None,
"No" ]
+ return self.var("_do_actions") not in [ "", None,
_("No") ]
def set_focus(self, varname):
self.focus_object = (self.form_name, varname)
@@ -1070,7 +1070,7 @@ class html:
return False
def confirm(self, msg, method="POST", action=None):
- if self.var("_do_actions") == "No":
+ if self.var("_do_actions") == _("No"):
return # user has pressed "No" # None -->
"No"
if not self.has_var("_do_confirm"):
if self.mobile:
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 442ed31..359f03a 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -416,12 +416,12 @@ def page_edit_views(msg=None):
# Owner
if owner == "":
- ownertxt = "<i>builtin</i>"
+ ownertxt = "<i>" + _("builtin") +
"</i>"
else:
ownertxt = owner
html.write("<td>%s</td>" % ownertxt)
- html.write("<td>%s</td>" % (view["public"]
and "yes" or "no"))
- html.write("<td>%s</td>" % (view["hidden"]
and "yes" or "no"))
+ html.write("<td>%s</td>" % (view["public"]
and _("yes") or _("no")))
+ html.write("<td>%s</td>" % (view["hidden"]
and _("yes") or _("no")))
html.write("</tr>\n")
html.write("</table>\n")