7276: translate some punctuation marks -- partial
This commit is contained in:
parent
c503efa849
commit
dc810fc483
@ -291,7 +291,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),
|
||||||
@ -413,6 +413,7 @@ class Span(object):
|
|||||||
@type dlocale: a GrampsLocale instance
|
@type dlocale: a 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 = ""
|
||||||
@ -424,14 +425,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