/plugins/rel_fr.py add inlaw
svn: r9311
This commit is contained in:
parent
f6d4bf1b60
commit
90a29e390b
@ -148,9 +148,8 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
|
|
||||||
def get_cousine(self, level, removed, dir = '', step='', inlaw=''):
|
def get_cousine(self, level, removed, dir = '', step='', inlaw=''):
|
||||||
if removed == 0 and level < len(_level_name):
|
if removed == 0 and level < len(_level_name):
|
||||||
# 'e' for step
|
return "la %s cousine%s%s" % (_level_name[level-1],
|
||||||
return "la %s cousine%s%s%s" % (_level_name[level-1],
|
step, inlaw)
|
||||||
step,'e', inlaw)
|
|
||||||
elif (level) < (removed):
|
elif (level) < (removed):
|
||||||
rel_str = self.get_aunt(Ga, inlaw)
|
rel_str = self.get_aunt(Ga, inlaw)
|
||||||
else:
|
else:
|
||||||
@ -322,6 +321,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
return rel_str
|
return rel_str
|
||||||
return rel_str
|
return rel_str
|
||||||
|
|
||||||
|
|
||||||
# quick report /RelCalc tool
|
# quick report /RelCalc tool
|
||||||
|
|
||||||
def get_single_relationship_string(self, Ga, Gb, gender_a, gender_b,
|
def get_single_relationship_string(self, Ga, Gb, gender_a, gender_b,
|
||||||
@ -333,37 +333,23 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
"""
|
"""
|
||||||
## print 'Ga, Gb :', Ga, Gb
|
## print 'Ga, Gb :', Ga, Gb
|
||||||
|
|
||||||
# jerome, I would delete this logic
|
|
||||||
# a step father or step uncle is the relation to a person
|
|
||||||
# who does not go with birth rel.
|
|
||||||
# I am still adding this to english...
|
|
||||||
# benny, I will see if I am able to just add it on sibling
|
|
||||||
# children and cousins first levels
|
|
||||||
|
|
||||||
if reltocommon_a != '':
|
|
||||||
reltocommon = reltocommon_a
|
|
||||||
else:
|
|
||||||
reltocommon = ''
|
|
||||||
|
|
||||||
if only_birth:
|
if only_birth:
|
||||||
step = ' germain'
|
step = ''
|
||||||
elif (reltocommon != '' and
|
#if birthfather == None and birthmother != None:
|
||||||
reltocommon_a[-1] == self.REL_FAM_BIRTH_MOTH_ONLY):
|
#step = ' utérin'
|
||||||
step = ' utérin'
|
#elif birthmother == None and birthfather != None:
|
||||||
elif (reltocommon != '' and
|
#step = ' consanguin'
|
||||||
reltocommon_a[-1] == REL_FAM_BIRTH_FATH_ONLY):
|
|
||||||
step = ' consanguin'
|
|
||||||
else:
|
else:
|
||||||
step = ''
|
step = ''
|
||||||
|
|
||||||
#'bru/gendre' for 'daughter/son in-law',
|
|
||||||
#'beau-père' for 'father-in-law', use (by alliance) !!!
|
|
||||||
if in_law_a or in_law_b :
|
if in_law_a or in_law_b :
|
||||||
inlaw = ' (par alliance)'
|
inlaw = ' (par alliance)'
|
||||||
else:
|
else:
|
||||||
inlaw = ''
|
inlaw = ''
|
||||||
|
|
||||||
rel_str = "un parent éloigné"
|
HALF = 'demi-'
|
||||||
|
|
||||||
|
rel_str = "un parent%s éloigné%s" % (step, inlaw)
|
||||||
bygen = " par la %sème génération"
|
bygen = " par la %sème génération"
|
||||||
if Ga == 0:
|
if Ga == 0:
|
||||||
# b is descendant of a
|
# b is descendant of a
|
||||||
@ -374,11 +360,11 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
elif gender_b == gen.lib.Person.FEMALE and Gb < len(_daughter_level):
|
elif gender_b == gen.lib.Person.FEMALE and Gb < len(_daughter_level):
|
||||||
rel_str = self.get_daughter(Gb, step)
|
rel_str = self.get_daughter(Gb, step)
|
||||||
elif Gb < len(_level_name) and gender_b == gen.lib.Person.MALE:
|
elif Gb < len(_level_name) and gender_b == gen.lib.Person.MALE:
|
||||||
rel_str = "le descendant éloigné (%dème génération)" % (
|
rel_str = "le descendant éloigné%s (%dème génération)" % (
|
||||||
Gb+1)
|
step, Gb+1)
|
||||||
elif Gb < len(_level_name) and gender_b == gen.lib.Person.FEMALE:
|
elif Gb < len(_level_name) and gender_b == gen.lib.Person.FEMALE:
|
||||||
rel_str = "la descendante éloignée (%dème génération)" % (
|
rel_str = "la descendante éloignée%s (%dème génération)" % (
|
||||||
Gb+1)
|
step, Gb+1)
|
||||||
else:
|
else:
|
||||||
return self.get_child_unknown(Gb, step)
|
return self.get_child_unknown(Gb, step)
|
||||||
elif Gb == 0:
|
elif Gb == 0:
|
||||||
@ -388,11 +374,11 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
elif gender_b == gen.lib.Person.FEMALE and Ga < len(_mother_level):
|
elif gender_b == gen.lib.Person.FEMALE and Ga < len(_mother_level):
|
||||||
rel_str = self.get_mother(Ga, inlaw)
|
rel_str = self.get_mother(Ga, inlaw)
|
||||||
elif Ga < len(_level_name) and gender_b == gen.lib.Person.MALE:
|
elif Ga < len(_level_name) and gender_b == gen.lib.Person.MALE:
|
||||||
rel_str = "l'ascendant éloigné (%dème génération)" % (
|
rel_str = "l'ascendant éloigné%s (%dème génération)" % (
|
||||||
Ga+1)
|
inlaw, Ga+1)
|
||||||
elif Ga < len(_level_name) and gender_b == gen.lib.Person.FEMALE:
|
elif Ga < len(_level_name) and gender_b == gen.lib.Person.FEMALE:
|
||||||
rel_str = "l'ascendante éloignée (%dème génération)" % (
|
rel_str = "l'ascendante éloignée%s (%dème génération)" % (
|
||||||
Ga+1)
|
inlaw, Ga+1)
|
||||||
else:
|
else:
|
||||||
return self.get_parent_unknown(Ga, inlaw)
|
return self.get_parent_unknown(Ga, inlaw)
|
||||||
elif Gb == 1:
|
elif Gb == 1:
|
||||||
@ -418,11 +404,11 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
rel_str = self.get_niece(Gb-1, inlaw)
|
rel_str = self.get_niece(Gb-1, inlaw)
|
||||||
else:
|
else:
|
||||||
if gender_b == gen.lib.Person.MALE:
|
if gender_b == gen.lib.Person.MALE:
|
||||||
rel_str = "le neveu éloigné (%dème génération)" % (
|
rel_str = "le neveu éloigné%s (%dème génération)" % (
|
||||||
Gb)
|
inlaw, Gb)
|
||||||
elif gender_b == gen.lib.Person.FEMALE:
|
elif gender_b == gen.lib.Person.FEMALE:
|
||||||
rel_str = "la nièce éloignée (%dème génération)" % (
|
rel_str = "la nièce éloignée%s (%dème génération)" % (
|
||||||
Gb)
|
inlaw, Gb)
|
||||||
else:
|
else:
|
||||||
return rel_str
|
return rel_str
|
||||||
elif Ga == Gb:
|
elif Ga == Gb:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user