4844: revert rev17071
svn: r17178
This commit is contained in:
parent
92676ea15d
commit
be654a74d2
@ -54,9 +54,10 @@ import constfunc
|
||||
# Constants
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
LANG = ''
|
||||
if "LANG" in os.environ:
|
||||
LANG = os.environ["LANG"]
|
||||
if not constfunc.win():
|
||||
LANG = locale.getlocale(locale.LC_TIME)[0]
|
||||
else:
|
||||
LANG = locale.getdefaultlocale(locale.LC_TIME)[0]
|
||||
|
||||
# If LANG contains ".UTF-8" use only the part to the left of "."
|
||||
# Otherwise some date handler will not load.
|
||||
@ -64,10 +65,8 @@ if ".UTF-8" in LANG.upper():
|
||||
LANG = LANG.split(".")[0]
|
||||
|
||||
if not LANG:
|
||||
if not constfunc.win():
|
||||
LANG = locale.getlocale(locale.LC_TIME)[0]
|
||||
else:
|
||||
LANG = locale.getdefaultlocale(locale.LC_TIME)[0]
|
||||
if "LANG" in os.environ:
|
||||
LANG = os.environ["LANG"]
|
||||
|
||||
if LANG:
|
||||
LANG_SHORT = LANG.split('_')[0]
|
||||
|
@ -36,9 +36,9 @@ import re
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gen.lib import Date
|
||||
from DateHandler._DateParser import DateParser
|
||||
from DateHandler._DateDisplay import DateDisplay
|
||||
from DateHandler._DateHandler import register_datehandler
|
||||
from _DateParser import DateParser
|
||||
from _DateDisplay import DateDisplay
|
||||
from _DateHandler import register_datehandler
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -265,5 +265,4 @@ class DateDisplayCZ(DateDisplay):
|
||||
# Register classes
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
register_datehandler(("cs", "CS", "cs_CZ", "cs_CZ.UTF8", "cs_CZ.UTF-8",
|
||||
"cs_CZ.utf8", "cs_CZ.utf-8"), DateParserCZ, DateDisplayCZ)
|
||||
register_datehandler(("cs", "CS", "cs_CZ", "Czech"), DateParserCZ, DateDisplayCZ)
|
||||
|
Loading…
Reference in New Issue
Block a user