From 82078e6956b4b02b760e590a725728f04a804590 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Mon, 17 Mar 2014 08:40:58 -0700 Subject: [PATCH] 7276: translate some punctuation marks -- partial --- po/POTFILES.in | 1 + po/POTFILES.skip | 1 - src/gen/lib/name.py | 16 +++++++++++----- src/gen/plug/report/utils.py | 3 ++- src/plugins/textreport/DetAncestralReport.py | 3 ++- src/plugins/textreport/DetDescendantReport.py | 3 ++- src/plugins/tool/Verify.py | 9 ++++++--- 7 files changed, 24 insertions(+), 12 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index 0c1670c96..01ecd10ad 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -50,6 +50,7 @@ src/gen/lib/familyreltype.py src/gen/lib/grampstype.py src/gen/lib/ldsord.py src/gen/lib/markertype.py +src/gen/lib/name.py src/gen/lib/nametype.py src/gen/lib/nameorigintype.py src/gen/lib/notetype.py diff --git a/po/POTFILES.skip b/po/POTFILES.skip index 5ada3f128..1d6119775 100644 --- a/po/POTFILES.skip +++ b/po/POTFILES.skip @@ -124,7 +124,6 @@ src/gen/lib/locationbase.py src/gen/lib/mediaobj.py src/gen/lib/mediabase.py src/gen/lib/mediaref.py -src/gen/lib/name.py src/gen/lib/note.py src/gen/lib/notebase.py src/gen/lib/personref.py diff --git a/src/gen/lib/name.py b/src/gen/lib/name.py index c810536db..64970f243 100644 --- a/src/gen/lib/name.py +++ b/src/gen/lib/name.py @@ -39,6 +39,7 @@ from gen.lib.datebase import DateBase from gen.lib.surnamebase import SurnameBase from gen.lib.nametype import NameType from gen.lib.const import IDENTICAL, EQUAL, DIFFERENT +from gen.ggettext import gettext as _ #------------------------------------------------------------------------- # @@ -401,9 +402,11 @@ class Name(SecondaryObject, PrivacyBase, SurnameBase, CitationBase, NoteBase, first = self.first_name surname = self.get_surname() if self.suffix: - return "%s, %s %s" % (surname, first, self.suffix) + # translators: needed for Arabic, ignore otherwise + return _("%s, %s %s") % (surname, first, self.suffix) else: - return "%s, %s" % (surname, first) + # translators: needed for Arabic, ignore otherwise + return _("%s, %s") % (surname, first) def get_upper_name(self): """ @@ -413,9 +416,11 @@ class Name(SecondaryObject, PrivacyBase, SurnameBase, CitationBase, NoteBase, first = self.first_name surname = self.get_surname().upper() if self.suffix: - return "%s, %s %s" % (surname, first, self.suffix) + # translators: needed for Arabic, ignore otherwise + return _("%s, %s %s") % (surname, first, self.suffix) else: - return "%s, %s" % (surname, first) + # translators: needed for Arabic, ignore otherwise + return _("%s, %s") % (surname, first) def get_regular_name(self): """ @@ -427,7 +432,8 @@ class Name(SecondaryObject, PrivacyBase, SurnameBase, CitationBase, NoteBase, if (self.suffix == ""): return "%s %s" % (first, surname) else: - return "%s %s, %s" % (first, surname, self.suffix) + # translators: needed for Arabic, ignore otherwise + return _("%s %s, %s") % (first, surname, self.suffix) def get_gedcom_parts(self): """ diff --git a/src/gen/plug/report/utils.py b/src/gen/plug/report/utils.py index 8135251b8..28bc9f7c7 100644 --- a/src/gen/plug/report/utils.py +++ b/src/gen/plug/report/utils.py @@ -230,7 +230,8 @@ def get_address_str(addr): if str == "": str = info else: - str = "%s, %s" % (str, info) + # translators: needed for Arabic, ignore otherwise + str = _("%s, %s") % (str, info) return str #------------------------------------------------------------------------- diff --git a/src/plugins/textreport/DetAncestralReport.py b/src/plugins/textreport/DetAncestralReport.py index 284a88aab..54ed648a3 100644 --- a/src/plugins/textreport/DetAncestralReport.py +++ b/src/plugins/textreport/DetAncestralReport.py @@ -380,7 +380,8 @@ class DetAncestorReport(Report): date = addr.get_date_object().get_year() if date: - self.doc.write_text( '%s, ' % date ) + # translators: needed for Arabic, ignore otherwise + self.doc.write_text(self._('%s, ') % date ) self.doc.write_text( text ) self.doc.write_text_citation( self.endnotes(addr) ) self.doc.end_paragraph() diff --git a/src/plugins/textreport/DetDescendantReport.py b/src/plugins/textreport/DetDescendantReport.py index 69e40d3d4..f081ce8cb 100644 --- a/src/plugins/textreport/DetDescendantReport.py +++ b/src/plugins/textreport/DetDescendantReport.py @@ -833,7 +833,8 @@ class DetDescendantReport(Report): self.doc.write_text(self._('Address: ')) if date: - self.doc.write_text( '%s, ' % date ) + # translators: needed for Arabic, ignore otherwise + self.doc.write_text(self._('%s, ') % date ) self.doc.write_text( text ) self.doc.write_text_citation( self.endnotes(addr) ) self.doc.end_paragraph() diff --git a/src/plugins/tool/Verify.py b/src/plugins/tool/Verify.py index 12883d4fc..8bc37249d 100644 --- a/src/plugins/tool/Verify.py +++ b/src/plugins/tool/Verify.py @@ -262,11 +262,14 @@ class Verify(tool.Tool, ManagedWindow, UpdateCallback): # print data for the user, no GUI (msg,gramps_id, name, the_type, rule_id, severity, handle) = results if severity == Rule.WARNING: - print "W: %s, %s: %s, %s" % (msg,the_type, gramps_id, name) + # translators: needed for Arabic, ignore otherwise + print _("W: %s, %s: %s, %s") % (msg, the_type, gramps_id, name) elif severity == Rule.ERROR: - print "E: %s, %s: %s, %s" % (msg,the_type,gramps_id, name) + # translators: needed for Arabic, ignore otherwise + print _("E: %s, %s: %s, %s") % (msg, the_type, gramps_id, name) else: - print "S: %s, %s: %s, %s" % (msg,the_type,gramps_id, name) + # translators: needed for Arabic, ignore otherwise + print _("S: %s, %s: %s, %s") % (msg, the_type,gramps_id, name) def init_gui(self): # Draw dialog and make it handle everything