From 13792c6948ac1741a9a92eefb2755d10991bcd88 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sun, 20 Oct 2019 17:55:26 +0100 Subject: [PATCH 1/2] Remove Husband and Wife headings These are incorrect for same-sex relationships or when the couple are unmarried. Resolves #11199 --- gramps/plugins/textreport/familygroup.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/gramps/plugins/textreport/familygroup.py b/gramps/plugins/textreport/familygroup.py index edef8b8d1..8c4aa348e 100644 --- a/gramps/plugins/textreport/familygroup.py +++ b/gramps/plugins/textreport/familygroup.py @@ -287,7 +287,7 @@ class FamilyGroup(Report): self.doc.end_cell() self.doc.end_row() - def dump_parent(self, title, person_handle): + def dump_parent(self, table_name, person_handle): if not person_handle and not self.missing_info: return @@ -297,16 +297,12 @@ class FamilyGroup(Report): person = self.db.get_person_from_handle(person_handle) name = self._name_display.display(person) - self.doc.start_table(title, 'FGR-ParentTable') + self.doc.start_table(table_name, 'FGR-ParentTable') self.doc.start_row() self.doc.start_cell('FGR-ParentHead', 3) self.doc.start_paragraph('FGR-ParentName') mark = utils.get_person_mark(self.db, person) - # Translators: needed for French, ignore otherwise - self.doc.write_text(self._("%(str1)s: %(str2)s" - ) % {'str1' : title, - 'str2' : name}, - mark) + self.doc.write_text(name, mark) if self.gramps_ids: gid = person.get_gramps_id() if gid: @@ -624,7 +620,7 @@ class FamilyGroup(Report): self.doc.write_text('', mark) self.doc.end_paragraph() - self.dump_parent(self._("Husband"), family.get_father_handle()) + self.dump_parent('Parent1', family.get_father_handle()) self.doc.start_paragraph("FGR-blank") self.doc.end_paragraph() @@ -633,7 +629,7 @@ class FamilyGroup(Report): self.doc.start_paragraph("FGR-blank") self.doc.end_paragraph() - self.dump_parent(self._("Wife"), family.get_mother_handle()) + self.dump_parent('Parent2', family.get_mother_handle()) length = len(family.get_child_ref_list()) if length > 0: From a096901c5351ae068462f506e5f6511968114806 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sun, 20 Oct 2019 17:58:02 +0100 Subject: [PATCH 2/2] Replace Marriage heading with relationship type --- gramps/plugins/textreport/familygroup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gramps/plugins/textreport/familygroup.py b/gramps/plugins/textreport/familygroup.py index 8c4aa348e..a42cc8d38 100644 --- a/gramps/plugins/textreport/familygroup.py +++ b/gramps/plugins/textreport/familygroup.py @@ -399,11 +399,11 @@ class FamilyGroup(Report): self.doc.start_row() self.doc.start_cell('FGR-ParentHead', 3) self.doc.start_paragraph('FGR-ParentName') - header = self._("Marriage") + relationship_type = self._get_type(family.get_relationship()) + header = self._("Relationship: %s") % self._(relationship_type) if self.gramps_ids: header += " (%s)" % family.get_gramps_id() - # Translators: needed for French, ignore otherwise - self.doc.write_text(self._("%s:") % header) + self.doc.write_text(header) self.doc.end_paragraph() self.doc.end_cell() self.doc.end_row()