Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Duplicate names causing translation problem

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Globalizer Support
View previous topic :: View next topic  
Author Message
bdwyer



Joined: 27 Aug 2012
Posts: 10

PostPosted: Tue Feb 26, 2013 4:42 pm    Post subject: Duplicate names causing translation problem Reply with quote

Xaml allows for the use of of non unique names throughout a document, but in situations in which the same name is used, infralution appears to use the same resource key for all of those instances, resulting in using incorrect translations.

Is there any fix / workaround for this?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Feb 26, 2013 11:11 pm    Post subject: Reply with quote

Do you mean you have XAML elements with the same Name property within the one XAML file? Normally this produces an XAML error:

Code:
Name 'xxx' already exists in the current name scope.


If there is some circumstance where this is allowed (and desirable) then you could work around the issue by manually changing the Resx key to make it unique and adding a new resource after the file has been initially scanned. It would probably be easier however just to give the element a unique name in the first instance.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
bdwyer



Joined: 27 Aug 2012
Posts: 10

PostPosted: Fri Mar 01, 2013 10:02 pm    Post subject: Reply with quote

xaml does support multiple name scopes where this does become legal - generally within templates

See: http://msdn.microsoft.com/en-us/library/cc189026(v=vs.95).aspx

What we were expecting was the tool to behave as it does with unnamed items... TextBlock_Text1, TextBlock_Text2 etc.... - when it identifies an object as named - why not myName_ToolTip1, myName_ToolTip2 etc.?

Your workaround is fine if we know in advance that the names are duplicated, the problem was finding out a month after running the translator that we had effectively lost strings because there was no warning or error that a duplicate name had been replaced.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Mar 01, 2013 10:35 pm    Post subject: Reply with quote

This seems like something we could fix in the next release - but I want to make sure that I understand the problem properly first. Do you think you could send us a small project that demonstrates your usage - so that we can make sure that our fix works for your scenario. You can email a zipped project to support@infralution.com
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Globalizer Support 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 phpBB © 2001, 2005 phpBB Group