* 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
This commit is contained in:
Alex Roitman 2003-06-13 23:06:03 +00:00
parent 218bffffdb
commit 5385792d1d
4 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2003-06-13 Alex Roitman <shura@alex.neuro.umn.edu>
* 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 <twaugh@redhat.com>
* src/docgen/OpenOfficeDoc.py: Escape special XML characters.
* src/docgen/HtmlDoc.py: Properly build style declaration.

View File

@ -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()))

View File

@ -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']

View File

@ -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()