From ff2fda64a0b3ce0d43a69c4500aa776e29923365 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Sun, 15 Feb 2004 07:21:29 +0000 Subject: [PATCH] * 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 --- gramps2/ChangeLog | 6 ++++++ gramps2/src/ChooseParents.py | 22 +++++++++++----------- gramps2/src/SelectChild.py | 10 +++++----- gramps2/src/const.py.in | 4 ++-- gramps2/src/plugins/IndivComplete.py | 4 ++-- 5 files changed, 26 insertions(+), 20 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index c56427035..5397964ad 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -25,6 +25,12 @@ * src/Plugins.py: Register _relcalc_class. * 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 * src/po/hu.po: Update * doc/gramps-manual/hu/filtref.xml: Update diff --git a/gramps2/src/ChooseParents.py b/gramps2/src/ChooseParents.py index a21eaa74a..581e24be4 100644 --- a/gramps2/src/ChooseParents.py +++ b/gramps2/src/ChooseParents.py @@ -1,7 +1,7 @@ # # 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 # it under the terms of the GNU General Public License as published by @@ -101,8 +101,8 @@ class ChooseParents: Utils.set_titles(self.top,self.glade.get_widget('title'), text,_('Choose Parents')) - self.mother_rel = self.glade.get_widget("mrel") - self.father_rel = self.glade.get_widget("frel") + self.mother_rel = self.glade.get_widget("mrel") + self.father_rel = self.glade.get_widget("frel") self.fcombo = self.glade.get_widget("prel_combo") self.prel = self.glade.get_widget("prel") self.title = self.glade.get_widget("chooseTitle") @@ -384,14 +384,14 @@ class ChooseParents: of the main perosn. """ 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: - mother_rel = const.child_relations("Birth") + mother_rel = const.child_relations.find_value("Birth") 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: - father_rel = const.childRelations("Birth") + father_rel = const.child_relations.find_value("Birth") if self.father or self.mother: if self.mother and not self.father: @@ -512,8 +512,8 @@ class ModifyParents: title = _("Modify the Parents of %s") % GrampsCfg.nameof(self.person) Utils.set_titles(self.top, self.title, title, _("Modify Parents")) - self.mother_rel = self.glade.get_widget("mrel") - self.father_rel = self.glade.get_widget("frel") + self.mother_rel = self.glade.get_widget("mrel") + self.father_rel = self.glade.get_widget("frel") self.flabel = self.glade.get_widget("flabel") self.mlabel = self.glade.get_widget("mlabel") @@ -580,8 +580,8 @@ class ModifyParents: Called with the OK button nis pressed. Saves the selected people as parents of the main perosn. """ - mother_rel = const.childRelations(self.mother_rel.get_text()) - father_rel = const.childRelations(self.father_rel.get_text()) + mother_rel = const.child_relations.find_value(self.mother_rel.get_text()) + father_rel = const.child_relations.find_value(self.father_rel.get_text()) mod = 0 if mother_rel != self.orig_mrel or father_rel != self.orig_frel: diff --git a/gramps2/src/SelectChild.py b/gramps2/src/SelectChild.py index 9db6ede6c..8db4b1f3b 100644 --- a/gramps2/src/SelectChild.py +++ b/gramps2/src/SelectChild.py @@ -2,7 +2,7 @@ # # 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 # 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) - mrel = const.child_relations(self.mrel.get_text()) + mrel = const.child_relations.find_value(self.mrel.get_text()) mother = self.family.get_mother_id() if mother and mother.get_gender() != RelLib.Person.female: if mrel == "Birth": 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() if father and father.get_gender() !=RelLib. Person.male: if frel == "Birth": @@ -353,13 +353,13 @@ class EditRel: self.top.destroy() 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() if mother and mother.get_gender() != RelLib.Person.female: if mrel == "Birth": 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() if father and father.get_gender() !=RelLib. Person.male: if frel == "Birth": diff --git a/gramps2/src/const.py.in b/gramps2/src/const.py.in index c4324696a..66947d209 100644 --- a/gramps2/src/const.py.in +++ b/gramps2/src/const.py.in @@ -167,7 +167,7 @@ shortopts = "i:o:f:a:?" # #------------------------------------------------------------------------- -childRelations = { +child_relations = TransTable( { _("Birth") : "Birth", _("Adopted") : "Adopted", _("Stepchild") : "Stepchild", @@ -176,7 +176,7 @@ childRelations = { _("None") : "None", _("Unknown") : "Unknown", _("Other") : "Other", - } + }) #------------------------------------------------------------------------- # diff --git a/gramps2/src/plugins/IndivComplete.py b/gramps2/src/plugins/IndivComplete.py index e00e26462..49e09bce4 100644 --- a/gramps2/src/plugins/IndivComplete.py +++ b/gramps2/src/plugins/IndivComplete.py @@ -202,7 +202,7 @@ class IndivComplete(Report.Report): father = family.get_father_id() if father: 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) else: self.write_p_entry(_('Father'),'','') @@ -210,7 +210,7 @@ class IndivComplete(Report.Report): mother = family.get_mother_id() if mother: 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) else: self.write_p_entry(_('Mother'),'','')