* src/plugins/IndivComplete.py: fixed child_relations translation

* src/const.py.in: fixed child_relations translation
* src/SelectChild.py: fixed child_relations translation
* src/TransTable.py: unicode conversion
* src/ChooseParents.py: fixed child_relations translation


svn: r2836
This commit is contained in:
Alex Roitman 2004-02-15 07:21:29 +00:00
parent 47a66cdf75
commit ff2fda64a0
5 changed files with 26 additions and 20 deletions

View File

@ -25,6 +25,12 @@
* src/Plugins.py: Register _relcalc_class. * src/Plugins.py: Register _relcalc_class.
* src/gramps_main.py: Use class of relationship calculator. * src/gramps_main.py: Use class of relationship calculator.
* src/plugins/IndivComplete.py: fixed child_relations translation
* src/const.py.in: fixed child_relations translation
* src/SelectChild.py: fixed child_relations translation
* src/TransTable.py: unicode conversion
* src/ChooseParents.py: fixed child_relations translation
2004-02-13 Egyeki Gergely <egeri@elte.hu> 2004-02-13 Egyeki Gergely <egeri@elte.hu>
* src/po/hu.po: Update * src/po/hu.po: Update
* doc/gramps-manual/hu/filtref.xml: Update * doc/gramps-manual/hu/filtref.xml: Update

View File

@ -1,7 +1,7 @@
# #
# Gramps - a GTK+/GNOME based genealogy program # Gramps - a GTK+/GNOME based genealogy program
# #
# Copyright (C) 2000-2003 Donald N. Allingham # Copyright (C) 2000-2004 Donald N. Allingham
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -384,14 +384,14 @@ class ChooseParents:
of the main perosn. of the main perosn.
""" """
try: try:
mother_rel = const.child_relations(self.mother_rel.get_text()) mother_rel = const.child_relations.find_value(self.mother_rel.get_text())
except KeyError: except KeyError:
mother_rel = const.child_relations("Birth") mother_rel = const.child_relations.find_value("Birth")
try: try:
father_rel = const.child_relations(self.father_rel.get_text()) father_rel = const.child_relations.find_value(self.father_rel.get_text())
except KeyError: except KeyError:
father_rel = const.childRelations("Birth") father_rel = const.child_relations.find_value("Birth")
if self.father or self.mother: if self.father or self.mother:
if self.mother and not self.father: if self.mother and not self.father:
@ -580,8 +580,8 @@ class ModifyParents:
Called with the OK button nis pressed. Saves the selected people as parents Called with the OK button nis pressed. Saves the selected people as parents
of the main perosn. of the main perosn.
""" """
mother_rel = const.childRelations(self.mother_rel.get_text()) mother_rel = const.child_relations.find_value(self.mother_rel.get_text())
father_rel = const.childRelations(self.father_rel.get_text()) father_rel = const.child_relations.find_value(self.father_rel.get_text())
mod = 0 mod = 0
if mother_rel != self.orig_mrel or father_rel != self.orig_frel: if mother_rel != self.orig_mrel or father_rel != self.orig_frel:

View File

@ -2,7 +2,7 @@
# #
# Gramps - a GTK+/GNOME based genealogy program # Gramps - a GTK+/GNOME based genealogy program
# #
# Copyright (C) 2000-2003 Donald N. Allingham # Copyright (C) 2000-2004 Donald N. Allingham
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -223,13 +223,13 @@ class SelectChild:
self.family.add_child_id(select_child) self.family.add_child_id(select_child)
mrel = const.child_relations(self.mrel.get_text()) mrel = const.child_relations.find_value(self.mrel.get_text())
mother = self.family.get_mother_id() mother = self.family.get_mother_id()
if mother and mother.get_gender() != RelLib.Person.female: if mother and mother.get_gender() != RelLib.Person.female:
if mrel == "Birth": if mrel == "Birth":
mrel = "Unknown" mrel = "Unknown"
frel = const.child_relations(self.frel.get_text()) frel = const.child_relations.find_value(self.frel.get_text())
father = self.family.get_father_id() father = self.family.get_father_id()
if father and father.get_gender() !=RelLib. Person.male: if father and father.get_gender() !=RelLib. Person.male:
if frel == "Birth": if frel == "Birth":
@ -353,13 +353,13 @@ class EditRel:
self.top.destroy() self.top.destroy()
def on_ok_clicked(self,obj): def on_ok_clicked(self,obj):
mrel = const.child_relations(self.mentry.get_text()) mrel = const.child_relations.find_value(self.mentry.get_text())
mother = self.family.get_mother_id() mother = self.family.get_mother_id()
if mother and mother.get_gender() != RelLib.Person.female: if mother and mother.get_gender() != RelLib.Person.female:
if mrel == "Birth": if mrel == "Birth":
mrel = "Unknown" mrel = "Unknown"
frel = const.child_relations(self.fentry.get_text()) frel = const.child_relations.find_value(self.fentry.get_text())
father = self.family.get_father_id() father = self.family.get_father_id()
if father and father.get_gender() !=RelLib. Person.male: if father and father.get_gender() !=RelLib. Person.male:
if frel == "Birth": if frel == "Birth":

View File

@ -167,7 +167,7 @@ shortopts = "i:o:f:a:?"
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
childRelations = { child_relations = TransTable( {
_("Birth") : "Birth", _("Birth") : "Birth",
_("Adopted") : "Adopted", _("Adopted") : "Adopted",
_("Stepchild") : "Stepchild", _("Stepchild") : "Stepchild",
@ -176,7 +176,7 @@ childRelations = {
_("None") : "None", _("None") : "None",
_("Unknown") : "Unknown", _("Unknown") : "Unknown",
_("Other") : "Other", _("Other") : "Other",
} })
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@ -202,7 +202,7 @@ class IndivComplete(Report.Report):
father = family.get_father_id() father = family.get_father_id()
if father: if father:
fname = father.get_primary_name().get_regular_name() fname = father.get_primary_name().get_regular_name()
frel = const.child_relations[frel] frel = const.child_relations.find_value(frel)
self.write_p_entry(_('Father'),fname,frel) self.write_p_entry(_('Father'),fname,frel)
else: else:
self.write_p_entry(_('Father'),'','') self.write_p_entry(_('Father'),'','')
@ -210,7 +210,7 @@ class IndivComplete(Report.Report):
mother = family.get_mother_id() mother = family.get_mother_id()
if mother: if mother:
fname = mother.get_primary_name().get_regular_name() fname = mother.get_primary_name().get_regular_name()
frel = const.child_relations(frel) frel = const.child_relations.find_value(frel)
self.write_p_entry(_('Mother'),fname,frel) self.write_p_entry(_('Mother'),fname,frel)
else: else:
self.write_p_entry(_('Mother'),'','') self.write_p_entry(_('Mother'),'','')