better wording and comments
svn: r11055
This commit is contained in:
parent
13938052ab
commit
00b27bebbe
@ -131,8 +131,9 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
Relationship.RelationshipCalculator.__init__(self)
|
Relationship.RelationshipCalculator.__init__(self)
|
||||||
|
|
||||||
# de la personne active à l'ascendant commun Ga=[level] pour
|
# RelCalc tool - Status Bar
|
||||||
# le calculateur de relations
|
|
||||||
|
# de la personne active à l'ascendant commun Ga=[level]
|
||||||
|
|
||||||
def get_cousin(self, level, removed, dir = '', inlaw=''):
|
def get_cousin(self, level, removed, dir = '', inlaw=''):
|
||||||
if removed == 0 and level < len(_level_name):
|
if removed == 0 and level < len(_level_name):
|
||||||
@ -180,6 +181,8 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
if level > len(_level_name)-1:
|
if level > len(_level_name)-1:
|
||||||
return "l'ascendant lointain, à la %s génération" % (
|
return "l'ascendant lointain, à la %s génération" % (
|
||||||
_level_name[level])
|
_level_name[level])
|
||||||
|
elif level == 1:
|
||||||
|
return "un parent%s" % (inlaw)
|
||||||
else:
|
else:
|
||||||
return "un parent lointain%s" % (inlaw)
|
return "un parent lointain%s" % (inlaw)
|
||||||
|
|
||||||
@ -201,6 +204,8 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
if level > len(_level_name)-1:
|
if level > len(_level_name)-1:
|
||||||
return "le descendant lointain, à la %s génération" % (
|
return "le descendant lointain, à la %s génération" % (
|
||||||
_level_name[level+1])
|
_level_name[level+1])
|
||||||
|
elif level == 1:
|
||||||
|
return "un enfant%s" % (inlaw)
|
||||||
else:
|
else:
|
||||||
return "un descendant lointain%s" % (inlaw)
|
return "un descendant lointain%s" % (inlaw)
|
||||||
|
|
||||||
@ -325,7 +330,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
return rel_str
|
return rel_str
|
||||||
|
|
||||||
|
|
||||||
# quick report /RelCalc tool
|
# quick report (missing on RelCalc tool - Status Bar)
|
||||||
|
|
||||||
def get_single_relationship_string(self, Ga, Gb, gender_a, gender_b,
|
def get_single_relationship_string(self, Ga, Gb, gender_a, gender_b,
|
||||||
reltocommon_a, reltocommon_b,
|
reltocommon_a, reltocommon_b,
|
||||||
@ -352,11 +357,13 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
if Gb == 0 :
|
if Gb == 0 :
|
||||||
rel_str = 'le même individu'
|
rel_str = 'le même individu'
|
||||||
elif gender_b == gen.lib.Person.MALE and Gb < len(_son_level):
|
elif gender_b == gen.lib.Person.MALE and Gb < len(_son_level):
|
||||||
|
# spouse of daughter
|
||||||
if inlaw and Gb == 1 and not step:
|
if inlaw and Gb == 1 and not step:
|
||||||
rel_str = "le gendre"
|
rel_str = "le gendre"
|
||||||
else:
|
else:
|
||||||
rel_str = self.get_son(Gb)
|
rel_str = self.get_son(Gb)
|
||||||
elif gender_b == gen.lib.Person.FEMALE and Gb < len(_daughter_level):
|
elif gender_b == gen.lib.Person.FEMALE and Gb < len(_daughter_level):
|
||||||
|
# spouse of son
|
||||||
if inlaw and Gb == 1 and not step:
|
if inlaw and Gb == 1 and not step:
|
||||||
rel_str = "la bru"
|
rel_str = "la bru"
|
||||||
else:
|
else:
|
||||||
@ -373,17 +380,21 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
elif Gb == 0:
|
elif Gb == 0:
|
||||||
# b is parents/grand parent of a
|
# b is parents/grand parent of a
|
||||||
if gender_b == gen.lib.Person.MALE and Ga < len(_father_level):
|
if gender_b == gen.lib.Person.MALE and Ga < len(_father_level):
|
||||||
if inlaw and Ga == 1 and not step:
|
# other spouse of father (new parent)
|
||||||
rel_str = "le père du conjoint"
|
if Ga == 1 and inlaw and self.STEP_SIB:
|
||||||
elif step and Ga == 1 and not inlaw:
|
|
||||||
rel_str = "le beau-père"
|
rel_str = "le beau-père"
|
||||||
|
# father of spouse (family of spouse)
|
||||||
|
elif Ga == 1 and inlaw:
|
||||||
|
rel_str = "le père du conjoint"
|
||||||
else:
|
else:
|
||||||
rel_str = self.get_father(Ga, inlaw)
|
rel_str = self.get_father(Ga, inlaw)
|
||||||
elif gender_b == gen.lib.Person.FEMALE and Ga < len(_mother_level):
|
elif gender_b == gen.lib.Person.FEMALE and Ga < len(_mother_level):
|
||||||
if inlaw and Ga == 1 and not step:
|
# other spouse of mother (new parent)
|
||||||
rel_str = "la mère du conjoint"
|
if Ga == 1 and inlaw and self.STEP_SIB:
|
||||||
elif step and Ga == 1 and not inlaw:
|
|
||||||
rel_str = "la belle-mère"
|
rel_str = "la belle-mère"
|
||||||
|
# mother of spouse (family of spouse)
|
||||||
|
elif Ga == 1 and inlaw:
|
||||||
|
rel_str = "la mère du conjoint"
|
||||||
else:
|
else:
|
||||||
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:
|
||||||
@ -516,6 +527,8 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
return rel_str
|
return rel_str
|
||||||
return rel_str
|
return rel_str
|
||||||
|
|
||||||
|
# RelCalc tool - Status Bar
|
||||||
|
|
||||||
def get_sibling_relationship_string(self, sib_type, gender_a, gender_b,
|
def get_sibling_relationship_string(self, sib_type, gender_a, gender_b,
|
||||||
in_law_a=False, in_law_b=False):
|
in_law_a=False, in_law_b=False):
|
||||||
|
|
||||||
@ -531,7 +544,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
elif gender_b == gen.lib.Person.FEMALE:
|
elif gender_b == gen.lib.Person.FEMALE:
|
||||||
rel_str = 'la sœur (germaine)'
|
rel_str = 'la sœur (germaine)'
|
||||||
else:
|
else:
|
||||||
rel_str = 'le frère ou la sœur (germain)'
|
rel_str = 'le frère ou la sœur germain(e)'
|
||||||
else:
|
else:
|
||||||
if gender_b == gen.lib.Person.MALE:
|
if gender_b == gen.lib.Person.MALE:
|
||||||
rel_str = "le beau-frère"
|
rel_str = "le beau-frère"
|
||||||
@ -554,7 +567,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
rel_str = "la belle-sœur"
|
rel_str = "la belle-sœur"
|
||||||
else:
|
else:
|
||||||
rel_str = "le beau-frère ou la belle-sœur"
|
rel_str = "le beau-frère ou la belle-sœur"
|
||||||
#il faut penser à "mères différentes" (enfin, je crois !)
|
# Logique inversée ! Pourquoi ?
|
||||||
elif sib_type == self.HALF_SIB_MOTHER:
|
elif sib_type == self.HALF_SIB_MOTHER:
|
||||||
if gender_b == gen.lib.Person.MALE:
|
if gender_b == gen.lib.Person.MALE:
|
||||||
rel_str = "le demi-frère consanguin"
|
rel_str = "le demi-frère consanguin"
|
||||||
@ -562,7 +575,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
rel_str = "la demi-sœur consanguine"
|
rel_str = "la demi-sœur consanguine"
|
||||||
else:
|
else:
|
||||||
rel_str = "le demi-frère ou la demi-sœur consanguin(e)"
|
rel_str = "le demi-frère ou la demi-sœur consanguin(e)"
|
||||||
#il faut penser à "pères différents" (enfin, je crois !)
|
# Logique inversée ! Pourquoi ?
|
||||||
elif sib_type == self.HALF_SIB_FATHER:
|
elif sib_type == self.HALF_SIB_FATHER:
|
||||||
if gender_b == gen.lib.Person.MALE:
|
if gender_b == gen.lib.Person.MALE:
|
||||||
rel_str = "le demi-frère utérin"
|
rel_str = "le demi-frère utérin"
|
||||||
|
Loading…
Reference in New Issue
Block a user