7276: translate some punctuation marks -- partial
This commit is contained in:
parent
666ae99f23
commit
4ba1f79b55
@ -278,7 +278,7 @@ class Span(object):
|
|||||||
trans_text = dlocale.translation.sgettext
|
trans_text = dlocale.translation.sgettext
|
||||||
# trans_text is a defined keyword (see po/update_po.py, po/genpot.sh)
|
# trans_text is a defined keyword (see po/update_po.py, po/genpot.sh)
|
||||||
_repr = trans_text("unknown")
|
_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:
|
if self.valid:
|
||||||
fdate12 = self._format(self._diff(self.date1, self.date2), dlocale)
|
fdate12 = self._format(self._diff(self.date1, self.date2), dlocale)
|
||||||
fdate12p1 = self._format(self._diff(self.date1, self.date2),
|
fdate12p1 = self._format(self._diff(self.date1, self.date2),
|
||||||
@ -403,6 +403,7 @@ class Span(object):
|
|||||||
:type dlocale: a :class:`.GrampsLocale` instance
|
:type dlocale: a :class:`.GrampsLocale` instance
|
||||||
"""
|
"""
|
||||||
trans_text = dlocale.translation.sgettext
|
trans_text = dlocale.translation.sgettext
|
||||||
|
# trans_text is a defined keyword (see po/update_po.py, po/genpot.sh)
|
||||||
ngettext = dlocale.translation.ngettext
|
ngettext = dlocale.translation.ngettext
|
||||||
if diff_tuple == (-1, -1, -1): return trans_text("unknown")
|
if diff_tuple == (-1, -1, -1): return trans_text("unknown")
|
||||||
retval = ""
|
retval = ""
|
||||||
@ -414,14 +415,16 @@ class Span(object):
|
|||||||
return retval
|
return retval
|
||||||
if diff_tuple[1] != 0:
|
if diff_tuple[1] != 0:
|
||||||
if retval != "":
|
if retval != "":
|
||||||
retval += ", "
|
# translators: needed for Arabic, ignore otherwise
|
||||||
|
retval += trans_text(", ")
|
||||||
retval += ngettext("%d month", "%d months", diff_tuple[1]) % diff_tuple[1]
|
retval += ngettext("%d month", "%d months", diff_tuple[1]) % diff_tuple[1]
|
||||||
detail += 1
|
detail += 1
|
||||||
if self.precision == detail:
|
if self.precision == detail:
|
||||||
return retval
|
return retval
|
||||||
if diff_tuple[2] != 0:
|
if diff_tuple[2] != 0:
|
||||||
if retval != "":
|
if retval != "":
|
||||||
retval += ", "
|
# translators: needed for Arabic, ignore otherwise
|
||||||
|
retval += trans_text(", ")
|
||||||
retval += ngettext("%d day", "%d days", diff_tuple[2]) % diff_tuple[2]
|
retval += ngettext("%d day", "%d days", diff_tuple[2]) % diff_tuple[2]
|
||||||
detail += 1
|
detail += 1
|
||||||
if self.precision == detail:
|
if self.precision == detail:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user