diff --git a/ChangeLog b/ChangeLog index 2748889bd..c8f581aee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-11-06 Benny Malengier + * src/plugins/all_relations.py: english issues + * src/Relationship.py: english issues + 2007-11-06 Benny Malengier * src/Relationship.py: fix error with nephew, niece diff --git a/src/Relationship.py b/src/Relationship.py index 01a609068..19207beb2 100644 --- a/src/Relationship.py +++ b/src/Relationship.py @@ -36,10 +36,6 @@ from TransUtils import sgettext as _ # #------------------------------------------------------------------------- -STEP= 'step' -INLAW='-in-law' -HALF = 'half' - _level_name = [ "", "first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth", "eleventh", "twelfth", "thirteenth", "fourteenth", "fifteenth", "sixteenth", @@ -260,6 +256,11 @@ class RelationshipCalculator: STEP_SIB = 2 UNKNOWN_SIB = 3 + #sibling strings + STEP= 'step' + INLAW='-in-law' + HALF = 'half-' + #partner types PARTNER_MARRIED = 1 PARTNER_UNMARRIED = 2 @@ -1357,10 +1358,10 @@ class RelationshipCalculator: if only_birth: step = '' else: - step = STEP + step = self.STEP if in_law_a or in_law_b : - inlaw = INLAW + inlaw = self.INLAW else: inlaw = '' @@ -1443,12 +1444,12 @@ class RelationshipCalculator: if sib_type == self.NORM_SIB or sib_type == self.UNKNOWN_SIB: typestr = '' elif sib_type == self.HALF_SIB: - typestr = HALF + typestr = self.HALF elif sib_type == self.STEP_SIB: - typestr = STEP + typestr = self.STEP if in_law_a or in_law_b : - inlaw = INLAW + inlaw = self.INLAW else: inlaw = '' diff --git a/src/plugins/all_relations.py b/src/plugins/all_relations.py index 781a6c86a..8c22b7760 100644 --- a/src/plugins/all_relations.py +++ b/src/plugins/all_relations.py @@ -204,16 +204,18 @@ class AllRelReport(): and self.rel_class.only_birth(relation[4]) distorig = len(relation[4]) distother = len(relation[2]) - if distorig == 1 or distother ==1 : + if distorig == 1 and distother == 1 and not inlawa \ + and not inlawb: rel_str = self.rel_class.get_sibling_relationship_string( self.rel_class.get_sibling_type( self.database, pers1, pers2), self.home_person.get_gender(), - pers2.get_gender()) - rel_str = self.rel_class.get_single_relationship_string( + self.person.get_gender()) + else: + rel_str = self.rel_class.get_single_relationship_string( distorig, distother, self.home_person.get_gender(), - pers2.get_gender(), + self.person.get_gender(), relation[4], relation[2], only_birth = birth, in_law_a = inlawa, in_law_b = inlawb)