Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

## gramps-devel

 [Gramps-devel] relationships calculator From: - 2006-08-29 18:08:26 Attachments: rel_fr.py ```Hi, Actually the "relcal_fr" use a simple string "relative parent" for most cousins :( and the relationships.py use: > def get_cousin(self,level,removed): > if removed > len(_removed_level)-1 or level>len(_level_name)-1: > return "distant relative" > else: > return "%s cousin%s" % (_level_name[level],_removed_level[removed]) OK, but most latin country add end-letter on feminine word (example in french: cousine for female and cousin for male) and sometimes it is hard to understand "eleventh cousin twenty times removed" :( That's why, I try to use a new relationships calculator based on generation (with level), something like: + distant ancestor, at generation %s ... + distant descendant, at generation -%s ... + brother of a distant ancestor, at generation %s ... + nephew of distant ancestor, at generation %s ... + distant relative, cousin at generation %s of distant ancestor ... + distant relative, at generation %s of distant ancestor ... You always know where is the link relation (at generation XX) sound good, but for me !!! I remove (_name_level) and (_removed_level) lists and add a "level" list (=generation number) If someone have a complex relationships database and would like to test this modified tool or to debug it ... Regards, -- Jérôme Rapinat ```
 Re: [Gramps-devel] relationships calculator From: Alex Roitman - 2006-09-01 20:25:28 Attachments: Message as HTML ```J=C3=A9r=C3=B4me, On Tue, 2006-08-29 at 19:55 +0200, J=C3=A9r=C3=B4me wrote: > Actually the "relcal_fr" use a simple string "relative parent" for most=20 > cousins :( and the relationships.py use: >=20 > > def get_cousin(self,level,removed): > > if removed > len(_removed_level)-1 or level>len(_level_name)-1: > > return "distant relative" > > else: > > return "%s cousin%s" % (_level_name[level],_removed_level[r= emoved]) >=20 > OK, but most latin country add end-letter on feminine word (example in=20 > french: cousine for female and cousin for male) and sometimes it is hard=20 > to understand "eleventh cousin twenty times removed" :( Sorry, but I don't understand. The French relationship calculator takes care of this, does it not? Alex --=20 Alexander Roitman http://www.gramps-project.org ```
 Re: [Gramps-devel] relationships calculator From: - 2006-09-02 06:12:33 ```Alex, > Sorry, but I don't understand. The French relationship calculator > takes care of this, does it not? I never saw the string "le cousin au %s degré" % (_level_name[level]) only 'le cousin lointain' and 'le cousin germain' when I use the French relationship calculator !!! Actually, the French relationship calculator use : > if other_person.get_gender() == RelLib.Person.MALE: > if firstRel+secondRel>len(_level_name)-1: > return (self.get_male_cousin(firstRel+secondRel),common) > else: > return ('le cousin lointain',common) > else: > if firstRel+secondRel>len(_level_name)-1: > return (self.get_female_cousin(firstRel+secondRel),common) > else: > return ('la cousine lointaine',common) and > def get_male_cousin(self,level): > if level>len(_level_name)-1: > return "le parent lointain" > else: > return "le cousin au %s degré" % (_level_name[level]) > > def get_female_cousin(self,level): > if level>len(_level_name)-1: > return "la parente lointaine" > else: > return "la cousine au %s degré" % (_level_name[level]) we also have : > elif firstRel == 2 and secondRel == 2: > if other_person.get_gender() == RelLib.Person.MALE: > return ('le cousin germain',common) > else: > return ('la cousine germaine',common) We could add the same code as the relationships.py with a removed_level list but personally that does not speak to me (eleventh cousin twenty times removed) !!! Actually, there are generic answers/returns (distant relative, distant ancestors, etc ...) I just try to make a type of calculator only based on generation (level). At the beginning it was for the cousins then I added it to everyone. I use "(level and removed)" for working with senior and junior cousins !!! But I will not commit this modified French relationship calculator on SVN, it works fine for *me* : "generation number" give me the people common ancestors level for all persons on database then their name, that's all. And it is more helpful when I use "relationships" on status bar. I know that the code could be simpler but it works for me ... I saw other % (level) for gramps relationships calculators with a lot of code/runtime/definition, I just use another method. Alex Roitman a écrit : > Jérôme, > > On Tue, 2006-08-29 at 19:55 +0200, Jérôme wrote: >> Actually the "relcal_fr" use a simple string "relative parent" for most >> cousins :( and the relationships.py use: >> >>> def get_cousin(self,level,removed): >>> if removed > len(_removed_level)-1 or level>len(_level_name)-1: >>> return "distant relative" >>> else: >>> return "%s cousin%s" % (_level_name[level],_removed_level[removed]) >> OK, but most latin country add end-letter on feminine word (example in >> french: cousine for female and cousin for male) and sometimes it is hard >> to understand "eleventh cousin twenty times removed" :( > > Sorry, but I don't understand. The French relationship calculator > takes care of this, does it not? > > Alex > -- Jérôme Rapinat p3.vert.ukl.yahoo.com uncompressed Sat Sep 2 05:27:00 GMT 2006 ___________________________________________________________________________ Duvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! Yahoo! Questions/Rnses pour partager vos connaissances, vos opinions et vos expences. http://fr.answers.yahoo.com ```