From f97a4f45116138dad3de06219cece939d6d46420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Fri, 17 Feb 2012 16:51:40 +0000 Subject: [PATCH] 2356: add comments about genitive form issues under some locales svn: r18915 --- src/ExportOptions.py | 3 +++ src/cli/clidbman.py | 1 + src/gen/plug/report/utils.py | 3 +++ src/plugins/drawreport/AncestorTree.py | 1 + src/plugins/drawreport/TimeLine.py | 2 ++ src/plugins/export/ExportVCalendar.py | 5 +++++ src/plugins/gramplet/DescendGramplet.py | 1 + src/plugins/import/ImportXml.py | 2 ++ src/plugins/lib/libgedcom.py | 2 ++ src/plugins/quickview/all_events.py | 1 + src/plugins/quickview/lineage.py | 2 ++ src/plugins/quickview/siblings.py | 1 + src/plugins/textreport/AncestorReport.py | 1 + src/plugins/textreport/BirthdayReport.py | 1 + src/plugins/textreport/DescendReport.py | 1 + src/plugins/textreport/DetAncestralReport.py | 2 ++ src/plugins/textreport/DetDescendantReport.py | 2 ++ src/plugins/textreport/EndOfLineReport.py | 2 ++ src/plugins/textreport/IndivComplete.py | 1 + src/plugins/textreport/KinshipReport.py | 1 + src/plugins/textreport/NumberOfAncestorsReport.py | 1 + src/plugins/textreport/TagReport.py | 1 + src/plugins/tool/EventNames.py | 2 ++ src/plugins/tool/NotRelated.py | 1 + src/plugins/webreport/NarrativeWeb.py | 1 + 25 files changed, 41 insertions(+) diff --git a/src/ExportOptions.py b/src/ExportOptions.py index 775ad20cc..9377c0a23 100644 --- a/src/ExportOptions.py +++ b/src/ExportOptions.py @@ -420,14 +420,17 @@ class WriterOptionBox(object): gramps_id = self.person.get_gramps_id() des = GenericFilter() + # feature request 2356: avoid genitive form des.set_name(_("Descendants of %s") % name) des.add_rule(Rules.Person.IsDescendantOf([gramps_id, 1])) df = GenericFilter() + # feature request 2356: avoid genitive form df.set_name(_("Descendant Families of %s") % name) df.add_rule(Rules.Person.IsDescendantFamilyOf([gramps_id, 1])) ans = GenericFilter() + # feature request 2356: avoid genitive form ans.set_name(_("Ancestors of %s") % name) ans.add_rule(Rules.Person.IsAncestorOf([gramps_id, 1])) diff --git a/src/cli/clidbman.py b/src/cli/clidbman.py index c215e07c5..d917b5cca 100644 --- a/src/cli/clidbman.py +++ b/src/cli/clidbman.py @@ -462,6 +462,7 @@ def find_locker_name(dirpath): # Otherwise problems with non ASCII characters in # username in Windows username = unicode(username, sys.getfilesystemencoding()) + # feature request 2356: avoid genitive form last = _("Locked by %s") % username ifile.close() except (OSError, IOError): diff --git a/src/gen/plug/report/utils.py b/src/gen/plug/report/utils.py index 74438b5d8..8135251b8 100644 --- a/src/gen/plug/report/utils.py +++ b/src/gen/plug/report/utils.py @@ -268,14 +268,17 @@ def get_person_filters(person, include_single=True): all.add_rule(Rules.Person.Everyone([])) des = GenericFilter() + # feature request 2356: avoid genitive form des.set_name(_("Descendants of %s") % name) des.add_rule(Rules.Person.IsDescendantOf([gramps_id, 1])) df = GenericFilter() + # feature request 2356: avoid genitive form df.set_name(_("Descendant Families of %s") % name) df.add_rule(Rules.Person.IsDescendantFamilyOf([gramps_id, 1])) ans = GenericFilter() + # feature request 2356: avoid genitive form ans.set_name(_("Ancestors of %s") % name) ans.add_rule(Rules.Person.IsAncestorOf([gramps_id, 1])) diff --git a/src/plugins/drawreport/AncestorTree.py b/src/plugins/drawreport/AncestorTree.py index 6e8cddb65..466cfab8a 100644 --- a/src/plugins/drawreport/AncestorTree.py +++ b/src/plugins/drawreport/AncestorTree.py @@ -147,6 +147,7 @@ class TitleA(TitleBox): if center is not None: name = name_displayer.display(center) + # feature request 2356: avoid genitive form self.text = _("Ancestor Graph for %s") % name self.set_box_height_width() diff --git a/src/plugins/drawreport/TimeLine.py b/src/plugins/drawreport/TimeLine.py index d804d96bc..7c4af3776 100644 --- a/src/plugins/drawreport/TimeLine.py +++ b/src/plugins/drawreport/TimeLine.py @@ -242,7 +242,9 @@ class TimeLine(Report): Draws the title for the page. """ width = self.doc.get_usable_width() + # feature request 2356: avoid genitive form byline = _("Sorted by %s") % self.sort_name + # feature request 2356: avoid genitive form title = _("Timeline Graph for %s") % self.filter.get_name() self.doc.center_text('TLG-title', title + "\n" + byline, width / 2.0, 0) diff --git a/src/plugins/export/ExportVCalendar.py b/src/plugins/export/ExportVCalendar.py index ae72cc210..707615e7f 100644 --- a/src/plugins/export/ExportVCalendar.py +++ b/src/plugins/export/ExportVCalendar.py @@ -136,6 +136,7 @@ class CalendarWriter(object): if event.get_type() == EventType.MARRIAGE: m_date = event.get_date_object() place_handle = event.get_place_handle() + # feature requests 2356, 1657: avoid genitive form text = _("Marriage of %s") % Utils.family_name(family, self.db) if place_handle: @@ -155,10 +156,12 @@ class CalendarWriter(object): place_handle = birth.get_place_handle() if place_handle: place = self.db.get_place_from_handle(place_handle) + # feature requests 2356, 1657: avoid genitive form self.write_vevent(_("Birth of %s") % person.get_primary_name().get_name(), b_date, place.get_title()) else: + # feature requests 2356, 1657: avoid genitive form self.write_vevent(_("Birth of %s") % person.get_primary_name().get_name(), b_date) @@ -171,11 +174,13 @@ class CalendarWriter(object): place_handle = death.get_place_handle() if place_handle: place = self.db.get_place_from_handle(place_handle) + # feature requests 2356, 1657: avoid genitive form self.write_vevent(_("Death of %s") % person.get_primary_name().get_name(), d_date, place.get_title()) else: + # feature requests 2356, 1657: avoid genitive form self.write_vevent(_("Death of %s") % person.get_primary_name().get_name(), d_date) diff --git a/src/plugins/gramplet/DescendGramplet.py b/src/plugins/gramplet/DescendGramplet.py index bca510c80..440eb4de1 100644 --- a/src/plugins/gramplet/DescendGramplet.py +++ b/src/plugins/gramplet/DescendGramplet.py @@ -67,6 +67,7 @@ class DescendantGramplet(Gramplet): if self.center_person is None: return name = name_displayer.display(self.center_person) + # feature request 2356: avoid genitive form title = _("Descendants of %s") % name self.append_text(title) self.append_text("\n\n") diff --git a/src/plugins/import/ImportXml.py b/src/plugins/import/ImportXml.py index 8dba796f0..cc27b0427 100644 --- a/src/plugins/import/ImportXml.py +++ b/src/plugins/import/ImportXml.py @@ -80,7 +80,9 @@ CHILD_REL_MAP = { "Unknown" : gen.lib.ChildRefType(gen.lib.ChildRefType.UNKNOWN), } +# feature requests 2356, 1658: avoid genitive form EVENT_FAMILY_STR = _("%(event_name)s of %(family)s") +# feature requests 2356, 1658: avoid genitive form EVENT_PERSON_STR = _("%(event_name)s of %(person)s") #------------------------------------------------------------------------- diff --git a/src/plugins/lib/libgedcom.py b/src/plugins/lib/libgedcom.py index a6ecaec5c..9c6e44dad 100644 --- a/src/plugins/lib/libgedcom.py +++ b/src/plugins/lib/libgedcom.py @@ -6173,6 +6173,7 @@ class GedcomParser(UpdateCallback): # We can't produce the 'Generated by' statement till the end of the SOUR # level, because the name and version may come in any order if self.use_def_src: + # feature request 2356: avoid genitive form self.def_src.set_data_item(_("Generated by"), "%s %s" % (self.genby, self.genvers)) @@ -6273,6 +6274,7 @@ class GedcomParser(UpdateCallback): """ if self.use_def_src: filename = os.path.basename(line.data).split('\\')[-1] + # feature request 2356: avoid genitive form self.def_src.set_title(_("Import from %s") % filename) def __header_copr(self, line, state): diff --git a/src/plugins/quickview/all_events.py b/src/plugins/quickview/all_events.py index 86d53a795..87782381d 100644 --- a/src/plugins/quickview/all_events.py +++ b/src/plugins/quickview/all_events.py @@ -53,6 +53,7 @@ def run(database, document, person): # display the results + # feature request 2356: avoid genitive form sdoc.title(_("Sorted events of %s") % sdb.name(person)) sdoc.paragraph("") diff --git a/src/plugins/quickview/lineage.py b/src/plugins/quickview/lineage.py index 790a2f7ab..f4f24dfcc 100644 --- a/src/plugins/quickview/lineage.py +++ b/src/plugins/quickview/lineage.py @@ -48,6 +48,7 @@ def run_father(database, document, person): # display the results + # feature request 2356: avoid genitive form sd.title(_("Father lineage for %s") % sa.name(person)) sd.paragraph("") sd.paragraph(_("" @@ -78,6 +79,7 @@ def run_mother(database, document, person): # display the results + # feature request 2356: avoid genitive form sd.title(_("Mother lineage for %s") % sa.name(person)) sd.paragraph("") sd.paragraph(_("" diff --git a/src/plugins/quickview/siblings.py b/src/plugins/quickview/siblings.py index 08511712c..882d0a910 100644 --- a/src/plugins/quickview/siblings.py +++ b/src/plugins/quickview/siblings.py @@ -42,6 +42,7 @@ def run(database, document, person): rel_class = Relationship.get_relationship_calculator() # display the title + # feature request 2356: avoid genitive form sdoc.title(_("Siblings of %s") % sdb.name(person)) sdoc.paragraph("") stab.columns(_("Sibling"), _("Gender"), _("Birth Date"), _("Type")) diff --git a/src/plugins/textreport/AncestorReport.py b/src/plugins/textreport/AncestorReport.py index 84cd572d8..ec85ae0ca 100644 --- a/src/plugins/textreport/AncestorReport.py +++ b/src/plugins/textreport/AncestorReport.py @@ -187,6 +187,7 @@ class AncestorReport(Report): # identified as a major category if this is included in a Book report. name = self._name_display.display_formal(self.center_person) + # feature request 2356: avoid genitive form title = self._("Ahnentafel Report for %s") % name mark = IndexMark(title, INDEX_TYPE_TOC, 1) self.doc.start_paragraph("AHN-Title") diff --git a/src/plugins/textreport/BirthdayReport.py b/src/plugins/textreport/BirthdayReport.py index fbd023d3d..25cd87eb8 100644 --- a/src/plugins/textreport/BirthdayReport.py +++ b/src/plugins/textreport/BirthdayReport.py @@ -169,6 +169,7 @@ class CalendarReport(Report): if self.relationships: name = self.center_person.get_primary_name() self.doc.start_paragraph('BIR-Text3style') + # feature request 2356: avoid genitive form self.doc.write_text(_("Relationships shown are to %s") % self._name_display.display_name(name)) self.doc.end_paragraph() diff --git a/src/plugins/textreport/DescendReport.py b/src/plugins/textreport/DescendReport.py index d2fd32ca2..017875b5f 100644 --- a/src/plugins/textreport/DescendReport.py +++ b/src/plugins/textreport/DescendReport.py @@ -363,6 +363,7 @@ class DescendantReport(Report): def write_report(self): self.doc.start_paragraph("DR-Title") name = self._name_display.display(self.center_person) + # feature request 2356: avoid genitive form title = _("Descendants of %s") % name mark = IndexMark(title, INDEX_TYPE_TOC, 1) self.doc.write_text(title, mark) diff --git a/src/plugins/textreport/DetAncestralReport.py b/src/plugins/textreport/DetAncestralReport.py index 5aae16f74..284a88aab 100644 --- a/src/plugins/textreport/DetAncestralReport.py +++ b/src/plugins/textreport/DetAncestralReport.py @@ -193,6 +193,7 @@ class DetAncestorReport(Report): name = self._name_display.display_name(self.center_person.get_primary_name()) self.doc.start_paragraph("DAR-Title") + # feature request 2356: avoid genitive form title = self._("Ancestral Report for %s") % name mark = IndexMark(title, INDEX_TYPE_TOC, 1) self.doc.write_text(title, mark) @@ -313,6 +314,7 @@ class DetAncestorReport(Report): notelist = person.get_note_list() if len(notelist) > 0 and self.includenotes: self.doc.start_paragraph("DAR-NoteHeader") + # feature request 2356: avoid genitive form self.doc.write_text(self._("Notes for %s") % name) self.doc.end_paragraph() for notehandle in notelist: diff --git a/src/plugins/textreport/DetDescendantReport.py b/src/plugins/textreport/DetDescendantReport.py index 150948f9b..69e40d3d4 100644 --- a/src/plugins/textreport/DetDescendantReport.py +++ b/src/plugins/textreport/DetDescendantReport.py @@ -286,6 +286,7 @@ class DetDescendantReport(Report): self.doc.start_paragraph("DDR-Title") + # feature request 2356: avoid genitive form title = self._("Descendant Report for %(person_name)s") % { 'person_name' : name } mark = IndexMark(title, INDEX_TYPE_TOC, 1) @@ -774,6 +775,7 @@ class DetDescendantReport(Report): notelist = person.get_note_list() if len(notelist) > 0 and self.inc_notes: self.doc.start_paragraph("DDR-NoteHeader") + # feature request 2356: avoid genitive form self.doc.write_text(self._("Notes for %s") % name) self.doc.end_paragraph() for notehandle in notelist: diff --git a/src/plugins/textreport/EndOfLineReport.py b/src/plugins/textreport/EndOfLineReport.py index 022ff98b0..a090365cc 100644 --- a/src/plugins/textreport/EndOfLineReport.py +++ b/src/plugins/textreport/EndOfLineReport.py @@ -146,12 +146,14 @@ class EndOfLineReport(Report): pname = self._name_display.display(self.center_person) self.doc.start_paragraph("EOL-Title") + # feature request 2356: avoid genitive form title = _("End of Line Report for %s") % pname mark = IndexMark(title, INDEX_TYPE_TOC, 1) self.doc.write_text(title, mark) self.doc.end_paragraph() self.doc.start_paragraph("EOL-Subtitle") + # feature request 2356: avoid genitive form title = _("All the ancestors of %s who are missing a parent") % pname self.doc.write_text(title) self.doc.end_paragraph() diff --git a/src/plugins/textreport/IndivComplete.py b/src/plugins/textreport/IndivComplete.py index 90179ae70..ce28862dd 100644 --- a/src/plugins/textreport/IndivComplete.py +++ b/src/plugins/textreport/IndivComplete.py @@ -549,6 +549,7 @@ class IndivCompleteReport(Report): media_list = self.person.get_media_list() name = self._name_display.display(self.person) + # feature request 2356: avoid genitive form title = _("Summary of %s") % name mark = IndexMark(title, INDEX_TYPE_TOC, 1) self.doc.start_paragraph("IDS-Title") diff --git a/src/plugins/textreport/KinshipReport.py b/src/plugins/textreport/KinshipReport.py index b22598ba1..044402609 100644 --- a/src/plugins/textreport/KinshipReport.py +++ b/src/plugins/textreport/KinshipReport.py @@ -113,6 +113,7 @@ class KinshipReport(Report): pname = self._name_display.display(self.person) self.doc.start_paragraph("KIN-Title") + # feature request 2356: avoid genitive form title = _("Kinship Report for %s") % pname mark = IndexMark(title, INDEX_TYPE_TOC, 1) self.doc.write_text(title, mark) diff --git a/src/plugins/textreport/NumberOfAncestorsReport.py b/src/plugins/textreport/NumberOfAncestorsReport.py index ec69e8d6a..cce286b44 100644 --- a/src/plugins/textreport/NumberOfAncestorsReport.py +++ b/src/plugins/textreport/NumberOfAncestorsReport.py @@ -100,6 +100,7 @@ class NumberOfAncestorsReport(Report): self.doc.start_paragraph("NOA-Title") name = self._name_display.display(self.__person) + # feature request 2356: avoid genitive form title = _("Number of Ancestors for %s") % name mark = IndexMark(title, INDEX_TYPE_TOC, 1) self.doc.write_text(title, mark) diff --git a/src/plugins/textreport/TagReport.py b/src/plugins/textreport/TagReport.py index e828f062c..458cd9d9e 100644 --- a/src/plugins/textreport/TagReport.py +++ b/src/plugins/textreport/TagReport.py @@ -81,6 +81,7 @@ class TagReport(Report): def write_report(self): self.doc.start_paragraph("TR-Title") + # feature request 2356: avoid genitive form title = _("Tag Report for %s Items") % self.tag mark = IndexMark(title, INDEX_TYPE_TOC, 1) self.doc.write_text(title, mark) diff --git a/src/plugins/tool/EventNames.py b/src/plugins/tool/EventNames.py index 073707ea5..9727c955a 100644 --- a/src/plugins/tool/EventNames.py +++ b/src/plugins/tool/EventNames.py @@ -123,7 +123,9 @@ class EventNames(tool.BatchTool, ManagedWindow.ManagedWindow): # #------------------------------------------------------------------------- +# feature requests 2356, 1658: avoid genitive form EVENT_FAMILY_STR = _("%(event_name)s of %(family)s") +# feature requests 2356, 1658: avoid genitive form EVENT_PERSON_STR = _("%(event_name)s of %(person)s") def person_event_name(event, person): diff --git a/src/plugins/tool/NotRelated.py b/src/plugins/tool/NotRelated.py index d17999955..9d8e7fc3d 100644 --- a/src/plugins/tool/NotRelated.py +++ b/src/plugins/tool/NotRelated.py @@ -173,6 +173,7 @@ class NotRelated(tool.ActivePersonTool, ManagedWindow.ManagedWindow) : # populate the treeview model with the names of unrelated people if self.numberOfUnrelatedPeople == 0: + # feature request 2356: avoid genitive form title.set_text(_('Everyone in the database is related to %s') % self.name) else: self.populateModel() diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index dd320a87a..48d683e5d 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -2948,6 +2948,7 @@ class SurnamePage(BasePage): # section title surnamedetail += Html("h3", html_escape(surname), inline = True) + # feature request 2356: avoid genitive form msg = _("This page contains an index of all the individuals in the " "database with the surname of %s. Selecting the person’s name " "will take you to that person’s individual page.") % surname