From a83c39eed5fc35322558454442b1808fc7e1ad11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Sat, 10 Apr 2010 18:30:13 +0000 Subject: [PATCH] 3756: Cannot set new year value different than default (first January) svn: r15075 --- src/DateHandler/_Date_es.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/DateHandler/_Date_es.py b/src/DateHandler/_Date_es.py index 0b5e15410..d0c5039f8 100644 --- a/src/DateHandler/_Date_es.py +++ b/src/DateHandler/_Date_es.py @@ -127,9 +127,9 @@ class DateDisplayES(DateDisplay): u"dic" ) calendar = ( - "", u" (Juliano)", u" (Hebreo)", - u" (Revolucionario)", u" (Persa)", u" (Islámico)", - u" (Swedish)" + "", u"Juliano", u"Hebreo", + u"Revolucionario", u"Persa", u"Islámico", + u"Swedish" ) _mod_str = ("", u"antes de ", u"después de ", u"hacia ", "", "", "") @@ -149,6 +149,7 @@ class DateDisplayES(DateDisplay): cal = date.get_calendar() qual = date.get_quality() start = date.get_start_date() + newyear = date.get_new_year() qual_str = self._qual_str[qual] @@ -159,14 +160,17 @@ class DateDisplayES(DateDisplay): elif mod == Date.MOD_SPAN: d1 = self.display_cal[cal](start) d2 = self.display_cal[cal](date.get_stop_date()) - return "%s%s %s %s %s%s" % (qual_str, u'de', d1, u'a', d2, self.calendar[cal]) + scal = self.format_extras(cal, newyear) + return "%s%s %s %s %s%s" % (qual_str, u'de', d1, u'a', d2, scal) elif mod == Date.MOD_RANGE: d1 = self.display_cal[cal](start) d2 = self.display_cal[cal](date.get_stop_date()) - return "%s%s %s %s %s%s" % (qual_str, u'entre', d1, u'y', d2, self.calendar[cal]) + scal = self.format_extras(cal, newyear) + return "%s%s %s %s %s%s" % (qual_str, u'entre', d1, u'y', d2, scal) else: text = self.display_cal[date.get_calendar()](start) - return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, self.calendar[cal]) + scal = self.format_extras(cal, newyear) + return "%s%s%s%s" % (qual_str, self._mod_str[mod], text, scal) #------------------------------------------------------------------------- #