* 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
This commit is contained in:
parent
c1bab34822
commit
c4525d39d3
@ -282,7 +282,7 @@ class EditPerson:
|
|||||||
or (not self.lds_sealing.isEmpty()):
|
or (not self.lds_sealing.isEmpty()):
|
||||||
Utils.bold_label(self.lds_tab)
|
Utils.bold_label(self.lds_tab)
|
||||||
|
|
||||||
types = const.NameTypesMap.keys()
|
types = const.NameTypesMap.get_values()
|
||||||
types.sort()
|
types.sort()
|
||||||
self.autotype = AutoComp.AutoCombo(self.ntype_field,types)
|
self.autotype = AutoComp.AutoCombo(self.ntype_field,types)
|
||||||
self.write_primary_name()
|
self.write_primary_name()
|
||||||
@ -1030,7 +1030,7 @@ class EditPerson:
|
|||||||
changed = 1
|
changed = 1
|
||||||
if surname.upper() != name.getSurname().upper():
|
if surname.upper() != name.getSurname().upper():
|
||||||
changed = 1
|
changed = 1
|
||||||
if ntype != const.InverseNameTypesMap[name.getType()]:
|
if ntype != const.NameTypesMap.find_value(name.getType()):
|
||||||
changed = 1
|
changed = 1
|
||||||
if given != name.getFirstName():
|
if given != name.getFirstName():
|
||||||
changed = 1
|
changed = 1
|
||||||
@ -1238,7 +1238,7 @@ class EditPerson:
|
|||||||
self.alt_last_field.set_text(name.getSurname())
|
self.alt_last_field.set_text(name.getSurname())
|
||||||
self.alt_suffix_field.set_text(name.getSuffix())
|
self.alt_suffix_field.set_text(name.getSuffix())
|
||||||
self.alt_prefix_field.set_text(name.getSurnamePrefix())
|
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:
|
if len(name.getSourceRefList()) > 0:
|
||||||
psrc = name.getSourceRefList()[0]
|
psrc = name.getSourceRefList()[0]
|
||||||
self.name_src_field.set_text(short(psrc.getBase().getTitle()))
|
self.name_src_field.set_text(short(psrc.getBase().getTitle()))
|
||||||
@ -1387,8 +1387,8 @@ class EditPerson:
|
|||||||
if prefix != name.getSurnamePrefix():
|
if prefix != name.getSurnamePrefix():
|
||||||
name.setSurnamePrefix(prefix)
|
name.setSurnamePrefix(prefix)
|
||||||
|
|
||||||
if const.NameTypesMap.has_key(ntype):
|
if const.NameTypesMap.has_value(ntype):
|
||||||
ntype = const.NameTypesMap[ntype]
|
ntype = const.NameTypesMap.find_key(ntype)
|
||||||
else:
|
else:
|
||||||
ntype = "Birth Name"
|
ntype = "Birth Name"
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ class NameEditor:
|
|||||||
self.flowed = self.top.get_widget("alt_flowed")
|
self.flowed = self.top.get_widget("alt_flowed")
|
||||||
self.preform = self.top.get_widget("alt_preform")
|
self.preform = self.top.get_widget("alt_preform")
|
||||||
|
|
||||||
types = const.NameTypesMap.keys()
|
types = const.NameTypesMap.get_values()
|
||||||
types.sort()
|
types.sort()
|
||||||
self.type_field.set_popdown_strings(types)
|
self.type_field.set_popdown_strings(types)
|
||||||
self.typecomp = AutoComp.AutoEntry(self.type_field.entry,types)
|
self.typecomp = AutoComp.AutoEntry(self.type_field.entry,types)
|
||||||
@ -143,8 +143,8 @@ class NameEditor:
|
|||||||
|
|
||||||
type = unicode(self.type_field.entry.get_text())
|
type = unicode(self.type_field.entry.get_text())
|
||||||
|
|
||||||
if const.NameTypesMap.has_key(type):
|
if const.NameTypesMap.has_value(type):
|
||||||
type = const.NameTypesMap[type]
|
type = const.NameTypesMap.find_key(type)
|
||||||
else:
|
else:
|
||||||
type = "Also Known As"
|
type = "Also Known As"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user