Page 1 of 1

Avoid duplicate translations on inherited frames

Posted: Sat Feb 18, 2012 3:12 pm
by Gargelkarg
Hi,

I have the following scenario:

FrameA with a siLangLinked component
FrameB = class(FrameA) with IsInheritedOwner property = True
FrameC = class(FrameB)

On FrameB I have several TActions. I want to have the translation of the captions done in FrameB, but the same Action-Captions appear in siLang-component of FrameC. So I have same caption again.

In your code I found the following comment in the procedure ReadOurStrProps
// 6.0.1
// At designtime we ignore all inherited data. Because this would do unwanted copies of translations
So I expect that if IsInheritedOwner is set to true, inherited properties (in my case Taction.caption) are not listed again.

How can I avoid the unwanted copies? As I have hundreds of frames in my project it's important to get this solved.

Appreciate your help.

Posted: Wed Feb 29, 2012 8:10 am
by isiticov
Hello,

TsiLang on inherited forms/frames includes the tranlsations from the base forms in order to provide way to customize translations in inherited forms. So if any inherited form/frame will need to use the translation for inherited items that differ from the base you can just customize it. Otherwise you won't be able to customize any inherited data.

Posted: Fri Mar 02, 2012 5:54 pm
by Gargelkarg
But I can't decide if I just want to inherit the data or ovveride it.
On all components the inhrited value ist used if I don't cange ist. But in the case of siLang I have enter a value, mean ovveride it any way.
If I change a translation on a base form, I have to do it on all inherited forms. Or do I miss something?