Changeset - 0864547317c2
[Not reviewed]
default
0 1 0
Mads Kiilerich - 6 years ago 2020-04-17 18:03:21
mads@kiilerich.com
Grafted from: e302a29ffcb6
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.
1 file changed with 2 insertions and 4 deletions:
0 comments (0 inline, 0 general)
kallithea/config/app_cfg.py
Show inline comments
 
@@ -98,10 +98,8 @@ class KallitheaAppConfig(AppConfig):
 
        # 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()
0 comments (0 inline, 0 general)