Fix Polish relationship problem

svn: r8720
This commit is contained in:
Alex Roitman 2007-07-16 21:19:24 +00:00
parent ca1e510b3e
commit 220dd4ed43
2 changed files with 66 additions and 61 deletions

View File

@ -1,3 +1,6 @@
2007-07-16 Piotr Czubaszek <pioterus@gmail.com>
* src/plugins/rel_pl.py: Update.
2007-07-15 Zsolt Foldvari <zfoldvar@users.sourceforge.net> 2007-07-15 Zsolt Foldvari <zfoldvar@users.sourceforge.net>
* src/MarkupText.py: support font and color formats. * src/MarkupText.py: support font and color formats.

View File

@ -1,4 +1,4 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Gramps - a GTK+/GNOME based genealogy program # Gramps - a GTK+/GNOME based genealogy program
# #
@ -341,7 +341,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
return _father_level[level] return _father_level[level]
def get_son(self,other_level,orig_level): def get_son(self,other_level,orig_level):
level=other_level level=orig_level
if level>len(_son_level)-1: if level>len(_son_level)-1:
return "oddalony pra*wnuk (%d. stopień pokrewieństwa)" %(other_level+orig_level) return "oddalony pra*wnuk (%d. stopień pokrewieństwa)" %(other_level+orig_level)
else: else:
@ -355,7 +355,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
return _mother_level[level] return _mother_level[level]
def get_daughter(self,other_level,orig_level): def get_daughter(self,other_level,orig_level):
level=other_level level=orig_level
if level>len(_daughter_level)-1: if level>len(_daughter_level)-1:
return "oddalona pra*wnuczka (%d. stopień pokrewieństwa)" %(other_level+orig_level) return "oddalona pra*wnuczka (%d. stopień pokrewieństwa)" %(other_level+orig_level)
else: else:
@ -671,6 +671,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
continue continue
else: else:
ancFamily = self.db.get_family_from_handle(ancFamily_handle) ancFamily = self.db.get_family_from_handle(ancFamily_handle)
children = ancFamily.get_child_ref_list() children = ancFamily.get_child_ref_list()
for sibling_handle in children: for sibling_handle in children:
if sibling_handle.ref in firstList: if sibling_handle.ref in firstList:
@ -708,3 +709,4 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
register_relcalc(RelationshipCalculator, register_relcalc(RelationshipCalculator,
["pl","PL","pl_PL","polski","Polski","pl_PL.UTF-8", "pl_PL.UTF8", "pl_PL.utf-8", "pl_PL.utf8", "pl_PL.iso-8859-2", "pl_PL.iso8859-2", "pl_PL.cp1250", "pl_PL.cp-1250"]) ["pl","PL","pl_PL","polski","Polski","pl_PL.UTF-8", "pl_PL.UTF8", "pl_PL.utf-8", "pl_PL.utf8", "pl_PL.iso-8859-2", "pl_PL.iso8859-2", "pl_PL.cp1250", "pl_PL.cp-1250"])