From 5385792d1dcb8ef1e0efd07dc176c2162b2d6078 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Fri, 13 Jun 2003 23:06:03 +0000 Subject: [PATCH] * src/const.py.in: Add InverseNameTypesMap. * src/plugins/IndivComplete.py: Use InverseNameTypesMap for alternate names. * src/EditPerson.py (on_name_select_row): Display translated name type. svn: r1722 --- ChangeLog | 7 +++++++ src/EditPerson.py | 2 +- src/const.py.in | 7 +++++++ src/plugins/IndivComplete.py | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 83d7cd34b..bad155c92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-06-13 Alex Roitman + * src/const.py.in: Add InverseNameTypesMap. + * src/plugins/IndivComplete.py: Use InverseNameTypesMap for + alternate names. + * src/EditPerson.py (on_name_select_row): Display translated + name type. + 2003-06-13 Tim Waugh * src/docgen/OpenOfficeDoc.py: Escape special XML characters. * src/docgen/HtmlDoc.py: Properly build style declaration. diff --git a/src/EditPerson.py b/src/EditPerson.py index 3c0aae89a..60dc30068 100644 --- a/src/EditPerson.py +++ b/src/EditPerson.py @@ -1133,7 +1133,7 @@ class EditPerson: self.alt_last_field.set_text(name.getSurname()) self.alt_suffix_field.set_text(name.getSuffix()) self.alt_prefix_field.set_text(name.getSurnamePrefix()) - self.name_type_field.set_text(name.getType()) + self.name_type_field.set_text(const.InverseNameTypesMap[name.getType()]) if len(name.getSourceRefList()) > 0: psrc = name.getSourceRefList()[0] self.name_src_field.set_text(short(psrc.getBase().getTitle())) diff --git a/src/const.py.in b/src/const.py.in index 901227f37..1e89dad20 100644 --- a/src/const.py.in +++ b/src/const.py.in @@ -920,4 +920,11 @@ NameTypesMap = { _("Other Name") : "Other Name", } +InverseNameTypesMap = { + "Also Known As" : _("Also Known As"), + "Birth Name" : _("Birth Name"), + "Married Name" : _("Married Name"), + "Other Name" : _("Other Name"), + } + logical_functions = ['or', 'and', 'xor', 'one'] diff --git a/src/plugins/IndivComplete.py b/src/plugins/IndivComplete.py index 16090fa68..cc2960609 100644 --- a/src/plugins/IndivComplete.py +++ b/src/plugins/IndivComplete.py @@ -217,7 +217,7 @@ class IndivComplete: self.d.end_row() for name in self.person.getAlternateNames(): - type = const.NameTypesMap[name.getType()] + type = const.InverseNameTypesMap[name.getType()] self.d.start_row() self.normal_cell(type) text = name.getRegularName()