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
Reference to drcfile will be dropped - 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: Fri Sep 29th, 2017 12:05 pm
PM Private Upload Quote Reply
abebe.assefa
Member
 

Joined: Fri Sep 29th, 2017
Location: Rietheim-Weilheim, Germany
Posts: 1
Status: 
Offline
Opening properties GUI of a project and closing it will drop the reference to the drcfile by replacing it with "stringresourcecontext" whenever the the drc file is missing.

This behavior will mess up context and translations will be discarded during build process. 

Back To Top PM Private Upload Quote Reply

 Posted: Fri Sep 29th, 2017 12:24 pm
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Monschau, Germany
Posts: 3014
Status: 
Offline
Hi,
This is a Delphi limitation.

Without DRC file the link between strings and numbers will be lost. The problems happens because Delphi changes the numbers while compiling and Sisulizer still has the old values stored. If the .DRC is missing Sisulizer has to drop the outdated links.

Please make sure to always have a valid and current .DRC file at runtime.

The most safest way to come over this would be not to allow a build process without current .DRC. But there are projects that need to be localized without having a .DRC (since sources are lost). This opportunity would not exist if Sisulizer would be strict.
You find some more info here: https://www.sisulizer.com/translation/vcl/VCL.pdf

Markus



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

 Posted: Fri Sep 29th, 2017 12:41 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 1977
Status: 
Offline
Check that the DRC file really exists. If it exist can you tell if the DRC file exists in the same directory as EXE.

Ilkka



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

 Posted: Wed Oct 4th, 2017 08:39 am
PM Private Upload Quote Reply
Juergen.Kraemer
Member
 

Joined: Wed Apr 22nd, 2015
Location: Rietheim-Weilheim, Germany
Posts: 5
Status: 
Offline
Hi,

I want to expand on what my co-worker wrote. We have a central folder for all our Sisulizer projects. All projects contain a reference to the corresponding .DRC file. In our automated build process we copy the .SLP file to the folder where we build the EXE. The Delphi command-line compiler is instructed to create a .DRC file. After that we copy the .SLP file back to the central folder, where our translator should be able to add missing translations. The central folder does not contain any .DRC file.

We noticed that the reference to the .DRC file is removed from the .SLP file in some cases and -- even worse -- that the context method of string resources is switched to "String value".

First case: "slmake scan ..." removes the reference to the .DRC file although a valid and up-to-date .DRC file is present. To my understanding, this should definitely not happen.

Second case: Sisulizer (the GUI) removes the reference to the .DRC file when you open the properties dialog of a source and no .DRC file is found and you close the dialog with the OK button. In our case this happened unintentionally when we wanted to add some translations while working on the file in the central folder. Additionally the method of context was switched. Both changes went unnoticed, which led to wrong translations being imported later on.

I definitely consider the first case to be a bug. And I strongly think that Sisulizer should not automatically remove the reference to the .DRC file in any case. Highlighting a problematic .DRC file -- like it is done when Sisulizer considers it to be out-of-date -- is fine, but don't throw it away and switch to a different context method without the explicit confirmation of the user.

Kind regards,
Jürgen

Back To Top PM Private Upload Quote Reply

 Posted: Wed Oct 4th, 2017 09:50 am
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Monschau, Germany
Posts: 3014
Status: 
Offline
Hi,
The problem is copying the .SLP without copying the .DRC to a place where Sisulizer can find it. Since Sisulizer stores a lot of relative paths to source files moving it is always needs special care.

Your project might store a relative path to the .drc if it is not found in the same directory as the binary. If you send us your .SLP by Private Upload (button right above this post) we can check out the path.
I also ask R&D if Sisulizer can be more strict if the .DRC gets lost or is outdated.

Markus




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

 Posted: Wed Oct 4th, 2017 11:18 am
PM Private Upload Quote Reply
Juergen.Kraemer
Member
 

Joined: Wed Apr 22nd, 2015
Location: Rietheim-Weilheim, Germany
Posts: 5
Status: 
Offline
Hi,

yes, I know that. The name of the .DRC file was just stored as a plain file name (e.g., drcfile="HpHab655.drc") in the <source> tag; no absolute or relative path was involved. We always make sure that .EXE/.DLL, .DRC and .SLP file reside in the same directory during our automated build.

It would really be great if slmake did not remove the reference and the GUI would at least ask for permission to change the context method.

Kind regards,
Jürgen

Back To Top PM Private Upload Quote Reply

 Posted: Wed Oct 4th, 2017 11:27 am
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


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

I`m just discussing with R&D what to do if .drc is not found. Since it is a source of problems Sisulizer might throw an error instead of building with the fallback (with an option to have the old behaviour not to brak existing projects). If it does not build the project could stay clean. But that's just my idea. R&D has to decide how to improve.

Markus



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

 Posted: Wed Oct 4th, 2017 11:34 am
PM Private Upload Quote Reply
Juergen.Kraemer
Member
 

Joined: Wed Apr 22nd, 2015
Location: Rietheim-Weilheim, Germany
Posts: 5
Status: 
Offline
Hi,

thank you for your efforts.

I probably should add: In our use case it's not a problem if the .DRC is missing or out-of-date when the translator adds translations to the project files or makes changes to the project's properties in our central folder. The translator is not supposed to build the output files; this is only done during our automated build where we can guarantee to have a valid .DRC file.

Kind regards,
Jürgen

Back To Top PM Private Upload Quote Reply

 Posted: Wed Oct 4th, 2017 02:25 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 1977
Status: 
Offline
Sisulizer works like this. If .slp has a reference to a DRC file but it cannot be found when .slp is opened then Sisulizer internally rememebers it. If yoo just translate the project and save it the DRC is still stored into .ntp. When scanning Sisulizer cannot use the DRC because it does not exists and then Sisulizer has two choices:
1) Abort scanning
2) Scan but not to use DRC but string value or ids

We chose #2 with string values and also Sisulizer writes a warning about missing DRC.

The DRC gest dropped alltogether if you open .slp in the case that DRC is missing and you then edit the properties of your Delphi source (e.g. right click EXE on project thrre and choose Properties). Then Sisulizer thing that you are a developer that wants to change the settings and drops the reference to missing DRC. What is confusing that Sisulizer does not show that it has an internal reference to missing DRC: The DRC field is empty but the reference is there.

Ilkka



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

 Posted: Wed Oct 4th, 2017 02:36 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 1977
Status: 
Offline
Juergen.Kraemer wrote:

We noticed that the reference to the .DRC file is removed from the .SLP file in some cases and -- even worse -- that the context method of string resources is switched to "String value".


It might be this: Somebody that translates the project opens the source properties dialog and then closes it by clicking OK. Because DRC is not there Sisulizer drops it and changes the string context to value.

This can be avoided by setting project to translate only mode before sending to translator. Use Project | Options and check Project is in translate only mode. See screenshot.

When that mode is on the translator cannot edit the properties and DRC will be drop.

Another solution is the one I always use. I have my own master .slp. I send that to translator without translate only mode and when I get it back I never use it as it is but always import translations from that file into my master .slp.

Ilkka



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

 Posted: Wed Oct 4th, 2017 02:42 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 1977
Status: 
Offline
Case 2: I will add warning about missing DRC and changed of context method.

Case 1: I haven't been able to reproduce this yet. In what kind of situation this happens. Is the DRC on the same directory as EXE or in some other?

Ilkka



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

 Posted: Thu Oct 5th, 2017 07:14 am
PM Private Upload Quote Reply
Juergen.Kraemer
Member
 

Joined: Wed Apr 22nd, 2015
Location: Rietheim-Weilheim, Germany
Posts: 5
Status: 
Offline
Ilkka.Salmenius wrote: Case 2: I will add warning about missing DRC and changed of context method.

Case 1: I haven't been able to reproduce this yet. In what kind of situation this happens. Is the DRC on the same directory as EXE or in some other?

Ilkka

Can you add the warning before closing the properties dialog and making the actual changes? Or even better, make a confirmation dialog out of it? Otherwise the only way out for the user would be to discard any changes and close the project without saving.

Case 1 happens reproducible in our build batches. We compile our Delphi projects with the command-line compiler instructed to generate detailed map files. This also creates a .DRC file alongside the final EXE. After that we usually append the map file to the EXE (needed for madExcept), but this makes no difference. Immediately after that we execute "slmake scan" with the appropriate project file. The reference to the .DRC file is lost. Here is a <source> tag from one of our projects before

<source class="TDelphiSource" name="HpHab655.exe" original="de-DE" encoding="utf-8" outputitems="[oiResource]" date="20171002094926" widestringusage="wsYes" drcfile="HpHab655.drc">

and after

<source class="TDelphiSource" name="HpHab655.exe" original="de-DE" encoding="utf-8" outputitems="[oiResource]" date="20171005070016" widestringusage="wsYes">

running "slmake scan HpHab655.slp". The attribute drcfile="..." at the end of the tag is lost. The version of slmake is still 4.0.366, but I did not see a relevant change in your changelog for version 4.0.368.

Kind regards,
Jürgern

Back To Top PM Private Upload Quote Reply

 Posted: Fri Oct 6th, 2017 01:57 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 1977
Status: 
Offline
Case 2:

Sisulizer now contains a confirm dialog if you try to change the context method or if the DRC file does not exist or is missing.

The changes will be in the next build (369) that will be realase soon.

Case 1:

This is a normal operation. When Sisulizer writes .slp it optimizes it and does not write value that are default or can be calculate using other prperties. In your case the .drc has the same name as .exe and locates on the same directory so it will not be written. When reading Sisulizer finds it without actual alue being in .slp

Ilkka



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

 Posted: Mon Oct 9th, 2017 06:37 am
PM Private Upload Quote Reply
Juergen.Kraemer
Member
 

Joined: Wed Apr 22nd, 2015
Location: Rietheim-Weilheim, Germany
Posts: 5
Status: 
Offline
Hello Ilkka,

I just tested the new version and it works fine -- the reference to the .DRC file is kept (although the file is missing) and the context method is not changed.

Thank you for your fast help.

Kind regards,
Jürgen

Back To Top PM Private Upload Quote Reply

Current time is 03:53 am  
.NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Bugs and Quirks in Sisulizer > Reference to drcfile will be dropped



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