Support for new Swedish calendar added.

svn: r11676
This commit is contained in:
Peter Landgren 2009-01-20 15:38:29 +00:00
parent deb5771ba6
commit 8b67a937e7
14 changed files with 59 additions and 16 deletions

View File

@ -81,6 +81,8 @@ class DateParserCA(DateParser):
u'r' : Date.CAL_FRENCH,
u'persa' : Date.CAL_PERSIAN,
u'p' : Date.CAL_PERSIAN,
u'swedish' : Date.CAL_SWEDISH,
u's' : Date.CAL_SWEDISH,
}
quality_to_int = {
@ -114,7 +116,8 @@ class DateDisplayCA(DateDisplay):
calendar = (
"", u" (Julià)", u" (Hebreu)",
u" (Revolucionari)", u" (Persa)", u" (Islàmic)"
u" (Revolucionari)", u" (Persa)", u" (Islàmic)",
u" (Swedish)"
)
_mod_str = ("", u"abans de ", u"després de ", u"cap a ", "", "", "")

View File

@ -69,6 +69,8 @@ class DateParserCZ(DateParser):
u'r' : Date.CAL_FRENCH,
u'perský' : Date.CAL_PERSIAN,
u'p' : Date.CAL_PERSIAN,
u'swedish' : Date.CAL_SWEDISH,
u's' : Date.CAL_SWEDISH,
}
quality_to_int = {
@ -100,7 +102,8 @@ class DateDisplayCZ(DateDisplay):
calendar = (
"", u" (juliánský)", u" (hebrejský)",
u" (republikánský)", u" (perský)", u" (islámský)"
u" (republikánský)", u" (perský)", u" (islámský)",
u" (swedish)"
)
_mod_str = ("", u"před ", u"po ", u"kolem ", "", "", "")

View File

@ -99,6 +99,8 @@ class DateParserDE(DateParser):
u'französisch republikanisch': Date.CAL_FRENCH,
u'franz.' : Date.CAL_FRENCH,
u'persisch' : Date.CAL_PERSIAN,
u'schwedisch' : Date.CAL_SWEDISH,
u's' : Date.CAL_SWEDISH,
}
quality_to_int = {
@ -134,7 +136,8 @@ class DateDisplayDE(DateDisplay):
calendar = (
"", u" (julianisch)", u" (hebräisch)",
u" (französisch republikanisch)", u" (persisch)", u" (islamisch)"
u" (französisch republikanisch)", u" (persisch)", u" (islamisch)",
u" (schwedisch)"
)
_mod_str = ("", u"vor ", u"nach ", u"etwa ", "", "", "")

View File

@ -82,6 +82,8 @@ class DateParserES(DateParser):
u'r' : Date.CAL_FRENCH,
u'persa' : Date.CAL_PERSIAN,
u'p' : Date.CAL_PERSIAN,
u'swedish' : Date.CAL_SWEDISH,
u's' : Date.CAL_SWEDISH,
}
quality_to_int = {
@ -115,7 +117,8 @@ class DateDisplayES(DateDisplay):
calendar = (
"", u" (Juliano)", u" (Hebreo)",
u" (Revolucionario)", u" (Persa)", u" (Islámico)"
u" (Revolucionario)", u" (Persa)", u" (Islámico)",
u" (Swedish)"
)
_mod_str = ("", u"antes de ", u"después de ", u"hacia ", "", "", "")

View File

@ -87,6 +87,8 @@ class DateParserFI(DateParser):
u'ranskan v.' : Date.CAL_FRENCH,
u'persialainen' : Date.CAL_PERSIAN,
u'pers.' : Date.CAL_PERSIAN,
u'svensk' : Date.CAL_SWEDISH,
u's' : Date.CAL_SWEDISH,
}
quality_to_int = {
@ -117,7 +119,9 @@ class DateDisplayFI(DateDisplay):
u"(heprealainen)",
u"(ranskan v.)",
u"(persialainen)",
u"(islamilainen)")
u"(islamilainen)",
u" (svensk)"
)
_qual_str = (u"", u"arviolta", u"laskettuna")

View File

@ -143,6 +143,8 @@ class DateParserFR(DateParser):
u'r' : Date.CAL_FRENCH,
u'perse' : Date.CAL_PERSIAN,
u'p' : Date.CAL_PERSIAN,
u'suédois' : Date.CAL_SWEDISH,
u's' : Date.CAL_SWEDISH,
}
quality_to_int = {
@ -194,7 +196,8 @@ class DateDisplayFR(DateDisplay):
calendar = (
"", u" (Julien)", u" (Hébreu)",
u" (Révolutionnaire)", u" (Perse)", u" (Islamique)"
u" (Révolutionnaire)", u" (Perse)", u" (Islamique)",
u" (Suédois)"
)
_mod_str = ("", u"avant ", u"après ", u"vers ", "", "", "")

View File

@ -159,7 +159,9 @@ class DateParserHR(DateParser):
u'francuski republikanski': Date.CAL_FRENCH,
u'franc.' : Date.CAL_FRENCH,
u'perzijski' : Date.CAL_PERSIAN,
u'perz. ' : Date.CAL_PERSIAN
u'perz. ' : Date.CAL_PERSIAN,
u'swedish' : Date.CAL_SWEDISH,
u's' : Date.CAL_SWEDISH,
}
quality_to_int = {
@ -203,7 +205,9 @@ class DateDisplayHR(DateDisplay):
"""
calendar = (
"", u" (julijanski)", u" (hebrejski)",
u" (francuski republikanski)", u" (perzijski)", u" (islamski)")
u" (francuski republikanski)", u" (perzijski)", u" (islamski)",
u" (swedish)"
)
_mod_str = ("", "prije ", "poslije ", "okolo ", "", "", "")

View File

@ -68,6 +68,8 @@ class DateParserLT(DateParser):
u'r' : Date.CAL_FRENCH,
u'persų' : Date.CAL_PERSIAN,
u'p' : Date.CAL_PERSIAN,
u'swedish' : Date.CAL_SWEDISH,
u's' : Date.CAL_SWEDISH,
}
quality_to_int = {
@ -102,7 +104,8 @@ class DateDisplayLT(DateDisplay):
u" (hebrajų)",
u" (prancuzų respublikos)",
u" (persų)",
u" (islamo)"
u" (islamo)",
u" (swedish)"
)
_mod_str = (u"",

View File

@ -80,6 +80,8 @@ class DateParserNb(DateParser):
u'f' : Date.CAL_FRENCH,
u'persisk' : Date.CAL_PERSIAN,
u'p' : Date.CAL_PERSIAN,
u'svensk' : Date.CAL_SWEDISH,
u's' : Date.CAL_SWEDISH,
}
quality_to_int = {
@ -119,7 +121,8 @@ class DateDisplayNb(DateDisplay):
" (hebraisk)",
" (fransk republikansk)",
" (persisk)",
" (islamisk)"
" (islamisk)",
" (svensk)"
)
_mod_str = ("", u"før ", u"etter ", u"ca ", "", "", "")

View File

@ -103,6 +103,8 @@ class DateParserNL(DateParser):
u'franse republiek': Date.CAL_FRENCH,
u'fran.' : Date.CAL_FRENCH,
u'persisch' : Date.CAL_PERSIAN,
u'zweeds' : Date.CAL_SWEDISH,
u'z' : Date.CAL_SWEDISH,
}
quality_to_int = {
@ -136,8 +138,8 @@ class DateDisplayNL(DateDisplay):
calendar = (
"", u" (juliaans)", u" (hebreeuws)",
u" (franse republiek)", u" (persisch)", u" (islamitisch)"
)
u" (franse republiek)", u" (persisch)", u" (islamitisch)",
u" (zweeds)" )
_mod_str = ("", u"voor ", u"na ", u"rond ", "", "", "")

View File

@ -107,6 +107,8 @@ class DateParserPL(DateParser):
u'francuski republikański': Date.CAL_FRENCH,
u'franc.' : Date.CAL_FRENCH,
u'perski' : Date.CAL_PERSIAN,
u'swedish' : Date.CAL_SWEDISH,
u's' : Date.CAL_SWEDISH,
}
quality_to_int = {
@ -137,7 +139,8 @@ class DateDisplayPL(DateDisplay):
calendar = (
"", u" (juliański)", u" (hebrajski)",
u" (francuski republikański)", u" (perski)", u" (islamski)"
u" (francuski republikański)", u" (perski)", u" (islamski)",
u" (swedish)"
)
_mod_str = ("",u"przed ",u"po ",u"ok. ","","","")

View File

@ -81,6 +81,8 @@ class DateParserPT(DateParser):
u'r' : Date.CAL_FRENCH,
u'persa' : Date.CAL_PERSIAN,
u'p' : Date.CAL_PERSIAN,
u'swedish' : Date.CAL_SWEDISH,
u's' : Date.CAL_SWEDISH,
}
quality_to_int = {
@ -114,7 +116,8 @@ class DateDisplayPT(DateDisplay):
calendar = (
"", u" (Juliano)", u" (Hebreu)",
u" (Revolucionário)", u" (Persa)", u" (Islâmico)"
u" (Revolucionário)", u" (Persa)", u" (Islâmico)",
u" (Swedish)"
)
_mod_str = ("",u"antes de ",u"depois de ",u"até ","","","")

View File

@ -82,6 +82,8 @@ class DateParserRU(DateParser):
u'р' : Date.CAL_FRENCH,
u'персидский' : Date.CAL_PERSIAN,
u'п' : Date.CAL_PERSIAN,
u'swedish' : Date.CAL_SWEDISH,
u's' : Date.CAL_SWEDISH,
}
quality_to_int = {
@ -189,7 +191,8 @@ class DateDisplayRU(DateDisplay):
u" (еврейский)",
u" (республиканский)",
u" (персидский)",
u" (исламский)"
u" (исламский)",
u" (Swedish)"
)
_mod_str = (

View File

@ -71,6 +71,8 @@ class DateParserSK(DateParser):
u'r' : Date.CAL_FRENCH,
u'perzský' : Date.CAL_PERSIAN,
u'p' : Date.CAL_PERSIAN,
u'swedish' : Date.CAL_SWEDISH,
u's' : Date.CAL_SWEDISH,
}
quality_to_int = {
@ -102,7 +104,8 @@ class DateDisplaySK(DateDisplay):
calendar = (
"", u" (juliánský)", u" (hebrejský)",
u" (republikánsky)", u" (perzský)", u" (islamský)"
u" (republikánsky)", u" (perzský)", u" (islamský)",
u" (swedish)"
)
_mod_str = ("", u"pred ", u"po ", u"okolo ", "", "", "")