changeset 8348:0864547317c2

i18n: fix dead code in Accept-Language workaround from 7c7d6b5c07c7 AppConfig is just providing defaults, and the .ini file has not been read yet. There is thus no point in checking if i18n.lang has been set, and the code would thus *always* set i18n.lang=en ... but that was fine, as it just is a default.
author Mads Kiilerich <mads@kiilerich.com>
date Fri, 17 Apr 2020 18:03:21 +0200
parents cd3f326d0ff1
children a69924eb6fba
files kallithea/config/app_cfg.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/config/app_cfg.py	Mon Apr 06 21:29:37 2020 +0200
+++ b/kallithea/config/app_cfg.py	Fri Apr 17 18:03:21 2020 +0200
@@ -98,10 +98,8 @@
         # Disable transaction manager -- currently Kallithea takes care of transactions itself
         self['tm.enabled'] = False
 
-        # Set the i18n source language so TG doesn't search beyond 'en' in Accept-Language.
-        # Don't force the default here if configuration force something else.
-        if not self.get('i18n.lang'):
-            self['i18n.lang'] = 'en'
+        # Set the default i18n source language so TG doesn't search beyond 'en' in Accept-Language.
+        self['i18n.lang'] = 'en'
 
 
 base_config = KallitheaAppConfig()