From c4525d39d39e555aea4b63886391a03551db381a Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Tue, 20 Jan 2004 23:30:15 +0000 Subject: [PATCH] * src/const.py.in: handle new translation table class * src/NameEdit.py.in: handle new translation table class * src/EditPerson.py.in: handle new translation table class * src/TransTable.py: new Translation table class * src/GenericFilter.py: handle translated rule names * src/plugins/FilterEditor.py: handle translated rule names svn: r2679 --- src/EditPerson.py | 10 +++++----- src/NameEdit.py | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/EditPerson.py b/src/EditPerson.py index f31995114..95675de86 100644 --- a/src/EditPerson.py +++ b/src/EditPerson.py @@ -282,7 +282,7 @@ class EditPerson: or (not self.lds_sealing.isEmpty()): Utils.bold_label(self.lds_tab) - types = const.NameTypesMap.keys() + types = const.NameTypesMap.get_values() types.sort() self.autotype = AutoComp.AutoCombo(self.ntype_field,types) self.write_primary_name() @@ -1030,7 +1030,7 @@ class EditPerson: changed = 1 if surname.upper() != name.getSurname().upper(): changed = 1 - if ntype != const.InverseNameTypesMap[name.getType()]: + if ntype != const.NameTypesMap.find_value(name.getType()): changed = 1 if given != name.getFirstName(): changed = 1 @@ -1238,7 +1238,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(const.InverseNameTypesMap[name.getType()]) + self.name_type_field.set_text(const.NameTypesMap.find_value(name.getType())) if len(name.getSourceRefList()) > 0: psrc = name.getSourceRefList()[0] self.name_src_field.set_text(short(psrc.getBase().getTitle())) @@ -1387,8 +1387,8 @@ class EditPerson: if prefix != name.getSurnamePrefix(): name.setSurnamePrefix(prefix) - if const.NameTypesMap.has_key(ntype): - ntype = const.NameTypesMap[ntype] + if const.NameTypesMap.has_value(ntype): + ntype = const.NameTypesMap.find_key(ntype) else: ntype = "Birth Name" diff --git a/src/NameEdit.py b/src/NameEdit.py index beccfb8fc..de29b2319 100644 --- a/src/NameEdit.py +++ b/src/NameEdit.py @@ -70,7 +70,7 @@ class NameEditor: self.flowed = self.top.get_widget("alt_flowed") self.preform = self.top.get_widget("alt_preform") - types = const.NameTypesMap.keys() + types = const.NameTypesMap.get_values() types.sort() self.type_field.set_popdown_strings(types) self.typecomp = AutoComp.AutoEntry(self.type_field.entry,types) @@ -143,8 +143,8 @@ class NameEditor: type = unicode(self.type_field.entry.get_text()) - if const.NameTypesMap.has_key(type): - type = const.NameTypesMap[type] + if const.NameTypesMap.has_value(type): + type = const.NameTypesMap.find_key(type) else: type = "Also Known As"