View previous topic :: View next topic |
Author |
Message |
bdwyer
Joined: 27 Aug 2012 Posts: 10
|
Posted: Tue Feb 26, 2013 4:42 pm Post subject: Duplicate names causing translation problem |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Feb 26, 2013 11:11 pm Post subject: |
|
|
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 |
|
|
bdwyer
Joined: 27 Aug 2012 Posts: 10
|
Posted: Fri Mar 01, 2013 10:02 pm Post subject: |
|
|
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 |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Mar 01, 2013 10:35 pm Post subject: |
|
|
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 |
|
|
|