Module: check_mk
Branch: master
Commit: 644bee46e8db25f0585fffe34671bc3baed4422d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=644bee46e8db25…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Mar 18 16:20:17 2016 +0100
3294 FIX Fixed mixed languages when some users have localized GUI and some not
When some of the GUI users are using a localized GUI and some are at the default
setting (have no explicit language configured), it could happen that the later
users sometimes see the GUI in the language another user has configured.
---
.werks/3294 | 12 ++++++++++++
ChangeLog | 1 +
web/htdocs/i18n.py | 7 +++++--
web/htdocs/index.py | 1 +
4 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/.werks/3294 b/.werks/3294
new file mode 100644
index 0000000..cdb14cd
--- /dev/null
+++ b/.werks/3294
@@ -0,0 +1,12 @@
+Title: Fixed mixed languages when some users have localized GUI and some not
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1458314348
+
+When some of the GUI users are using a localized GUI and some are at the default
+setting (have no explicit language configured), it could happen that the later
+users sometimes see the GUI in the language another user has configured.
diff --git a/ChangeLog b/ChangeLog
index c163cf5..8f824bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -114,6 +114,7 @@
* 3290 FIX: Fixed broken event quick delete icon when used in dashlets
* 3236 FIX: Fixed host page of pnp4nagios...
* 3293 FIX: Fixed graphs in IE with enabled compatibility mode (for IE < 8)
+ * 3294 FIX: Fixed mixed languages when some users have localized GUI and some not...
WATO:
* 3244 WATO BI Module: swap order of aggregation function and child node
selection...
diff --git a/web/htdocs/i18n.py b/web/htdocs/i18n.py
index a51cd78..d9f8ede 100644
--- a/web/htdocs/i18n.py
+++ b/web/htdocs/i18n.py
@@ -128,6 +128,10 @@ def localize(lang, **kwargs):
unlocalize()
+def initialize():
+ __builtin__._u = _u
+ unlocalize()
+
#.
# .--User i18n-----------------------------------------------------------.
# | _ _ _ _ ___ |
@@ -151,5 +155,4 @@ def _u(text):
return text
-__builtin__._u = _u
-unlocalize()
+initialize()
diff --git a/web/htdocs/index.py b/web/htdocs/index.py
index 7e8abc7..b65c788 100644
--- a/web/htdocs/index.py
+++ b/web/htdocs/index.py
@@ -43,6 +43,7 @@ def handler(req, fields = None, is_profiling = False):
response_code = apache.OK
try:
+ i18n.initialize()
config.load_config() # load multisite.mk etc.
init_profiling(is_profiling)
html.init_modes()