# HG changeset patch # User Mads Kiilerich # Date 2020-04-17 18:03:21 # Node ID 0864547317c2983a6e355ca43fa0447304e7f96d # Parent cd3f326d0ff163c7737e4c5c56147fa129b063c4 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. diff --git a/kallithea/config/app_cfg.py b/kallithea/config/app_cfg.py --- a/kallithea/config/app_cfg.py +++ b/kallithea/config/app_cfg.py @@ -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()