Support forum of the software localization tool Sisulizer


.NET, Delphi, ... - Sisulizer Localization Tool Support Home

Get in contact with the makers of Sisulizer.
Our forum is open for all questions around Sisulizer from customers and prospects.
Don't hesitate to register and ask. The Sisulizer team will answer ASAP.

Search     Help Home Sisulizer Website Download
Search by username
Not logged in - Login | Register 

 Moderated by: Sisusupport, Renate.Reinartz, Markus.Kreisel, Ilkka.Salmenius
New Topic Reply Printer Friendly
Consider the context during translation (bug ??) - Bugs and Quirks in Sisulizer - Technical Support (You need to be registered at the forum to write) - .NET, Delphi, ... - Sisulizer Localization Tool Support
AuthorPost
 Posted: Tue Jan 31st, 2017 08:02 am
PM Private Upload Quote Reply
Emiliano
Member
 

Joined: Sun Nov 14th, 2010
Location:  
Posts: 60
Status: 
Offline
Hi,
I have already devoted many hours to solve this problem without a solution.

In my Sisulizer project there are 2 XML files, very similar, almost identical: one for Mac and the other for Windows.
One for Windows has already been fully translated, while the Mac has to use the same translation used for Windows.

During the translation of the files for Mac is essential to consider in addition to the value to translate also the context.
The Embedded Engine Translation unfortunately does not consider the context and then I tried another solution.


FIRST APPROACH
---------------
I used the command File->Import and selected the XML files already translated for Windows, but as a result I got more than 1000 untranslated strings, but certainly present in Windows files.

SECOND APPROACH:
---------------
I used the command File->Export to export the translation of Windows, and Mac files, to an Excel file.
Next, I used various formulas excel to find the translations corresponding considering the Context column.
As a result of this I have an excel file with all translations... Great!! even though tiring!

So I tried to use File->Import to import translations of the Excel file.
During this operation, I set to consider first the context, and then the value.
As a result all the translations have been imported, but there are inconsistencies that make me think that the context column was not properly considered.
I think that this is a bug ....

NOTE:
I have noticed that when exporting to Excel, the value of the Context has been modified with the addition of the source file's path and the ID codes enclosed in square brackets; I have also tried to remove these elements to make the Excel context identical to that of Sisulizer, but also this test did not lead to a correct result.

I am attaching a video and files that I used for these tests.


I hope someone can help me urgently.
Thank you.

Back To Top PM Private Upload Quote Reply

 Posted: Tue Jan 31st, 2017 10:11 am
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Monschau, Germany
Posts: 3005
Status: 
Offline
Hi,

Sisulizer uses the full path of the source files as part of context since the resource ids are not always unique. The approach to use by value as second option can be used if there is not a perfect match in the context. You are right the by value has the risk that translation might be wrong in another context. It is a general issue of software localization where strings can be very short (single words) where no context is given by the string itselfe. Praktically there is no 100% solution for all cases. But the Sisulizer import wizard has some option called

Use partial context in addition of full context

In the case Sisulizer is less strict with the path in the context. You should get more hits if you import by context.

Hope this helps

Markus



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Tue Jan 31st, 2017 10:44 am
PM Private Upload Quote Reply
Emiliano
Member
 

Joined: Sun Nov 14th, 2010
Location:  
Posts: 60
Status: 
Offline
Hello Markus,
Thank you for your answer.

With the option "Use partial context in addition pcs full context of" the number of errors has decreased dramatically, but it is not zero.

The fact that the number of errors is different from zero generates in me the doubt that also other translations are incorrect.

To check how many mistakes I use one tools that tells me the syntax errors in the translated files.

To better explain to attach a new video.
As you can see, I have imported the "Test2-Import.xls" file.
I later used the tool that generates me a list of syntax errors identified in the translation.
With this list I realized that there are some imported strings that do not respect the upper / lower case.

Can you check if there is a solution?
Thank you.

Back To Top PM Private Upload Quote Reply

 Posted: Tue Jan 31st, 2017 12:17 pm
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Monschau, Germany
Posts: 3005
Status: 
Offline
Hi,

There will be always some work left after you imported strings from a different project. You should always use the options in the Validate menu to find these inconsistances and take care of these that are found.

Btw: If you have two similar projects you also add both into one slp. Simply use Project - Add Source. This way you have everything in one place and you don`t need to import. Simply use the translate duplicates option.
And of course you do not need to export to Excel. You can import from .slp files directly.
Sorry if some info does not match your needs. I'm answering from my mobile and could not watch the movies you send.

Markus



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Tue Jan 31st, 2017 12:39 pm
PM Private Upload Quote Reply
Emiliano
Member
 

Joined: Sun Nov 14th, 2010
Location:  
Posts: 60
Status: 
Offline
Hello Markus,
I thank you for your answer.
I already have the translated files and what not translated within the same Sisulizer project.
The command Translate duplicates translated zero strings :-(

I think it's critical that you see my video and do some tests with the files that I have sent you.

Thank you.

Back To Top PM Private Upload Quote Reply

 Posted: Tue Jan 31st, 2017 01:56 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 1961
Status: 
Offline
Thank you for the file. Can you also zip the both XML file (Windows and Mac). I need to see what is the difference in these files.

Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Wed Feb 1st, 2017 01:49 pm
PM Private Upload Quote Reply
Emiliano
Member
 

Joined: Sun Nov 14th, 2010
Location:  
Posts: 60
Status: 
Offline
Ilkka.Salmenius wrote:
Thank you for the file. Can you also zip the both XML file (Windows and Mac). I need to see what is the difference in these files.

Ilkka


Sorry if I answer only now, but I have not received a notification by e-mail.
As requested I am attaching the XML files.

Back To Top PM Private Upload Quote Reply

 Posted: Wed Feb 1st, 2017 01:49 pm
PM Private Upload Quote Reply
Emiliano
Member
 

Joined: Sun Nov 14th, 2010
Location:  
Posts: 60
Status: 
Offline
Ilkka.Salmenius wrote:
Thank you for the file. Can you also zip the both XML file (Windows and Mac). I need to see what is the difference in these files.

Ilkka


Sorry if I answer only now, but I have not received a notification by e-mail.
As requested I am attaching the XML files.

Back To Top PM Private Upload Quote Reply

 Posted: Thu Feb 2nd, 2017 06:24 am
PM Private Upload Quote Reply
Emiliano
Member
 

Joined: Sun Nov 14th, 2010
Location:  
Posts: 60
Status: 
Offline
Today I tried to redo the steps in the last video that I posted, but unfortunately the result contains hundreds of errors.
I insist in correcting import from Excel as the context present in Excel is identical to the context present in Sisulizer, so it makes no sense that the translation is not identical also considering the upper/lower case.


Am attaching a new excel file, better than the previous one because I realized that there were some errors.
I hope in your solution.

Back To Top PM Private Upload Quote Reply

 Posted: Sun Feb 5th, 2017 12:54 am
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 1961
Status: 
Offline
Thank you for the file. Now I could see what the problem is. Your XML file for Mac is very similar and you want to reuse the translations from Windows file in a context sensitive way. There is not direct way you can get this done but by exporting and importing I could do this. Here is what I did.

1) Open your Sisulizer file and build the localized XML files.

2) Copy the Italian Windows XML file over the Italian Mac file. Now the Italian Mac XML file contain the translation although it is not 100% same as the original Mac XML file.

3) Import the Italian Mac XML file into you Sisulizer. The importing works by the context. After that your Sisulizer contains exactly the same translations on both Windows and Mac file.

The Windows XML file seems to be a superset of Mac XML file so the translations of your Mac file should be complete after the import.

Best regards,
Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Sun Feb 5th, 2017 10:12 am
PM Private Upload Quote Reply
Emiliano
Member
 

Joined: Sun Nov 14th, 2010
Location:  
Posts: 60
Status: 
Offline
Ilkka.Salmenius wrote:
The Windows XML file seems to be a superset of Mac XML file so the translations of your Mac file should be complete after the import.

Best regards,
Ilkka

Hi Ilkka,
you understood the problem, but the solution is not correct.
In theory, all strings of Mac files, are also present in Windows.
Performing your procedure many strings are not translated :-(
I am attaching the new test file, and a new video to reproduce the problem.

Back To Top PM Private Upload Quote Reply

 Posted: Mon Feb 6th, 2017 03:19 am
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 1961
Status: 
Offline
Thank you for the video. When I tested I did not check the very last rows where the error was.

The reason for them not to import was that the Windows XML that was copied over Mac XML did not have 100% the same structure. When Sisulizer import translations from localized file it assumes that the structure is the same. Becauser Windows XML contained few extra element aboud 10% before the end of the file all elements after that were not correctly imported.

You can correctly import the translations if you remove the extra elements in the overwritten Mac XML file. Remove these three elements:
<three.d.*>

Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Mon Feb 6th, 2017 07:49 am
PM Private Upload Quote Reply
Emiliano
Member
 

Joined: Sun Nov 14th, 2010
Location:  
Posts: 60
Status: 
Offline
Ilkka.Salmenius wrote:

You can correctly import the translations if you remove the extra elements in the overwritten Mac XML file. Remove these three elements:
<three.d.*>

Ilkka


Hello Ilkka,
This is a workround to circumvent the problem right now.
I have done this and it works.

However I have to do this procedure every time we release a new version of the software to be translated; In addition the new version is released for Windows, Linux and Mac.

I can not know the differences of XML files between an OS and the other.

So it is necessary that Sisulizer, respects the context as it is written in the "Context" columns in Sisulizer, with the respect of the upper/lower case.

Back To Top PM Private Upload Quote Reply

 Posted: Mon Feb 6th, 2017 01:40 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 1961
Status: 
Offline
Sisulizer always tries to uses as good context as it can. With most UI resources this is easy because each element has an id that can be used such as Name attribute in .resx files.

However XML file, like your, does not have any real context attribute or element. In that case Sisulizer uses the structure of XML to get the context. This means that each element will have a context but it is generated by a combination of element name and element index.

For example following XML has no context value

<?xml version="1.0" encoding="UTF-8"?>
<countries>
<country>
<name>United States</name>
<population>297</population>
</country>
<country>
<name>Germany</name>
<population>82</population>
</country>
<country>
<name>Japan</name>
<population>127</population>
</country>
</countries>


For all name rows Sisulizer show the same context: countries.country.name. However this is just a display context. The read context will be
countries.country[0].name
countries.country[1].name
countries.country[2].name

Now if we add a new country element between second and thrid the context of last elemrnt changes to
countries.country[3].name
and the new element will be
countries.country[2].name

To avoid this context change and to get fixed context (that would also help in your files) you should have a context attribute in your XML and thos attributes should have a unique id. For example

<?xml version="1.0" encoding="UTF-8"?>
<countries>
<country id="usa">
<name>United States</name>
<population>297</population>
</country>
<country id="germany">
<name>Germany</name>
<population>82</population>
</country>
<country id="japan">
<name>Japan</name>
<population>127</population>
</country>
</countries>


Now if we can add a new country element anywhere without affecting the other context values.

<country id="italy">
<name>Italy</name>
<population>55</population>
</country>


Without context attributes you must make sure that each file that you import has exactly the same structure as your original file.

Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Tue Feb 7th, 2017 10:14 am
PM Private Upload Quote Reply
Emiliano
Member
 

Joined: Sun Nov 14th, 2010
Location:  
Posts: 60
Status: 
Offline
Hi Ilkka,
everything is clear.

Just one last question: Sisulizer technically, within the same XML file can work with duplicates contexts without adding a progressive number? or they must be obligatorily unique?

Back To Top PM Private Upload Quote Reply

 Posted: Tue Feb 7th, 2017 02:04 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 1961
Status: 
Offline
Ye you can use the duplicate context value if the parent context is different. For example this is OK

<countries>
<food>
<country id="it">
<name>Italy</name>
</country>
</food>
<car>
<country id="it">
<name>Italy</name>
</country>
</car>
</countries>


Here the first Italy gets context
countties.food.it.name

and second gets
countties.car.it.name

However if you use duplicate id in the case where parent is the same then only one row gets scanned

<countries>
<country id="it">
<name>Italy</name>
</country>
<country id="it">
<name>Roma</name>
</country>
</countries>


In above case both "Italy" and "Roma" has the same context do as the end only Roma row appears but it will have red dot marking that the value has changed (first Italy was scanned and then Roma)

Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Mon Mar 20th, 2017 01:23 pm
PM Private Upload Quote Reply
jayjay
Member
 

Joined: Fri Nov 18th, 2016
Location:  
Posts: 3
Status: 
Offline
Hi Ilkka,

Sorry it took a while to jump into this discussion, but other priorities caused the delay. Also because in our translation process we built in some extra checks to try and make sure original and translated xml have exactly the same structure.

FYI Emiliano is one of our translators and the xml he's starting from was constructed by us with the unique context in mind. Since we also need a unique context to correctly apply the translated strings we're using a unique identifier on the first level of children. We have tests in place to make sure this identifier is always unique. It will always be present in the context of any string needing translation in this file and thus it makes every context unique. In our view adding an extra id attribute should not be necessary here, or are we missing something?

So I think a not unique context is not the root of the issue here. I'll simplify with an example:

<mytestxml>
<parent1>
<child1>car</child1>
<child2>bicycle</child2>
</parent1>
<parent2>
<child1>car</child1>
</parent2>
<parent3>
<child1>car</child1>
<child2>bus</child2>
</parent3>
</mytestxml>


So every value in here has a unique context. I now import following xml as translation where not all the elements are present but every path is unique and present in the target xml:
<mytestxml>
<parent1>
<child1>auto</child1>
<child2>fiets</child2>
</parent1>
<parent3>
<child1>auto</child1>
<child2>bus</child2>
</parent3>
</mytestxml>


But this results in an invalid translation (see the screenshot). The translations for parent3 are not imported, it just stopped at the first identifier it can't exactly match (by index?). Also no warning is given of this fact, so the user might not be aware something went wrong. Am I correct here that structure indeed needs to match 100%? So this means importing a partial translation is currently not possible?

Attachment: Screen Shot 2017-03-20 at 13.41.09.png (Downloaded 26 times)

Back To Top PM Private Upload Quote Reply

 Posted: Thu Jun 1st, 2017 01:04 pm
PM Private Upload Quote Reply
bernardv
Member
 

Joined: Fri Jul 27th, 2007
Location:  
Posts: 19
Status: 
Offline
Hi Ilkka, Markus,

Could you please react to the post from jayjay?
This is not a minor problem.
In our case, it affects the update of all our XML files (thousands of lines; 12 translated versions) with a real negative impact on the behavior and reliability of our translated software.

Back To Top PM Private Upload Quote Reply

 Posted: Thu Jun 1st, 2017 03:19 pm
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Monschau, Germany
Posts: 3005
Status: 
Offline
Right now Sisulizer is organized in a way that the ID of elements needs to be in the ID field. There is no easy way to overcome that right now.

Anyway I asked R&D if it is possible to change that in future. I'm not aware how the internal XML parser of Sisulizer is coded but I understood R&D's post in a way that this is not trivial.

I hope R&D looks into that but the safest way is to add ID elements to your XML, perhaps using some grep tool.

Markus



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

Current time is 09:43 pm  
.NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Bugs and Quirks in Sisulizer > Consider the context during translation (bug ??)



WowUltra modified by Sisulizer Copyright © 2007-09 by Jim Hale - Based on WowBB Copyright © 2003-2006 Aycan Gulez

Sisulizer software localization tool - Three simple steps to localize