month inflection added to DateDisplay

svn: r16514
This commit is contained in:
Zdeněk Hataš 2011-01-31 12:32:36 +00:00
parent adf2c6e1c1
commit e213db183c

View File

@ -188,9 +188,9 @@ class DateDisplayCZ(DateDisplay):
""" """
Czech language date display class. Czech language date display class.
""" """
long_months = ( u"", u"ledna", u"února", u"března", u"dubna", u"května", long_months = ( u"", u"leden", u"únor", u"březen", u"duben", u"květen",
u"června", u"července", u"srpna", u"září", u"října", u"červen", u"červenec", u"srpen", u"září", u"říjen",
u"listopadu", u"prosince" ) u"listopad", u"prosinec" )
short_months = ( u"", u"led", u"úno", u"bře", u"dub", u"kvě", u"čer", short_months = ( u"", u"led", u"úno", u"bře", u"dub", u"kvě", u"čer",
u"čvc", u"srp", u"zář", u"říj", u"lis", u"pro" ) u"čvc", u"srp", u"zář", u"říj", u"lis", u"pro" )
@ -234,6 +234,14 @@ class DateDisplayCZ(DateDisplay):
return date.get_text() return date.get_text()
elif start == Date.EMPTY: elif start == Date.EMPTY:
return "" return ""
elif mod == Date.MOD_NONE:
date_decl_string = self.display_cal[cal](start)
date_decl_string = date_decl_string.replace(u"den ", u"dna ")
date_decl_string = date_decl_string.replace(u"or ", u"ora ")
date_decl_string = date_decl_string.replace(u"en ", u"na ")
date_decl_string = date_decl_string.replace(u"ad ", u"adu ")
date_decl_string = date_decl_string.replace(u"ec ", u"ce ")
return date_decl_string
elif mod == Date.MOD_SPAN: elif mod == Date.MOD_SPAN:
dat1 = self.display_cal[cal](start) dat1 = self.display_cal[cal](start)
dat2 = self.display_cal[cal](date.get_stop_date()) dat2 = self.display_cal[cal](date.get_stop_date())
@ -257,5 +265,5 @@ 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", "cs_CZ.UTF8", "cs_CZ.UTF-8",
"cs_CZ.utf8", "cs_CZ.utf-8"), DateParserCZ, DateDisplayCZ) "cs_CZ.utf8", "cs_CZ.utf-8"), DateParserCZ, DateDisplayCZ)