|
|
Administrators Customers Important Contributors FamilyTrees.GenoPro.com GenoPro version: 3.1.0.1
Last Login: 2 hours ago
Posts: 3,412,
Visits: 26,304
|
nadiminti (3/17/2007)
As I understand, when PlurialCardinal is invoked, it gets two parts, one takes __FmtPlurial and the other based on the value of second part takes the appropriate Cardinal and return both values to the invoker. Now my Q: a. Is my understanding correct? b. How can I get rid of "s" but at the same time for English it remains same. c. How to trigger that it should use C1, C2 etc? d. Do I need to post this separately? a. Your understanding is not quite correct. When PlurialCardinal is invoked the first part is only taken from _FmtPlurial when the count supplied to PlurialCardinal is > 1 and the target Dictionary element has no 'P' attribute. e.g. in Lang.vbs line 624 we have Dic.PlurialCardinal(strDicPrefix & "M", cMales), _
|
If strDicPrefix is Sibling_M then the Dictionary element is <Sibling_M T="brother" C1="a brother" /> | and that has no P attribute and so if the count is > 1 then _FmtPlurial is used and brothers is returned. However if strDicPrefix is Sibling_ the entry is <Sibling_ T="sibling of unknown gender" P="siblings of unknown gender" C1="a sibling of unknown gender" /> | and so when the count > 1 the P attribute siblings of unknown gender is returned.b. I assume from this question you are attempting a dual language report using a single Dictionary.xml. This is always going to be problematic because as yet the Dictionary does not support multiple language alternatives. One way it could be achieved now is to use separate elements for each language. And so as well as the existing <Sibling_M T="brother" C1="a brother" /> | you also have <TE_Sibling_M T="brother" P="brother" C1="a brother" /> | but obviously translated into Telugu. You will then need to ensure that you code uses the correct prefix for each case.c. The C1, C2 etc. forms are used when the count n matches the Cn value. Note that the C1 form is only used with Dic.PlurialCardinal and not Dic.Plurial. So Dic.PlurialCardinal("Sibling_M", 1) returns 'a brother' and not 'one brother', but Dic.Plurial("Sibling_M",1) returns 'brother'. Dic.PlurialCardinal("Twins",3) returns 'three triplets' but Dic.Plurial("Twins",3) returns 'triplets'. d. Normally a new topic should be posted as a new thread/topic. But since you are the originator of this thread/topic and the original topic has been dealt with then I guess it is OK. I think a lot depends on the original title - if you had called it 'Problems translating to Telugu' you could include all related queries in the one thread.
'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Edited: Saturday, March 17, 2007 by
Ron
|
|
|
Customers GenoPro version: 3.1.0.0
Last Login: Thursday, May 7, 2020
Posts: 57,
Visits: 610
|
Hi Ron,
Thanks for the in-roads. I know it is difficult, but I am attempting.
b. I assume from this question you are attempting a dual language report using a single Dictionary.xml. This is always going to be problematic because as yet the Dictionary does not support multiple language alternatives. One way it could be achieved now is to use separate elements for each language. And so as well as the existing
you also have
but obviously translated into Telugu. You will then need to ensure that you code uses the correct prefix for each case. I am using the following format so that not much time need to be spent on the origins of the correct prefix, though the work on dictionary remains same. I am almost there in having the bi-lingual (dual language) report skin with few crucial, vital exceptions.
Select Case nistel Case "0" StrHtmlCollectionMFU = Dic.FormatPhrase("PhCollectionTELMFU", _ Dic.PlurialCardinal(strDicPrefix & "TELM", cMales), _ Dic.PlurialCardinal(strDicPrefix & "TELF", cFemales), _ Dic.PlurialCardinal(strDicPrefix, cCount - cMales - cFemales), strHtmlNames) Case "1" StrHtmlCollectionMFU = Dic.FormatPhrase("PhCollectionMFU", _ Dic.PlurialCardinal(strDicPrefix & "M", cMales), _ Dic.PlurialCardinal(strDicPrefix & "F", cFemales), _ Dic.PlurialCardinal(strDicPrefix, coll.Count - cMales - cFemales), strHtmlNames) End Select |
With this I do not have to look for the origins of strDicPrefix - some time saver for me.
I am not a programmer at all and I appreciate your help in suggesting some reading on this Dictionary. I have already gone through GenoPro documents available
Can we have another Dic.PlurialTEL? I am getting VB error when I do so.
regards Sriram
Edited: Saturday, March 17, 2007 by
nadiminti
|
|
|
Customers GenoPro version: 3.1.0.0
Last Login: Thursday, May 7, 2020
Posts: 57,
Visits: 610
|
Hi
I have this problem of identifying where the family strings are generated. Currently, Telugu skin I am working on shows every thing in Telugu (which is OK), but I would like to use Alternative Name.

In the picture above the contents of toc_families.htm is shown.
My basic Question is how "families" is generated?
thanks and regards
Clipboard01.png
(132 views,
48.53 KB)
Edited: Tuesday, March 27, 2007 by
nadiminti
|
|
|
Administrators Customers Important Contributors FamilyTrees.GenoPro.com GenoPro version: 3.1.0.1
Last Login: 2 hours ago
Posts: 3,412,
Visits: 26,304
|
The family names in the index are generated in Lang.vbs lines 869-870. strNameParent = f.Parents(0).Name.Last If strNameParent = "" Then strNameParent = f.Parents(1).Name.Last
|
i.e. it is the last name of the 1st parent/spouse, unless this is blank, in which case the last name of the 2nd parent/spouse is used. When there is a change of family name then it is written to the report at line 895
'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
|
|
|
Customers GenoPro version: 3.1.0.0
Last Login: Thursday, May 7, 2020
Posts: 57,
Visits: 610
|
Hi Ron, I have tried, but I get the following when I change the code on 869
From strNameParent = f.Parents(0).Name.Last To strNameParent = f.Parents(0).Name.Alternative |
The following image shows the result of the above.

What I would like to have is to make the family names appear in English (using the Name.Alternative) (As indicated by Red lines above). The code for that is on lines 897-902
If Not fPicturesOnly Then Report.WriteFormattedLn strFmtTemplateName, StrHtmlImgFamily(f), f.Href, f.Name, StrHtmlImgPhoto(f) ElseIf Not Util.IsNothing(pp) Then Report.WriteFormattedLn strFmtTemplateName, StrHtmlImgFamily(f), f.Href, f.Name, "" |
The f.Name, looks like is giving the total family name and I am unable to track it up to make it use Name.Alternative. thanks and regards
Clipboard02.png
(91 views,
61.48 KB)
Edited: Thursday, March 29, 2007 by
nadiminti
|
|
|
Administrators Customers Important Contributors FamilyTrees.GenoPro.com GenoPro version: 3.1.0.1
Last Login: 2 hours ago
Posts: 3,412,
Visits: 26,304
|
f.Name is a built in property generated by GenoPro from the names of the spouses. You could try changing f.Name in the lines you have indicated to Util.FirstNonEmpty(f.Parents(0).Name.Alternative, f.Parents(1).Name.Alternative, f.Name) This will generate the alternative name of the 1st or 2nd spouse, or failing that fall back to the GenoPro family name property.
'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
|
|
|
Customers GenoPro version: 3.1.0.0
Last Login: Thursday, May 7, 2020
Posts: 57,
Visits: 610
|
Hi Ron, I have tried. It works half way though. Now it gives the Alternative Name of Husband only. The wife name along with '&' is missing.
Is it possible that a separate collection of families can be written using Alternative Names?
Can a parents name be referenced like this directly? I am getting a VB error. f.Parents.Name f.Parents.Name.Alternative
f.Husband.Name f.Husband.Name.Alternative
thanks and regards
|
|
|
Administrators Customers Important Contributors FamilyTrees.GenoPro.com GenoPro version: 3.1.0.1
Last Login: 2 hours ago
Posts: 3,412,
Visits: 26,304
|
Again some misunderstanding of what exactly you are trying to achieve.f.Parents, f.Husband & f.Wife are arrays so an index qualifier is required. Using Parents rather than Husband & Wife is probably better in case of any same sex relationships so I suggest Util.IfElse(fParents(0).Name.Alternative <> "" And f.Parents(1).Name.Alternative <> "", f.Parents(0).Name.Alternative & " & " & f.Parents(1).Name.Alternative, Util.FirstNonEmpty(f.Parents(0).Name.Alternative, f.Parents(1).Name.Alternative, f.Name))
It's a bit of a mouthful, but basically it is : if alternative names are present for both spouses , join with '&' otherwise use any available alternative and failing that use the GenoPro family name.
'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
|
|
|
Customers GenoPro version: 3.1.0.0
Last Login: Thursday, May 7, 2020
Posts: 57,
Visits: 610
|
Hi Ron, Wonderful!! I thought I would attempt to build a collection or so and you have magically used the wand to clear the matter for me.
With this I have completed the Phase I of Telugu - English bi-lingual Report skin and will post it soon.
Needless to say that but for your support and help, I could not have finished it. thanks and regards
|