changeset 3491:9fabe3f8a0d8

i18n.__init__.get_browser_language: bug fix if user selected lang is not installed (default languages is None)
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Tue, 08 Apr 2008 13:02:45 +0200
parents af3460a4cb79
children 08928df97d11
files MoinMoin/i18n/__init__.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/i18n/__init__.py	Mon Apr 07 12:26:19 2008 +0200
+++ b/MoinMoin/i18n/__init__.py	Tue Apr 08 13:02:45 2008 +0200
@@ -385,9 +385,9 @@
     @return: ISO language code, e.g. 'en'
     """
     available = wikiLanguages()
-    if not request.cfg.language_ignore_browser:
-        for lang in browserLanguages(request):
-            if lang in available:
-                return lang
+    if available and not request.cfg.language_ignore_browser:
+            for lang in browserLanguages(request):
+                if lang in available:
+                    return lang
     return ''