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
1 changed files with 1 additions and 8 deletions
|
@ -54,14 +54,7 @@ def initialize():
|
||||||
|
|
||||||
def set_i18n_env():
|
def set_i18n_env():
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
lang = os.getenv('LANG')
|
os.environ['LANG'] = LANG
|
||||||
if lang is None:
|
|
||||||
default_lang = locale.getdefaultlocale()[0]
|
|
||||||
if default_lang:
|
|
||||||
lang = default_lang
|
|
||||||
|
|
||||||
if lang:
|
|
||||||
os.environ['LANG'] = lang
|
|
||||||
|
|
||||||
|
|
||||||
def initialize_lang():
|
def initialize_lang():
|
||||||
|
|
Loading…
Add table
Reference in a new issue