Avoid duplicate translations on inherited frames

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
Gargelkarg
Posts: 6
Joined: Thu Jan 19, 2012 5:42 pm

Avoid duplicate translations on inherited frames

Post 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.
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post 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.
Best regards,
Igor Siticov.
Gargelkarg
Posts: 6
Joined: Thu Jan 19, 2012 5:42 pm

Post 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?
Post Reply