Simplify set_i18n_env()

We already determine LANG in initialize_lang()

getdefaultlocale() takes env var LANG into consideration
This commit is contained in:
Philipp Hörist 2018-05-17 20:07:30 +02:00
parent 03aa1db306
commit 3b130db60c
1 changed files with 1 additions and 8 deletions

View File

@ -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():