4844: revert rev17071
svn: r17178
This commit is contained in:
parent
92676ea15d
commit
be654a74d2
@ -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]
|
||||||
|
@ -36,9 +36,9 @@ import re
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from gen.lib import Date
|
from gen.lib import Date
|
||||||
from DateHandler._DateParser import DateParser
|
from _DateParser import DateParser
|
||||||
from DateHandler._DateDisplay import DateDisplay
|
from _DateDisplay import DateDisplay
|
||||||
from DateHandler._DateHandler import register_datehandler
|
from _DateHandler import register_datehandler
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -265,5 +265,4 @@ class DateDisplayCZ(DateDisplay):
|
|||||||
# Register classes
|
# Register classes
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
register_datehandler(("cs", "CS", "cs_CZ", "cs_CZ.UTF8", "cs_CZ.UTF-8",
|
register_datehandler(("cs", "CS", "cs_CZ", "Czech"), DateParserCZ, DateDisplayCZ)
|
||||||
"cs_CZ.utf8", "cs_CZ.utf-8"), DateParserCZ, DateDisplayCZ)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user