Exemple #1
0
            if gender_b == Person.MALE:
                rel_str = "le demi-frère utérin"
            elif gender_b == Person.FEMALE:
                rel_str = "la demi-sœur utérine"
            else:
                rel_str = "le demi-frère ou la demi-sœur utérin(e)"
        elif sib_type == self.STEP_SIB:
            if gender_b == Person.MALE:
                rel_str = "le demi-frère"
            elif gender_b == Person.FEMALE:
                rel_str = "la demi-sœur"
            else:
                rel_str = "le demi-frère ou la demi-sœur"
        return rel_str

if __name__ == "__main__":

    # Test function. Call it as follows from the command line (so as to find
    #        imported modules):
    #    export PYTHONPATH=/path/to/gramps/src
    # python src/plugins/rel/rel_fr.py
    # (Above not needed here)

    """TRANSLATORS, copy this if statement at the bottom of your
        rel_xx.py module, and test your work with:
        python src/plugins/rel/rel_xx.py
    """
    from gramps.gen.relationship import test
    RC = RelationshipCalculator()
    test(RC, True)
Exemple #2
0
            only_birth = True
        elif sib_type == self.HALF_SIB_FATHER:
            rel = self.REL_FAM_BIRTH_FATH_ONLY
            only_birth = True
        elif sib_type == self.HALF_SIB_MOTHER:
            rel = self.REL_FAM_BIRTH_MOTH_ONLY
            only_birth = True
        elif sib_type == self.STEP_SIB:
            rel = self.REL_FAM_NONBIRTH
            only_birth = False
        return self._get_relationship_string(1, 1,
                                             self._gender_convert(gender_b),
                                             rel, rel,
                                             only_birth, in_law_a, in_law_b)


if __name__ == "__main__":
    # Test function. Call it as follows from the command line (so as to find
    #        imported modules):
    #    export PYTHONPATH=/path/to/gramps/src
    # python src/plugins/rel/rel_de.py
    # (Above not needed here)

    """TRANSLATORS, copy this if statement at the bottom of your
        rel_xx.py module, and test your work with:
        python src/plugins/rel/rel_xx.py
    """
    from gramps.gen.relationship import test
    rc = RelationshipCalculator()
    test(rc, True)
Exemple #3
0
                rel_str = "%s-krat-pra-strici v %s. kolenu" % (level - 2,
                                                               distance)
        else:  #Gb > Ga:
            # These are cousins in different generations with the second person
            # being in a lower generation from the common ancestor than the
            # first person.
            level = Gb - Ga
            if distance == 5:
                rel_str = "mali nečaki"
            elif level < len(_neph_niec):
                rel_str = "%s v %s. kolenu" % (_neph_niec[level], distance)
            else:
                rel_str = "%s-krat-pra-nečaki v %s. kolenu" % (level - 1,
                                                               distance)
        if in_law_b == True:
            rel_str = "zakonci, ki jih imajo %s" % rel_str
        return rel_str


if __name__ == "__main__":
    """TRANSLATORS, copy this if statement at the bottom of your 
      rel_xx.py module, and test your work with:
      python src/plugins/rel/rel_xx.py
  """
    from gramps.gen.relationship import test
    RC = RelationshipCalculator()
    test(RC, True)
#
#from PluginMgr import register_relcalc
#    register_relcalc(RelationshipCalculatorClass,["sl","sl_SI","sl-SI","slovenian","Slovenian","slovenščina"])
Exemple #4
0
            only_birth = True
        elif sib_type == self.HALF_SIB_FATHER:
            rel = self.REL_FAM_BIRTH_FATH_ONLY
            only_birth = True
        elif sib_type == self.HALF_SIB_MOTHER:
            rel = self.REL_FAM_BIRTH_MOTH_ONLY
            only_birth = True
        elif sib_type == self.STEP_SIB:
            rel = self.REL_FAM_NONBIRTH
            only_birth = False
        return self._get_relationship_string(1, 1,
                                             self._gender_convert(gender_b),
                                             rel, rel,
                                             only_birth, in_law_a, in_law_b)


if __name__ == "__main__":
    # Test function. Call it as follows from the command line (so as to find
    #        imported modules):
    #    export PYTHONPATH=/path/to/gramps/src
    # python src/plugins/rel/rel_de.py
    # (Above not needed here)

    """TRANSLATORS, copy this if statement at the bottom of your
        rel_xx.py module, and test your work with:
        python src/plugins/rel/rel_xx.py
    """
    from gramps.gen.relationship import test
    rc = RelationshipCalculator()
    test(rc, True)