changeset 5536:01dbe5f901e4

make sure to use language_default when language_ignore_browser is set
author Radomir Dopieralski <moindev@sheep.art.pl>
date Sun, 14 Feb 2010 21:29:59 +0100
parents ac5dc19e0a0e
children 8ee65df9cbe9
files MoinMoin/wsgiapp.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/wsgiapp.py	Sun Feb 14 01:01:33 2010 +0100
+++ b/MoinMoin/wsgiapp.py	Sun Feb 14 21:29:59 2010 +0100
@@ -244,9 +244,10 @@
                     break
             else:
                 logging.debug("moin does not support any language client accepts")
-                if cfg.language_default in i18n.languages:
-                    lang = cfg.language_default
-                    logging.debug("fall back to cfg.language_default (%r)" % lang)
+        if not lang:
+            if cfg.language_default in i18n.languages:
+                lang = cfg.language_default
+                logging.debug("fall back to cfg.language_default (%r)" % lang)
     if not lang:
         lang = 'en'
         logging.debug("emergency fallback to 'en'")