4844: revert rev17071

svn: r17178
This commit is contained in:
Jérôme Rapinat 2011-04-21 08:46:23 +00:00
parent 92676ea15d
commit be654a74d2
2 changed files with 10 additions and 12 deletions

View File

@ -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]

View File

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