Handle LC_ALL=C correctly
We default to 'en' for LANG if LC_ALL=C is set
This commit is contained in:
parent
2a8c0da367
commit
03aa1db306
|
@ -68,7 +68,10 @@ def initialize_lang():
|
||||||
global LANG
|
global LANG
|
||||||
try:
|
try:
|
||||||
# en_US, fr_FR, el_GR etc..
|
# en_US, fr_FR, el_GR etc..
|
||||||
LANG = locale.getdefaultlocale()[0]
|
default = locale.getdefaultlocale()[0]
|
||||||
|
if default is None:
|
||||||
|
# LC_ALL=C
|
||||||
|
return
|
||||||
LANG = LANG[:2]
|
LANG = LANG[:2]
|
||||||
except (ValueError, locale.Error):
|
except (ValueError, locale.Error):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue