From 4ba1f79b557eb0c20201c063cb4fd6360901a1c3 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Wed, 26 Feb 2014 10:24:04 -0800 Subject: [PATCH] 7276: translate some punctuation marks -- partial --- gramps/gen/lib/date.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gramps/gen/lib/date.py b/gramps/gen/lib/date.py index 4fe3efecb..c4a82ebf7 100644 --- a/gramps/gen/lib/date.py +++ b/gramps/gen/lib/date.py @@ -278,7 +278,7 @@ class Span(object): trans_text = dlocale.translation.sgettext # trans_text is a defined keyword (see po/update_po.py, po/genpot.sh) _repr = trans_text("unknown") - # FIXME all this concatenation will fail for RTL languages + # FIXME all this concatenation will fail for RTL languages -- really?? if self.valid: fdate12 = self._format(self._diff(self.date1, self.date2), dlocale) fdate12p1 = self._format(self._diff(self.date1, self.date2), @@ -403,6 +403,7 @@ class Span(object): :type dlocale: a :class:`.GrampsLocale` instance """ trans_text = dlocale.translation.sgettext + # trans_text is a defined keyword (see po/update_po.py, po/genpot.sh) ngettext = dlocale.translation.ngettext if diff_tuple == (-1, -1, -1): return trans_text("unknown") retval = "" @@ -414,14 +415,16 @@ class Span(object): return retval if diff_tuple[1] != 0: if retval != "": - retval += ", " + # translators: needed for Arabic, ignore otherwise + retval += trans_text(", ") retval += ngettext("%d month", "%d months", diff_tuple[1]) % diff_tuple[1] detail += 1 if self.precision == detail: return retval if diff_tuple[2] != 0: if retval != "": - retval += ", " + # translators: needed for Arabic, ignore otherwise + retval += trans_text(", ") retval += ngettext("%d day", "%d days", diff_tuple[2]) % diff_tuple[2] detail += 1 if self.precision == detail: