2007-10-16 Stephane Charette <stephanecharette@gmail.com>
* src/plugins/rel_nl.py: wrong linebreaks in previous commit! svn: r9195
This commit is contained in:
@ -1,3 +1,6 @@
|
|||||||
|
2007-10-16 Stephane Charette <stephanecharette@gmail.com>
|
||||||
|
* src/plugins/rel_nl.py: wrong linebreaks in previous commit!
|
||||||
|
|
||||||
2007-10-15 Stephane Charette <stephanecharette@gmail.com>
|
2007-10-15 Stephane Charette <stephanecharette@gmail.com>
|
||||||
* src/plugins/rel_nl.py: fixes contributed by Frederik De
|
* src/plugins/rel_nl.py: fixes contributed by Frederik De
|
||||||
Richter <frederik.de.richter@googlemail.com> and Benny
|
Richter <frederik.de.richter@googlemail.com> and Benny
|
||||||
|
@ -295,8 +295,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
|||||||
|
|
||||||
def get_relationship(self,orig_person,other_person):
|
def get_relationship(self,orig_person,other_person):
|
||||||
"""
|
"""
|
||||||
Returns a string representing the relationshp between the two peopl
|
Returns a string representing the relationshp between the two people,
|
||||||
e,
|
|
||||||
along with a list of common ancestors (typically father,mother)
|
along with a list of common ancestors (typically father,mother)
|
||||||
|
|
||||||
Special cases: relation strings "", "undefined" and "spouse".
|
Special cases: relation strings "", "undefined" and "spouse".
|
||||||
@ -311,11 +310,9 @@ e,
|
|||||||
if is_spouse:
|
if is_spouse:
|
||||||
return (is_spouse,[])
|
return (is_spouse,[])
|
||||||
|
|
||||||
(firstRel,secondRel,common) = self.get_relationship_distance(orig
|
(firstRel,secondRel,common) = self.get_relationship_distance(orig_person,other_person)
|
||||||
_person,other_person)
|
|
||||||
|
|
||||||
if type(common) == types.StringType or type(common) == type
|
if type(common) == types.StringType or type(common) == types.UnicodeType:
|
||||||
s.UnicodeType:
|
|
||||||
return (common,[])
|
return (common,[])
|
||||||
elif common:
|
elif common:
|
||||||
person_handle = common[0]
|
person_handle = common[0]
|
||||||
@ -339,18 +336,14 @@ s.UnicodeType:
|
|||||||
return (self.get_daughter(firstRel), common)
|
return (self.get_daughter(firstRel), common)
|
||||||
elif secondRel > firstRel:
|
elif secondRel > firstRel:
|
||||||
if other_person.get_gender() == RelLib.Person.MALE:
|
if other_person.get_gender() == RelLib.Person.MALE:
|
||||||
return (self.get_uncle(secondRel - firstRel,firstRel), comm
|
return (self.get_uncle(secondRel - firstRel,firstRel), common)
|
||||||
on)
|
|
||||||
else:
|
else:
|
||||||
return (self.get_aunt(secondRel - firstRel, firstRel), comm
|
return (self.get_aunt(secondRel - firstRel, firstRel), common)
|
||||||
on)
|
|
||||||
elif secondRel < firstRel:
|
elif secondRel < firstRel:
|
||||||
if other_person.get_gender() == RelLib.Person.MALE:
|
if other_person.get_gender() == RelLib.Person.MALE:
|
||||||
return (self.get_nephew(firstRel - secondRel, secondRel), c
|
return (self.get_nephew(firstRel - secondRel, secondRel), common)
|
||||||
ommon)
|
|
||||||
else:
|
else:
|
||||||
return (self.get_niece(firstRel - secondRel, secondRel), co
|
return (self.get_niece(firstRel - secondRel, secondRel), common)
|
||||||
mmon)
|
|
||||||
else:
|
else:
|
||||||
if other_person.get_gender() == RelLib.Person.MALE:
|
if other_person.get_gender() == RelLib.Person.MALE:
|
||||||
return (self.get_male_cousin(firstRel -1), common)
|
return (self.get_male_cousin(firstRel -1), common)
|
||||||
@ -374,14 +367,12 @@ mmon)
|
|||||||
## else:
|
## else:
|
||||||
## if other_person.get_gender() == RelLib.Person.MALE:
|
## if other_person.get_gender() == RelLib.Person.MALE:
|
||||||
## if firstRel+secondRel>len(_level_name)-1:
|
## if firstRel+secondRel>len(_level_name)-1:
|
||||||
## return (self.get_male_cousin(firstRel+secondRel),comm
|
## return (self.get_male_cousin(firstRel+secondRel),common)
|
||||||
on)
|
|
||||||
## else:
|
## else:
|
||||||
## return ('verre neef',common)
|
## return ('verre neef',common)
|
||||||
## else:
|
## else:
|
||||||
## if firstRel+secondRel>len(_level_name)-1:
|
## if firstRel+secondRel>len(_level_name)-1:
|
||||||
## return (self.get_female_cousin(firstRel+secondRel),co
|
## return (self.get_female_cousin(firstRel+secondRel),common)
|
||||||
mmon)
|
|
||||||
## else:
|
## else:
|
||||||
## return ('verre nicht',common)
|
## return ('verre nicht',common)
|
||||||
|
|
||||||
@ -391,8 +382,7 @@ mmon)
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
register_relcalc(RelationshipCalculator,
|
register_relcalc(RelationshipCalculator,
|
||||||
["nl", "NL", "nl_NL", "nl_BE", "nederlands", "Nederlands", "nl_NL.UTF8"
|
["nl", "NL", "nl_NL", "nl_BE", "nederlands", "Nederlands", "nl_NL.UTF8",
|
||||||
,
|
|
||||||
"nl_BE.UTF8","nl_NL@euro", "nl_NL.UTF8@euro","nl_BE@euro",
|
"nl_BE.UTF8","nl_NL@euro", "nl_NL.UTF8@euro","nl_BE@euro",
|
||||||
"dutch","Dutch", "nl_NL.UTF-8", "nl_BE.UTF-8","nl_NL.utf-8",
|
"dutch","Dutch", "nl_NL.UTF-8", "nl_BE.UTF-8","nl_NL.utf-8",
|
||||||
"nl_BE.utf-8","nl_NL.utf8", "nl_BE.UTF-8", "nl_BE.UTF8@euro"])
|
"nl_BE.utf-8","nl_NL.utf8", "nl_BE.UTF-8", "nl_BE.UTF8@euro"])
|
||||||
|
Reference in New Issue
Block a user