Simplify set_i18n_env()
We already determine LANG in initialize_lang() getdefaultlocale() takes env var LANG into consideration
This commit is contained in:
parent
03aa1db306
commit
3b130db60c
|
@ -54,14 +54,7 @@ def initialize():
|
|||
|
||||
def set_i18n_env():
|
||||
if os.name == 'nt':
|
||||
lang = os.getenv('LANG')
|
||||
if lang is None:
|
||||
default_lang = locale.getdefaultlocale()[0]
|
||||
if default_lang:
|
||||
lang = default_lang
|
||||
|
||||
if lang:
|
||||
os.environ['LANG'] = lang
|
||||
os.environ['LANG'] = LANG
|
||||
|
||||
|
||||
def initialize_lang():
|
||||
|
|
Loading…
Reference in New Issue