Beispiel #1
0
            if gender_b == gen.lib.Person.MALE:
                rel_str = "nevlastný brat -spoloč.matka"
            elif gender_b == gen.lib.Person.FEMALE:
                rel_str = "nevlastná sestra -spoloč.matka"
            else:
                rel_str = "nevlastný brat alebo sestra -spoloč.matka"
        elif sib_type == self.STEP_SIB:
            if gender_b == gen.lib.Person.MALE:
                rel_str = "nevlastný brat"
            elif gender_b == gen.lib.Person.FEMALE:
                rel_str = "nevlastná sestra"
            else:
                rel_str = "nevlastný brat alebo sestra"
        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_sk.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 Relationship import test
    RC = RelationshipCalculator()
    test(RC, True)
Beispiel #2
0
            rel = self.REL_FAM_BIRTH
            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 Relationship import test
    rc = RelationshipCalculator()
    test(rc, True)