8051: Can't fill in calculated and estimated dates in cs locale

This commit is contained in:
Petr Hejl 2014-09-11 17:23:02 +02:00 committed by Jérôme Rapinat
parent 2441f341d7
commit 0c587838b4

View File

@ -163,8 +163,10 @@ class DateParserCZ(DateParser):
} }
quality_to_int = { quality_to_int = {
'přibližně' : Date.QUAL_ESTIMATED,
'odhadované' : Date.QUAL_ESTIMATED, 'odhadované' : Date.QUAL_ESTIMATED,
'odh.' : Date.QUAL_ESTIMATED, 'odh.' : Date.QUAL_ESTIMATED,
'vypočteno' : Date.QUAL_CALCULATED,
'vypočtené' : Date.QUAL_CALCULATED, 'vypočtené' : Date.QUAL_CALCULATED,
'vyp.' : Date.QUAL_CALCULATED, 'vyp.' : Date.QUAL_CALCULATED,
} }
@ -235,14 +237,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: # elif mod == Date.MOD_NONE:
date_decl_string = self.display_cal[cal](start) # date_decl_string = self.display_cal[cal](start)
date_decl_string = date_decl_string.replace("den ", "dna ") # date_decl_string = date_decl_string.replace("den ", "dna ")
date_decl_string = date_decl_string.replace("or ", "ora ") # date_decl_string = date_decl_string.replace("or ", "ora ")
date_decl_string = date_decl_string.replace("en ", "na ") # date_decl_string = date_decl_string.replace("en ", "na ")
date_decl_string = date_decl_string.replace("ad ", "adu ") # date_decl_string = date_decl_string.replace("ad ", "adu ")
date_decl_string = date_decl_string.replace("ec ", "ce ") # date_decl_string = date_decl_string.replace("ec ", "ce ")
return date_decl_string # 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())