diff --git a/gramps/gen/lib/name.py b/gramps/gen/lib/name.py index 7076889f8..70edc1ac9 100644 --- a/gramps/gen/lib/name.py +++ b/gramps/gen/lib/name.py @@ -39,6 +39,8 @@ from .datebase import DateBase from .surnamebase import SurnameBase from .nametype import NameType from .const import IDENTICAL, EQUAL, DIFFERENT +from gramps.gen.const import GRAMPS_LOCALE as glocale +_ = glocale.translation.gettext #------------------------------------------------------------------------- # @@ -437,9 +439,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): """ @@ -449,9 +453,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): """ @@ -463,7 +469,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/gramps/gen/plug/report/utils.py b/gramps/gen/plug/report/utils.py index 8ff05cf85..4f7c6e313 100644 --- a/gramps/gen/plug/report/utils.py +++ b/gramps/gen/plug/report/utils.py @@ -232,7 +232,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/gramps/plugins/textreport/detancestralreport.py b/gramps/plugins/textreport/detancestralreport.py index 1343d1d91..fbb17e5f6 100644 --- a/gramps/plugins/textreport/detancestralreport.py +++ b/gramps/plugins/textreport/detancestralreport.py @@ -374,7 +374,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/gramps/plugins/textreport/detdescendantreport.py b/gramps/plugins/textreport/detdescendantreport.py index cc3f2f2b7..f0a2aa2c5 100644 --- a/gramps/plugins/textreport/detdescendantreport.py +++ b/gramps/plugins/textreport/detdescendantreport.py @@ -826,7 +826,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/gramps/plugins/textreport/indivcomplete.py b/gramps/plugins/textreport/indivcomplete.py index 8bcbadd31..7cc3abb61 100644 --- a/gramps/plugins/textreport/indivcomplete.py +++ b/gramps/plugins/textreport/indivcomplete.py @@ -162,11 +162,13 @@ class IndivCompleteReport(Report): column_1 = self._(self._get_type(event.get_type())) if role not in (EventRoleType.PRIMARY, EventRoleType.FAMILY): column_1 = column_1 + ' (' + self._(role.xml_str()) + ')' - column_2 = combine('%s, %s', '%s', description, date_place) + # translators: needed for Arabic, ignore otherwise + column_2 = combine(self._('%s, %s'), '%s', description, date_place) else: # Groups with a single type (remove event type from first column) column_1 = date - column_2 = combine('%s, %s', '%s', description, place) + # translators: needed for Arabic, ignore otherwise + column_2 = combine(self._('%s, %s'), '%s', description, place) endnotes = "" if self.use_srcs: diff --git a/gramps/plugins/tool/verify.py b/gramps/plugins/tool/verify.py index 19063155e..5fe7fc030 100644 --- a/gramps/plugins/tool/verify.py +++ b/gramps/plugins/tool/verify.py @@ -273,11 +273,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 diff --git a/po/POTFILES.in b/po/POTFILES.in index 232bfb02d..0c6c3cd15 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -274,6 +274,7 @@ gramps/gen/lib/familyreltype.py gramps/gen/lib/grampstype.py gramps/gen/lib/ldsord.py gramps/gen/lib/markertype.py +gramps/gen/lib/name.py gramps/gen/lib/nameorigintype.py gramps/gen/lib/nametype.py gramps/gen/lib/notetype.py diff --git a/po/POTFILES.skip b/po/POTFILES.skip index 98ea6ad1c..3fff050eb 100644 --- a/po/POTFILES.skip +++ b/po/POTFILES.skip @@ -146,7 +146,6 @@ gramps/gen/lib/locationbase.py gramps/gen/lib/mediaobj.py gramps/gen/lib/mediabase.py gramps/gen/lib/mediaref.py -gramps/gen/lib/name.py gramps/gen/lib/note.py gramps/gen/lib/notebase.py gramps/gen/lib/personref.py