Fixed translation messages
svn: r221
This commit is contained in:
parent
0a4d254e33
commit
f28b87524f
@ -120,7 +120,7 @@ class Marriage:
|
|||||||
self.load_images()
|
self.load_images()
|
||||||
|
|
||||||
self.type_field.set_popdown_strings(const.familyRelations)
|
self.type_field.set_popdown_strings(const.familyRelations)
|
||||||
self.type_field.entry.set_text(family.getRelationship())
|
self.type_field.entry.set_text(const.display_frel(family.getRelationship()))
|
||||||
|
|
||||||
# stored object data
|
# stored object data
|
||||||
top_window.set_data(MARRIAGE,self)
|
top_window.set_data(MARRIAGE,self)
|
||||||
@ -159,7 +159,8 @@ class Marriage:
|
|||||||
detail = "N"
|
detail = "N"
|
||||||
if attr.getSourceRef():
|
if attr.getSourceRef():
|
||||||
detail = detail + "S"
|
detail = detail + "S"
|
||||||
self.attr_list.append([attr.getType(),attr.getValue(),details])
|
self.attr_list.append([const.display_fattr(attr.getType()),\
|
||||||
|
attr.getValue(),details])
|
||||||
self.attr_list.set_row_data(self.attr_index,attr)
|
self.attr_list.set_row_data(self.attr_index,attr)
|
||||||
self.attr_index = self.attr_index + 1
|
self.attr_index = self.attr_index + 1
|
||||||
|
|
||||||
@ -276,8 +277,8 @@ def on_close_marriage_editor(obj):
|
|||||||
family_obj = obj.get_data(MARRIAGE)
|
family_obj = obj.get_data(MARRIAGE)
|
||||||
|
|
||||||
relation = family_obj.type_field.entry.get_text()
|
relation = family_obj.type_field.entry.get_text()
|
||||||
if relation != family_obj.family.getRelationship():
|
if const.save_frel(relation) != family_obj.family.getRelationship():
|
||||||
family_obj.family.setRelationship(relation)
|
family_obj.family.setRelationship(const.save_frel(relation))
|
||||||
utils.modified()
|
utils.modified()
|
||||||
|
|
||||||
text = family_obj.notes_field.get_chars(0,-1)
|
text = family_obj.notes_field.get_chars(0,-1)
|
||||||
@ -671,7 +672,7 @@ def on_attr_list_select_row(obj,row,b,c):
|
|||||||
family_obj = obj.get_data(MARRIAGE)
|
family_obj = obj.get_data(MARRIAGE)
|
||||||
attr = obj.get_row_data(row)
|
attr = obj.get_row_data(row)
|
||||||
|
|
||||||
family_obj.attr_type.set_text(attr.getType())
|
family_obj.attr_type.set_text(const.display_fattr(attr.getType()))
|
||||||
family_obj.attr_value.set_text(attr.getValue())
|
family_obj.attr_value.set_text(attr.getValue())
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -686,7 +687,7 @@ def on_update_attr_clicked(obj):
|
|||||||
|
|
||||||
family_obj = obj.get_data(MARRIAGE)
|
family_obj = obj.get_data(MARRIAGE)
|
||||||
attr = obj.get_row_data(row)
|
attr = obj.get_row_data(row)
|
||||||
attr.setType(family_obj.attr_type.get_text())
|
attr.setType(const.save_fattr(family_obj.attr_type.get_text()))
|
||||||
attr.setValue(family_obj.attr_value.get_text())
|
attr.setValue(family_obj.attr_value.get_text())
|
||||||
|
|
||||||
family_obj.redraw_attr_list()
|
family_obj.redraw_attr_list()
|
||||||
@ -721,7 +722,7 @@ def on_add_attr_clicked(obj):
|
|||||||
|
|
||||||
attr = Attribute()
|
attr = Attribute()
|
||||||
name = family_obj.attr_type.get_text()
|
name = family_obj.attr_type.get_text()
|
||||||
attr.setType(name)
|
attr.setType(const.save_fattr(name))
|
||||||
attr.setValue(family_obj.attr_value.get_text())
|
attr.setValue(family_obj.attr_value.get_text())
|
||||||
|
|
||||||
if name not in const.familyAttributes:
|
if name not in const.familyAttributes:
|
||||||
|
@ -1663,7 +1663,7 @@ AbiWord
|
|||||||
<class>GtkEntry</class>
|
<class>GtkEntry</class>
|
||||||
<child_name>GnomeEntry:entry</child_name>
|
<child_name>GnomeEntry:entry</child_name>
|
||||||
<name>entry2</name>
|
<name>entry2</name>
|
||||||
<tooltip>The default directory for the output of the Web Site report generators</tooltip>
|
<tooltip>The default directory for the output of the Web Site report generators</tooltip>
|
||||||
<can_focus>True</can_focus>
|
<can_focus>True</can_focus>
|
||||||
<signal>
|
<signal>
|
||||||
<name>changed</name>
|
<name>changed</name>
|
||||||
|
111
src/const.py
111
src/const.py
@ -219,7 +219,7 @@ _pe_e2l = {
|
|||||||
"Elected" : _("Elected"),
|
"Elected" : _("Elected"),
|
||||||
"Emigration" : _("Emigration"),
|
"Emigration" : _("Emigration"),
|
||||||
"Graduation" : _("Graduation"),
|
"Graduation" : _("Graduation"),
|
||||||
"Military Service" : _("_MILT"),
|
"Military Service" : _("Military Service"),
|
||||||
"Naturalization" : _("Naturalization"),
|
"Naturalization" : _("Naturalization"),
|
||||||
"Occupation" : _("Occupation"),
|
"Occupation" : _("Occupation"),
|
||||||
"Probate" : _("Probate"),
|
"Probate" : _("Probate"),
|
||||||
@ -297,15 +297,81 @@ def save_pattr(st):
|
|||||||
else:
|
else:
|
||||||
return st
|
return st
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
familyConstantAttributes = {
|
familyConstantAttributes = {
|
||||||
}
|
}
|
||||||
|
|
||||||
familyConstantRelations = [
|
_fa_e2l = {
|
||||||
"Married",
|
}
|
||||||
"Common Law",
|
|
||||||
"Partners",
|
_fa_l2e = {}
|
||||||
"Unknown"
|
for a in _fa_e2l.keys():
|
||||||
]
|
_fa_l2e[_fa_e2l[a]] = a
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
def display_fattr(st):
|
||||||
|
if _fa_e2l.has_key(st):
|
||||||
|
return _fa_e2l[st]
|
||||||
|
else:
|
||||||
|
return st
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
def save_fattr(st):
|
||||||
|
if _fa_l2e.has_key(st):
|
||||||
|
return _fa_l2e[st]
|
||||||
|
else:
|
||||||
|
return st
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
|
_fr_e2l = {
|
||||||
|
"Married" : _("Married"),
|
||||||
|
"Common Law" : _("Common Law"),
|
||||||
|
"Partners" : _("Partners"),
|
||||||
|
"Unknown" : _("Unknown")
|
||||||
|
}
|
||||||
|
|
||||||
|
_fr_l2e = {}
|
||||||
|
for a in _fa_e2l.keys():
|
||||||
|
_fa_l2e[_fa_e2l[a]] = a
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
def display_frel(st):
|
||||||
|
if _fr_e2l.has_key(st):
|
||||||
|
return _fr_e2l[st]
|
||||||
|
else:
|
||||||
|
return st
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
def save_frel(st):
|
||||||
|
if _fr_l2e.has_key(st):
|
||||||
|
return _fr_l2e[st]
|
||||||
|
else:
|
||||||
|
return st
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -343,11 +409,32 @@ def initialize_personal_attribute_list():
|
|||||||
p.sort()
|
p.sort()
|
||||||
return p
|
return p
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
def initialize_family_attribute_list():
|
||||||
|
p = []
|
||||||
|
for event in familyConstantAttributes.keys():
|
||||||
|
p.append(_fa_e2l[event])
|
||||||
|
p.sort()
|
||||||
|
return p
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
def initialize_family_relation_list():
|
||||||
|
p = []
|
||||||
|
for event in _fr_e2l.keys():
|
||||||
|
p.append(_fr_e2l[event])
|
||||||
|
p.sort()
|
||||||
|
return p
|
||||||
|
|
||||||
personalEvents = initialize_personal_event_list()
|
personalEvents = initialize_personal_event_list()
|
||||||
personalAttributes = initialize_personal_attribute_list()
|
personalAttributes = initialize_personal_attribute_list()
|
||||||
marriageEvents = initialize_marriage_event_list()
|
marriageEvents = initialize_marriage_event_list()
|
||||||
|
familyAttributes = initialize_family_attribute_list()
|
||||||
familyAttributes = familyConstantAttributes.keys()
|
familyRelations = initialize_family_relation_list()
|
||||||
familyAttributes.sort()
|
|
||||||
|
|
||||||
familyRelations = familyConstantRelations
|
|
||||||
|
@ -555,13 +555,11 @@ def new_database_response(val):
|
|||||||
if val == 1:
|
if val == 1:
|
||||||
return
|
return
|
||||||
|
|
||||||
const.personalEvents = const.personalConstantEvents.keys()
|
const.personalEvents = const.initialize_personal_event_list()
|
||||||
const.personalEvents.sort()
|
const.personalAttributes = const.initialize_personal_attribute_list()
|
||||||
const.personalAttributes = const.personalConstantAttributes.keys()
|
const.marriageEvents = const.initialize_marriage_event_list()
|
||||||
const.personalAttributes.sort()
|
const.familyAttributes = const.initialize_family_attribute_list()
|
||||||
const.familyAttributes = const.familyConstantAttributes.keys()
|
const.familyRelations = const.initialize_family_relation_list()
|
||||||
const.familyAttributes.sort()
|
|
||||||
const.familyRelations = const.familyConstantRelations
|
|
||||||
database.new()
|
database.new()
|
||||||
topWindow.set_title("Gramps")
|
topWindow.set_title("Gramps")
|
||||||
active_person = None
|
active_person = None
|
||||||
@ -1372,19 +1370,11 @@ def on_revert_activate(obj):
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def revert_query(value):
|
def revert_query(value):
|
||||||
if value == 0:
|
if value == 0:
|
||||||
const.personalEvents = const.personalConstantEvents.keys()
|
const.personalEvents = const.initialize_personal_event_list()
|
||||||
const.personalEvents.sort()
|
const.personalAttributes = const.initialize_personal_attribute_list()
|
||||||
|
const.marriageEvents = const.initialize_marriage_event_list()
|
||||||
const.personalAttributes = const.personalConstantAttributes.keys()
|
const.familyAttributes = const.initialize_family_attribute_list()
|
||||||
const.personalAttributes.sort()
|
const.familyRelations = const.initialize_family_relation_list()
|
||||||
|
|
||||||
const.familyAttributes = const.familyConstantAttributes.keys()
|
|
||||||
const.familyAttributes.sort()
|
|
||||||
|
|
||||||
const.marriageEvents = const.familyConstantEvents.keys()
|
|
||||||
const.marriageEvents.sort()
|
|
||||||
|
|
||||||
const.familyRelations = const.familyConstantRelations
|
|
||||||
|
|
||||||
file = database.getSavePath()
|
file = database.getSavePath()
|
||||||
database.new()
|
database.new()
|
||||||
@ -1946,13 +1936,21 @@ def load_database(name):
|
|||||||
|
|
||||||
mylist = database.getPersonEventTypes()
|
mylist = database.getPersonEventTypes()
|
||||||
for type in mylist:
|
for type in mylist:
|
||||||
if type not in const.personalEvents:
|
ntype = const.display_pevent(type)
|
||||||
const.personalEvents.append(type)
|
if ntype not in const.personalEvents:
|
||||||
|
const.personalEvents.append(ntype)
|
||||||
|
|
||||||
|
mylist = database.getFamilyEventTypes()
|
||||||
|
for type in mylist:
|
||||||
|
ntype = const.display_fevent(type)
|
||||||
|
if ntype not in const.marriageEvents:
|
||||||
|
const.marriageEvents.append(ntype)
|
||||||
|
|
||||||
mylist = database.getPersonAttributeTypes()
|
mylist = database.getPersonAttributeTypes()
|
||||||
for type in mylist:
|
for type in mylist:
|
||||||
if type not in const.personalAttributes:
|
ntype = const.display_pattr(type)
|
||||||
const.personalAttributes.append(type)
|
if ntype not in const.personalAttributes:
|
||||||
|
const.personalAttributes.append(ntype)
|
||||||
|
|
||||||
mylist = database.getFamilyAttributeTypes()
|
mylist = database.getFamilyAttributeTypes()
|
||||||
for type in mylist:
|
for type in mylist:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user