From be0744d4540650a36311013b2d265834cfc60441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Thu, 19 Mar 2015 15:25:16 +0100 Subject: [PATCH] 8451: Fix crash on Relationships Graph report with unknown gender, related sibling label and french locale --- gramps/plugins/rel/rel_fr.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gramps/plugins/rel/rel_fr.py b/gramps/plugins/rel/rel_fr.py index 3d675b091..3a574b6c3 100644 --- a/gramps/plugins/rel/rel_fr.py +++ b/gramps/plugins/rel/rel_fr.py @@ -333,7 +333,7 @@ def get_child_unknown(level, inlaw=""): else: return "un descendant lointain%s" % inlaw -def get_sibling_unknown(inlaw=""): +def get_sibling_unknown(Ga, inlaw=""): """ sibling of an ancestor, gender = unknown """ @@ -653,7 +653,7 @@ class RelationshipCalculator(gramps.gen.relationship.RelationshipCalculator): elif gender_b == Person.FEMALE: rel_str = "la tante lointaine" + bygen % (Ga + 1) elif gender_b == Person.UNKNOWN: - rel_str = get_sibling_unknown(inlaw) + rel_str = get_sibling_unknown(Ga, inlaw) else: return rel_str elif Ga == 1: @@ -672,7 +672,7 @@ class RelationshipCalculator(gramps.gen.relationship.RelationshipCalculator): rel_str = "la nièce lointaine%s (%dème génération)" % \ (inlaw, Gb) elif gender_b == Person.UNKNOWN: - rel_str = get_sibling_unknown(inlaw) + rel_str = get_sibling_unknown(Ga, inlaw) else: return rel_str elif Ga == Gb: @@ -684,7 +684,7 @@ class RelationshipCalculator(gramps.gen.relationship.RelationshipCalculator): elif gender_b == Person.FEMALE: rel_str = get_cousine(Ga - 1, 0, inlaw=inlaw) elif gender_b == Person.UNKNOWN: - rel_str = get_sibling_unknown(inlaw) + rel_str = get_sibling_unknown(Ga, inlaw) else: return rel_str elif Ga > 1 and Ga > Gb: