By Yehudad - Tuesday, July 17, 2007
|
The ReportGenerator uses StrHtmlHyperlink to create hyperlink (for example the mother's name). My problem is that I can't translate this name into Hebrew with my NameDictionary.xml because the ReportGenerator takes the name internaly. Is there a way the ReportGenerator will create the Hyperlink with an Hebrew text?
|
By genome - Tuesday, July 17, 2007
|
I seem to have overlooked this requirement when implementing the NameDictionary feature in the Narrative Report. I need to recode these routines in Util.vbs to use i.Session("NameFull") , i.e. the translated name. I will do this later today.
|
By Yehudad - Tuesday, July 17, 2007
|
Ron (7/17/2007) I seem to have overlooked this requirement when implementing the NameDictionary feature in the Narrative Report. I need to recode these routines in Util.vbs to use i.Session("NameFull") , i.e. the translated name. I will do this later today.Thank you very much!!!  You are doing a great job with the Report Generator utility.
|
By genome - Tuesday, July 17, 2007
|
Attached is a revision of Util.vbs with the amended routines. I believe this fixes the problem and I will include it in the next release. To use it generate a custom skin and replace Util.vbs in the Code folder with this file.
|
By Yehudad - Tuesday, July 17, 2007
|
Ron (7/17/2007) Attached is a revision of Util.vbs with the amended routines. I believe this fixes the problem and I will include it in the next release. To use it generate a custom skin and replace Util.vbs in the Code folder with this file. Thanks, Ron. However when I'm trying to use it to generate a report I'm getting an error message that says: Error at line 36 (Code/Util.vbs) : Type mismatch: 'arrGeneralSettings' Microsoft VBScript runtime error 800A000D |
|
By genome - Wednesday, July 18, 2007
|
Sorry that version of Util.vbs was for 2.0.0.8. I have attached a version here that should work with a 2.0.0.7 skin as the base.
|
By Yehudad - Wednesday, July 18, 2007
|
Ron (7/18/2007)
Sorry that version of Util.vbs was for 2.0.0.8. I have attached a version here that should work with a 2.0.0.7 skin as the base. I'm getting the same error message.
|
By genome - Wednesday, July 18, 2007
|
The error is most likely to be caused by using an earlier version of Init.htm. Is it possible that your custom skin is not based on the 2.0.0.7 skin? I have attached the complete 2.0.0.7 skin with the modified Util.vbs.
|
By Yehudad - Wednesday, July 18, 2007
|
Ron (7/18/2007) The error is most likely to be caused by using an earlier version of Init.htm. Is it possible that your custom skin is not based on the 2.0.0.7 skin? I have attached the complete 2.0.0.7 skin with the modified Util.vbs.It looks OK... I need to start over my Hebrew translation... This problem rasies a bigger problem with the additions to the Report Generator in each new version. If I'm creating a skin using 2.0.0.7 skin and the basic skin is changed in design or some of the functions/subs are being modified, I have to either create a new skin (with all the translation work) or modify my code when I don't know all the modifications and changes.
|
By genome - Thursday, July 19, 2007
|
Yes there have been a large number of changes to the Narrative skin files since GenoPro 2007 but these have been mainly aimed at easing the task of translating the Report. In many cases this can now be achieved by 'merely' translating the Dictionary.xml file. It also has a number of features to allow modification of the Report again without recourse to a custom skin. I am interested to know what changes you are making to the skin for your Hebrew Report. Perhaps I can accommodate your requirements in the standard skin too. Otherwise I can only suggest you use something like WinMerge at folder level to compare two English versions of the Report skin folders side by side to see which files have changed and where and then apply the same changes to your customized skin. Hopefully there will only be minor changes to the Narrative Report scripts from now on, as no major new features are planned.
|
By jcmorin - Thursday, July 19, 2007
|
Yehudad, the good news is that the new skin can be almost completely translate to another language from a single file! I think that Russian, spanish and french has been done this way. I know that Hebrew is more complex because of the RTL text.
|
By Yehudad - Thursday, July 19, 2007
|
Ron (7/19/2007)
In many cases this can now be achieved by 'merely' translating the Dictionary.xml file. It also has a number of features to allow modification of the Report again without recourse to a custom skin. I am interested to know what changes you are making to the skin for your Hebrew Report. Perhaps I can accommodate your requirements in the standard skin too. JcMorin (7/19/2007)
Yehudad, the good news is that the new skin can be almost completly translate to another language from a single file! I think that Russian, spanish and french has been done this way. I know that Hebrew is more complex because of the RTL text. I wish that it was that easy. There are some unique Hebrew grammer that I don't think a simple translation like from English to Franch or Spanish does. For example translating the dates - I can use the hebrew calander or I can translate the Gregorian one into Hebrew. This is not somthing that I can only use the dictionary.xml. I'm trying as much as I can to put the translations in the dictionary.xml but I still have phrases that are different for male and female. For instance you are using the word "is" for both, while in Hebrew I need to use Is_M, Is_F and Is_. The code should be modified as well with the individual's gender to select the right term. I guess that while translating, I will find more thngs, like the Hyperlink issue. I hope that when I will finish my work, the translation will be more automatic like the other languages.
|
By genome - Thursday, July 19, 2007
|
Yehudad (7/19/2007)
I'm trying as much as I can to put the translations in the dictionary.xml but I still have phrases that are different for male and female. For instance you are using the word "is" for both, while in Hebrew I need to use Is_M, Is_F and Is_. The code should be modified as well with the individual's gender to select the right term. The code & Dictionary already has the capability for male/female forms of 'is' (or ToBe_Present). You can add ToBe_Present_F and/or ToBe_Present_M forms. This is (badly) documented in the Dictionary: Note that [they] can have alternative forms to take account of the subject's gender as well as the present & past tense forms. These are specified by adding the suffix _M, _F or _P to the phrase name. _ToBe_Past_M below is an example.
Is this not suitable for your requirement? Let me know the problems then I can work on the solution.
|
By Yehudad - Thursday, July 19, 2007
|
I will. As I wrote before, when I will have a problem, I'll let you know. As for the names translations, is it an automatic procedure in the report generator, or should I add somthing for "sending" the ReportGenerator to translate the name? I looked in the help files and didn't found anything. In previous versions I wrote my own code for translating the names.
|
By genome - Friday, July 20, 2007
|
Yes, the translation of names is 'automatic' in that no script changes are required. The names and their translation need to be added into a NameDictionary.xml file and then it is necessary to set two Configuration Parameters, LangNames & LangNameDictionary. These can be set via any one of the three methods available, i.e. edit Config.xml in custom skin, create Document Custom Tags with required value or change via the 'Generate Report' dialog window. Each part of Individuals names will be translated from the language code in the LangNames parameter to the language code specified in the Language attribute of the the Skin element in the Config.xml file. PLace names and Occupation titles can also be translated by setting the LangPlace & LangOccupation parameters and adding the required elements & attributes to the NameDictionary.xml (see notes in sample NameDictionary.xml provided with the Narrative skin) ALternatively it is also possible to add a translated name in brackets following the original name in the Report. In this case set Config Parameter TagNameAlternative to the tag to be translated (e.g. Name to translate full name) and set LangAlternative to the code of the language it is to be translated to. e.g. set to HE to add Hebrew translation (where they exist in NameDictionary.xml) following the original names. I have only done limited testing on these features.
|
By Yehudad - Friday, July 20, 2007
|
Ron (7/20/2007) Yes, the translation of names is 'automatic' in that no script changes are required. The names and their translation need to be added into a NameDictionary.xml file and then it is necessary to set two Configuration Parameters, LangNames & LangNameDictionary. These can be set via any one of the three methods available, i.e. edit Config.xml in custom skin, create Document Custom Tags with required value or change via the 'Generate Report' dialog window.Well, this is the option I chose. I set the LangNames parameter to "Y" and the LangNameDictionary to "NameDictionary.xml" but the names are still in English and are not translated to the Hebrew name which is in the NameDictionary.xml. What am I doing wrong?
|
By genome - Friday, July 20, 2007
|
I am not sure of the default path for the NameDictionary.xml. I have always used a full path. Also LangNames must be set to a language code, matching that in NameDictionary e.g. EN if you are translating names from English in your .gno file to your skin language of HE (Hebrew). Each part of Individuals names will be translated from the language code in the LangNames parameter to the language code specified in the Language attribute of the the Skin element in the Config.xml file. The NameDictionary elements can have many different language attributes for each name, hence the need to tell the script which one to use.
|
By Yehudad - Friday, July 20, 2007
|
Ron (7/20/2007)
I am not sure of the default path for the NameDictionary.xml. I have always used a full path. Also LangNames must be set to a language code, matching that in NameDictionary e.g. EN if you are translating names from English in your .gno file to your skin language of HE (Hebrew). Each part of Individuals names will be translated from the language code in the LangNames parameter to the language code specified in the Language attribute of the the Skin element in the Config.xml file. The NameDictionary elements can have many different language attributes for each name, hence the need to tell the script which one to use. Now its working!!!
|
By Yehudad - Sunday, July 22, 2007
|
Ron, I did manage to find a little problem. When the person's name has an ' in it like Ya'akov (Jacob in Hebrew), the name is translated OK in the regular text, but not in the HTML link (I guess it is because of the HTML sentance structure which contains other ' symbol in them)
|
By genome - Sunday, July 22, 2007
|
I am unable to reporduce this error, can you say where in the report it occurs, or perhaps a sample .gno and NameDictionary.xml file? The StrHtmlHyperlink uses Util,.Formatstring to create the hyperlink and the (translated) name is encoded for HTML output using the &t argument qualifier, translating any ' characters to the numeric entity '. This displays correctly in my testing. I did find a couple of places where the translated name is not used, i.e. in a 'References' section and in the 'family with' phrase. I have attached a revised skin that corrects this omission. Update 23 Jul 07: Skin updated
|
By Yehudad - Monday, July 23, 2007
|
Using your attached skin I'm getting the following error message: [0.01] Error: Unable to load an ActiveX control for MS XML Parser. 429:ActiveX component can't create object Error at line 108 (init.htm) : Invalid procedure call or argument: 'CreateObject' Microsoft VBScript runtime error 800A0005
|
By genome - Monday, July 23, 2007
|
You are right, thanks for testing it. The error occurs if you do not have the latest version of MS XML installed (6.0) . This is not necessary for the skin, and I have corrected the skin in my earlier post. Alternatively the updated Init.htm is attached.
|
By Yehudad - Tuesday, July 24, 2007
|
It is still not working. The name is translated OK into Hebrew in the phBirth paragraph, but it is not translated into Hebrew in the title and in the name list. This problem is unique to the name Ya'akov. Other names are translated OK. Attached is my skin. Add the name Ya'akov in your file and run the skin.
|
By genome - Wednesday, July 25, 2007
|
Looks like I had hold of the wrong end of the stick here. For some reason, I thought you were translating Jacob to Ja'akov, not the other way round, as Jacob is an English name too. But after a script change that should have fixed it, I still could not get it to work . Then I noticed your NameDictionary contained Ja'acov, not Ja'akov as per your posts. So finally attached is an amended Lang.vbs that, fingers crossed, fixes it.
|
By Yehudad - Wednesday, July 25, 2007
|
Ron (7/25/2007)
Looks like I had hold of the wrong end of the stick here. For some reason, I thought you were translating Jacob to Ja'akov, not the other way round, as Jacob is an English name too. But after a script change that should have fixed it, I still could not get it to work . Then I noticed your NameDictionary contained Ja'acov, not Ja'akov as per your posts. So finally attached is an amended Lang.vbs that, fingers crossed, fixes it. Thanks Ron!! You solved the problem you can stop crossing your fingers I'm sorry that I wasn't clear enough describing my problem...
|