4844: revert rev17071
svn: r17179
This commit is contained in:
parent
f9287fd436
commit
39d11f132b
@ -54,9 +54,10 @@ import constfunc
|
|||||||
# Constants
|
# Constants
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
LANG = ''
|
if not constfunc.win():
|
||||||
if "LANG" in os.environ:
|
LANG = locale.getlocale(locale.LC_TIME)[0]
|
||||||
LANG = os.environ["LANG"]
|
else:
|
||||||
|
LANG = locale.getdefaultlocale(locale.LC_TIME)[0]
|
||||||
|
|
||||||
# If LANG contains ".UTF-8" use only the part to the left of "."
|
# If LANG contains ".UTF-8" use only the part to the left of "."
|
||||||
# Otherwise some date handler will not load.
|
# Otherwise some date handler will not load.
|
||||||
@ -64,10 +65,8 @@ if ".UTF-8" in LANG.upper():
|
|||||||
LANG = LANG.split(".")[0]
|
LANG = LANG.split(".")[0]
|
||||||
|
|
||||||
if not LANG:
|
if not LANG:
|
||||||
if not constfunc.win():
|
if "LANG" in os.environ:
|
||||||
LANG = locale.getlocale(locale.LC_TIME)[0]
|
LANG = os.environ["LANG"]
|
||||||
else:
|
|
||||||
LANG = locale.getdefaultlocale(locale.LC_TIME)[0]
|
|
||||||
|
|
||||||
if LANG:
|
if LANG:
|
||||||
LANG_SHORT = LANG.split('_')[0]
|
LANG_SHORT = LANG.split('_')[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user