SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Avoid duplicate translations on inherited frames

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite
View previous topic :: View next topic  
Author Message
Gargelkarg



Joined: 19 Jan 2012
Posts: 5

PostPosted: Sat Feb 18, 2012 3:12 pm    Post subject: Avoid duplicate translations on inherited frames Reply with quote

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.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Wed Feb 29, 2012 8:10 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Gargelkarg



Joined: 19 Jan 2012
Posts: 5

PostPosted: Fri Mar 02, 2012 5:54 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group