Module: check_mk
Branch: master
Commit: cbed4881d9c61a0a25d6d74dc921f604faf0c26e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cbed4881d9c61a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 15 11:01:09 2011 +0100
Automatically falling back to hardcoded default language if configured language is not
available
---
ChangeLog | 2 ++
web/htdocs/index.py | 3 ++-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2db796d..739f6a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,8 @@
* Add Snapin page: show previews of all snapins
* Add Snapin page: Trying to prevent dragging confusions by using other click event
* New (hidden) button for reloading a snapin (left to the close button)
+ * Automatically falling back to hardcoded default language if configured
+ language is not available
BI:
* Host/Service elements are now iterable via FOREACH_HOST, e.g.
diff --git a/web/htdocs/index.py b/web/htdocs/index.py
index 9e67d4f..ea4f1de 100644
--- a/web/htdocs/index.py
+++ b/web/htdocs/index.py
@@ -170,7 +170,8 @@ def load_language(lang):
i18n = gettext.translation('multisite', locale_base, languages = [
lang ], codeset = 'UTF-8')
i18n.install(unicode = True)
except IOError, e:
- raise MKUserError('lang', 'No translation file found for the
given language.')
+ # Fallback to hardcoded default if the given language does not exist
+ __builtin__.current_language = config.default_language
# Main entry point for all HTTP-requests (called directly by mod_apache)