Module: check_mk
Branch: master
Commit: b60bd3505ffdc7dacf0fcd84a3dc6ff128d2a5e5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b60bd3505ffdc7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 25 10:59:00 2012 +0100
FIX: Fixed problem handling non existant languages in multisite; Fixed detection of
language files
---
web/htdocs/lib.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/lib.py b/web/htdocs/lib.py
index cd5f0e9..2b62eb9 100644
--- a/web/htdocs/lib.py
+++ b/web/htdocs/lib.py
@@ -154,7 +154,7 @@ def load_language(lang):
if lang:
locale_base = defaults.locale_dir
local_locale_path = defaults.omd_root + "/local/share/check_mk/locale"
- po_path = '/%s/LC_MESSAGES/multisite.po' % lang
+ po_path = '/%s/LC_MESSAGES/multisite.mo' % lang
# Use file in OMD local strucuture when existing
if os.path.exists(local_locale_path + po_path):
locale_base = local_locale_path
@@ -163,7 +163,8 @@ def load_language(lang):
i18n = gettext.translation('multisite', locale_base, languages = [
lang ], codeset = 'UTF-8')
i18n.install(unicode = True)
except IOError, e:
- # Fallback to hardcoded default if the given language does not exist
+ # Fallback to non localized multisite
+ # I'd prefer to fallback to multisite default language but can not import
config module here
__builtin__.current_language = config.default_language
else:
# Replace the _() function to disable i18n again