|
|
Customers Important Contributors Translator GenoPro version: 3.1.0.1
Last Login: Friday, November 25, 2022
Posts: 334,
Visits: 7,574
|
GenoProSupport (8/30/2005)Remove the space between {0} and {1} in the tag _FmtPlaceNarrative have something like below. By removing this space, there will be no space between the prefix and the place name. I don't know how I missed it... I agree, and this is why I want to have a built-in translation of names. The translation would be done automatically by GenoPro, so calling ToHtmlHyperlink would return the translated name inside the hyperlink. So what should I do now? shell I translate the report or wait until this option will be enabled? I am not sure about this, however you are welcome to write a function ToBe2Ind where the object is always an individual. Translating into multiple languages is new to me. I did my best to write a report structure to facilitate the translation, but I realize there is still many improvements. I agree that this is a great chalange. I am sure that we will manage to do it together. I know that I can write a function to do what I want. But, when I'm translating the report I want to keep the original code as much as I can, so future changes will not affect the translated code. For ti I'm trying to enter the changes to the dictionary.xml file. Of course I still have to do little modifications in the original code. I brought this up to see if we can find a "GenoPro solution" for this.
|
|
|
Administrators Moderators Customers Gamma FamilyTrees.GenoPro.com Translator GenoPro version: 3.1.0.1
Last Login: 2 hours ago
Posts: 4,886,
Visits: 22,776
|
Here is my suggestion:1. Create a function ToBe2Ind and use it whenever necessary. Send me the code and I will update it to the master template, so next update everyone benefits from your change. 2. You are welcome to translate the Dictionary.xml into Hebrew. This work will be preserved. Then, when the automatic translation of names is available, you won't have much to do. The automatic name translation will use a different XML file than Dictionary.xml.
|
|
|
Customers Important Contributors Translator GenoPro version: 3.1.0.1
Last Login: Friday, November 25, 2022
Posts: 334,
Visits: 7,574
|
GenoProSupport 1. Create a function ToBe2Ind and use it whenever necessary. Send me the code and I will update it to the master template, so next update everyone benefits from your change.No problem. I meant to write this function anyway. I'm going to write it to be used on both posibilities. GenoProSupport 2. You are welcome to translate the Dictionary.xml into Hebrew. This work will be preserved. Then, when the automatic translation of names is available, you won't have much to do. The automatic name translation will use a different XML file than Dictionary.xml.Are you refering to the NameDictionary.xml or to another XML file?
|
|
|
Administrators Moderators Customers Gamma FamilyTrees.GenoPro.com Translator GenoPro version: 3.1.0.1
Last Login: 2 hours ago
Posts: 4,886,
Visits: 22,776
|
Yehudad [quote]Are you refering to the NameDictionary.xml or to another XML file?File NameDictionary.xml. I forgot I had already given a name in the following code snipet: Set oNameDictionary = Util.NewNameDictionary oNameDictionary.BuildLookupTable "NameDictionary.xml", "EN", "JA" strName = oNameDictionary("Daniel") ' Should return the Japanese name |
|
|
|
Customers Important Contributors Translator GenoPro version: 3.1.0.1
Last Login: Friday, November 25, 2022
Posts: 334,
Visits: 7,574
|
GenoProSupport Create a function ToBe2Ind and use it whenever necessary. Send me the code and I will update it to the master template, so next update everyone benefits from your change. I have a little problem creating this function. When you call the function ToBe2 , you send two objects. For example: i and i.father . If I want to put the right linguistic phrase, I have to know the gender of the second object (in the example it can be either the father or the mother of an individual). My questions: 1. Is the object i.father has the same structure as i (which mean I can access his gender.id )? - when I tried it in the code the gender was not found. If Not how can I get it to send it to my function? 2. Can you explain more about the method you use in the function Util.GetStatisticsForIndividuals(obj1) ? 3. We spoke about it in the past - what about documentation on all the available methods in each object, and all the objects in the Report Generator?
Edited: Tuesday, August 30, 2005 by
GenoProSupport
|
|
|
Administrators Moderators Customers Gamma FamilyTrees.GenoPro.com Translator GenoPro version: 3.1.0.1
Last Login: 2 hours ago
Posts: 4,886,
Visits: 22,776
|
The property i.father does return another individual. You can chain them together. For instance, if you want to get the maternal grandfather's picture, you can do the following: i.father.mother.pictures.primary . I verified if you can access the gender.id and it does. For instance, the following code works flawlessly for every individual: I knew someonw would ask about Util.GetStatisticsForIndividuals(obj1) . The method GetStatisticsForIndividuals return a number representing the statistics of one individual or a collection of individuals. In short, the number 1 represents one individual and the number 2 represents two (or more) individuals. The number 4 means one individual deceased, and the number 8 means two individuals deceased. Of course, you cannot have one individual deceased without an individual, so the value for one indivdiual deceased is 5 (4+1) and two individuals deceased is (4+4+1+1). I am documenting this method at http://www.genopro.com/NewReportGenerator/Objects/Util/GetStatisticsForIndividuals/
Edited: Tuesday, August 30, 2005 by
GenoProSupport
|
|
|
Customers Important Contributors Translator GenoPro version: 3.1.0.1
Last Login: Friday, November 25, 2022
Posts: 334,
Visits: 7,574
|
GenoProSupport
The property i.father does return another individual. You can chain them together. For instance, if you want to get the maternal grandfather's picture, you can do the following: i.father.mother.pictures.primary . I verified if you can access the gender.id and it does. For instance, the following code works flawlessly for every individual: Report.WriteText "Gender: " & i.mother.father.gender.id |
I tried to extract i.father.gender.id yesterday, but when I generated the report it said that he can't found "is_" in the dictionary.xml, which means that it didn't got "M" or "F" to the string. I will have to try it again then...
Edited: Tuesday, August 30, 2005 by
Yehudad
|
|
|
Administrators Moderators Customers Gamma FamilyTrees.GenoPro.com Translator GenoPro version: 3.1.0.1
Last Login: 2 hours ago
Posts: 4,886,
Visits: 22,776
|
Maybe you have an older version of Dictionary.xml. Try generating it from the a fresh copy of Beta14. The sample code Report.WriteText "Gender: " & i.mother.father.gender.id | does not use the dictionary.
|
|
|
Customers Important Contributors Translator GenoPro version: 3.1.0.1
Last Login: Friday, November 25, 2022
Posts: 334,
Visits: 7,574
|
GenoProSupport Maybe you have an older version of Dictionary.xml. Try generating it from the a fresh copy of Beta14. I do use the Beta14 copy. My function looks like this: Function ToBe2Ind(ind1, ind2)Dim nStatistics1, nStatistics2 nStatistics1 = Util.GetStatisticsForIndividuals(ind1) nStatistics2 = Util.GetStatisticsForIndividuals(ind2) ... ' Additional code for Hebrew IndGender = ind2.gender.id DicWord = DicWord & "_" & IndGender ToBe2Ind = Dic(DicWord) End Function |
Where ind1 = i and ind2 = i.father. DicWord gets is/are/was/were the same way as it is today. If I use ind1 to get the gender.id there is no problem. The current row, with ind2 is not returning anything.
|
|
|
Administrators Moderators Customers Gamma FamilyTrees.GenoPro.com Translator GenoPro version: 3.1.0.1
Last Login: 2 hours ago
Posts: 4,886,
Visits: 22,776
|
Sometimes ind2 is set to Nothing , and there is nothing the report generator can do to prevent a runtime error from happening. In this case, you need to use the method Util.IsNothing . Can you try try the following code:If (Not Util.IsNothing(ind2)) Then IndGender = ind2.gender.id End If |
|