*** empty log message ***

svn: r2743
This commit is contained in:
Egyeki Gergelly 2004-02-01 14:30:33 +00:00
parent 6767c3a35a
commit d0bf7819ed
2 changed files with 55 additions and 9 deletions

View File

@ -1,3 +1,6 @@
2004-01-31 Egyeki Gergely <egeri@elte.hu>
* src/plugins/rel_hu.py: Update
2004-01-31 Michel Guitel <michel.guitel@free.fr> 2004-01-31 Michel Guitel <michel.guitel@free.fr>
* doc/gramps-manual/fr/faq.xml: Update. * doc/gramps-manual/fr/faq.xml: Update.
* doc/gramps-manual/fr/gramps-manual.xml: Update. * doc/gramps-manual/fr/gramps-manual.xml: Update.

View File

@ -21,9 +21,8 @@
# #
# Written by Egyeki Gergely <egeri@elte.hu>, 2004 # Written by Egyeki Gergely <egeri@elte.hu>, 2004
# Valószínüleg vannak hibák... # TODO: sógor, sógornő
# TODO: após, anyós, meny, vő #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
# GRAMPS modules # GRAMPS modules
@ -54,10 +53,6 @@ _level =\
# #
# Specific relationship functions # Specific relationship functions
# #
# To be honest, I doubt that this relationship naming method is widely
# spread... If you know of a rigorous, italian naming convention,
# please, drop me an email.
#
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
def get_parents (level): def get_parents (level):
@ -141,9 +136,11 @@ def get_male_cousin (level):
def get_female_cousin (level): def get_female_cousin (level):
return get_male_cousin(level) return get_male_cousin(level)
#----------------------------------------------
#
# brother and sister age differences # brother and sister age differences
#
#----------------------------------------------
def get_age_comp(orig_person,other_person): def get_age_comp(orig_person,other_person):
# 0=nothing, -1=other is younger 1=other is older # 0=nothing, -1=other is younger 1=other is older
@ -165,6 +162,33 @@ def get_age_sister (level):
elif level == 1 : return "húga" elif level == 1 : return "húga"
else : return "nővére" else : return "nővére"
#---------------------------------------------
#
# en: father-in-law, mother-in-law, son-in-law, daughter-in-law
# hu: após, anyós, vő, meny
#
#---------------------------------------------
def is_fathermother_in_law(orig,other):
# sp = []
for f in other.getFamilyList():
if other == f.getFather(): sp = f.getMother
elif other == f.getMother() : sp = f.getFather
for g in orig.getFamilyList():
if sp in g.getChildList(): return 1
return 0
def get_fathermother_in_law_child(orig,other):
# sp = []
for f in other.getFamilyList():
if other == f.getFather(): sp = f.getMother
elif other == f.getMother() : sp = f.getFather
for g in orig.getFamilyList():
if sp in g.getChildList(): return [sp]
return []
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -190,9 +214,28 @@ def get_relationship(orig_person,other_person):
if orig_person == other_person: if orig_person == other_person:
return ('', []) return ('', [])
if is_spouse(orig_person,other_person): if is_spouse(orig_person,other_person):
return ("házastársa",[]) return ("házastársa",[])
if is_fathermother_in_law(orig_person,other_person):
if orig_person.getGender() == RelLib.Person.male:
return ("apósa",get_fathermother_in_law_child(orig_person,other_person))
elif orig_person.getGender() == RelLib.Person.female:
return ("anyósa",get_fathermother_in_law_child(orig_person,other_person))
elif orig_person.getGender() == 2 :
return ("apósa vagy anyósa",get_fathermother_in_law_child(orig_person,other_person))
if is_fathermother_in_law(other_person,orig_person):
if other_person.getGender() == RelLib.Person.male:
return ("veje",get_fathermother_in_law_child(other_person,orig_person))
elif other_person.getGender() == RelLib.Person.female:
return ("menye",get_fathermother_in_law_child(other_person,orig_person))
elif other_person.getGender() == 2 :
return ("veje vagy menye",get_fathermother_in_law_child(other_person,orig_person))
apply_filter(orig_person,0,firstList,firstMap) apply_filter(orig_person,0,firstList,firstMap)
apply_filter(other_person,0,secondList,secondMap) apply_filter(other_person,0,secondList,secondMap)