From d1918cc25920078f76c2ead01639bf001efd33fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Sun, 25 Jan 2009 13:11:27 +0000 Subject: [PATCH] mistakes on context svn: r11715 --- src/gen/lib/date.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gen/lib/date.py b/src/gen/lib/date.py index 390ecdd4c..85aeb739e 100644 --- a/src/gen/lib/date.py +++ b/src/gen/lib/date.py @@ -28,7 +28,7 @@ # Python modules # #------------------------------------------------------------------------ -from TransUtils import sgettext +from TransUtils import sgettext as _ from gettext import ngettext as _s #------------------------------------------------------------------------ @@ -306,7 +306,7 @@ class Span: #v = self.date1.sortval - self.date2.sortval #self.sort = (v, -Span.ABOUT) #self.minmax = (v - Span.ABOUT, v + Span.ABOUT) - self.repr = _("about|age") + " " + self._format(self._diff(self.date1, self.date2)) + self.repr = _("age|about") + " " + self._format(self._diff(self.date1, self.date2)) elif (self.date2.get_modifier() == Date.MOD_RANGE or self.date2.get_modifier() == Date.MOD_SPAN): start, stop = self.date2.get_start_stop_range() @@ -338,7 +338,7 @@ class Span: #v = self.date1.sortval - self.date2.sortval #self.sort = (v, -Span.ABOUT) #self.minmax = (v - Span.ABOUT, v + Span.ABOUT) - self.repr = _("about|age") + " " + self._format(self._diff(self.date1, self.date2)) + self.repr = _("age|about") + " " + self._format(self._diff(self.date1, self.date2)) elif (self.date2.get_modifier() == Date.MOD_RANGE or self.date2.get_modifier() == Date.MOD_SPAN): #v = self.date1.sortval - self.date2.sortval @@ -377,7 +377,7 @@ class Span: #v = self.date1.sortval - self.date2.sortval #self.sort = (v, -Span.ABOUT) #self.minmax = (v - Span.ABOUT, v + Span.ABOUT) - self.repr = _("about|age") + " " + self._format(self._diff(self.date1, self.date2)) + self.repr = _("age|about") + " " + self._format(self._diff(self.date1, self.date2)) elif self.date2.get_modifier() == Date.MOD_BEFORE: #v = self.date1.sortval - self.date2.sortval #self.sort = (v, -Span.BEFORE) @@ -392,13 +392,13 @@ class Span: #v = self.date1.sortval - self.date2.sortval #self.sort = (v, -Span.ABOUT) #self.minmax = (v - Span.ABOUT, v + Span.ABOUT) - self.repr = _("about|age") + " " + self._format(self._diff(self.date1, self.date2)) + self.repr = _("age|about") + " " + self._format(self._diff(self.date1, self.date2)) elif (self.date2.get_modifier() == Date.MOD_RANGE or self.date2.get_modifier() == Date.MOD_SPAN): #v = self.date1.sortval - self.date2.sortval #self.sort = (v, -Span.ABOUT) #self.minmax = (v - Span.ABOUT, v + Span.ABOUT) - self.repr = _("about|age") + " " + self._format(self._diff(self.date1, self.date2)) + self.repr = _("age|about") + " " + self._format(self._diff(self.date1, self.date2)) elif (self.date1.get_modifier() == Date.MOD_RANGE or self.date1.get_modifier() == Date.MOD_SPAN): # SPAN---------------------------- if self.date2.get_modifier() == Date.MOD_NONE: @@ -425,7 +425,7 @@ class Span: #v = self.date1.sortval - self.date2.sortval #self.sort = (v, -Span.ABOUT) #self.minmax = (v - Span.ABOUT, v + Span.ABOUT) - self.repr = _("about|age") + " " + self._format(self._diff(self.date1, self.date2)) + self.repr = _("age|about") + " " + self._format(self._diff(self.date1, self.date2)) elif (self.date2.get_modifier() == Date.MOD_RANGE or self.date2.get_modifier() == Date.MOD_SPAN): start1, stop1 = self.date1.get_start_stop_range()