Hi,
After using TSILang to translate the const section inside a datamodule in our project, I've found the following line in our source code:
GMRSDlgsM00000056: string = 'This process can take a few minutes or a few hours depending on the disk size, number of drives selected and the secure erasure method selected'#13+ // TSI: Localized (Don't modify!)
'Do you wish to continue?';
on the other side under UpdateStrings procedure I found the following line:
GMRSDlgsM00000056 := siLang1.GetTextOrDefault('strGMRSDlgsM00000056' (* 'This process can take a few minutes or a few hours depending on the disk size, number of drives selected and the secure erasure method selected
Do you want to continue?' *) );
Now what confuses me is that normally TSilang components generate first line as for example:
GMRSCaption00000022: string = ''; (* Decompressing... *) // TSI: Localized (Don't modify!)
no data between '' and only text is marked between the two brackets, yet for GMRSDlgsM00000056 it looks strange, so is this an error that I should fix? and if yes how?
Thanks for your time
Michael
CONST section translation question
There is an option in TsiLang Expert settings (section Source Strings) named "Empty values after replacement" which will empty the initial string value atfer modifying source code. This is done for reducing the size of EXE, but at the same time if you delete TsiLang from your source this might cause invalid behaviour. So if the EXE size not so important we would recommend to switch OFF this option and have strings constants always initialized. You can leave all as it is now if you don't plan to remove TsiLang from your project and everything will work just fine.
Best regards,
Igor Siticov.
Igor Siticov.
I am sorry I didn't understand this part...if TsiLang Expert settings (section Source Strings) >> Empty values after replacement is already enabled, then why it didn't empty the string inisiticov wrote:There is an option in TsiLang Expert settings (section Source Strings) named "Empty values after replacement" which will empty the initial string value atfer modifying source code. This is done for reducing the size of EXE, but at the same time if you delete TsiLang from your source this might cause invalid behaviour. So if the EXE size not so important we would recommend to switch OFF this option and have strings constants always initialized. You can leave all as it is now if you don't plan to remove TsiLang from your project and everything will work just fine.
GMRSDlgsM00000056: string = 'This process can take a few minutes or a few hours depending on the disk size, number of drives selected and the secure erasure method selected'#13+ // TSI: Localized (Don't modify!)
'Do you wish to continue?';
Actually that is what is confusing me here as out of 100+ lines, the above line is the ONLY line that has the string initialized, so I am trying to figure out what could be wrong?
Could it be because of the #13+? and if yes what is the proper way to have it inside a string so that I can get a new line between two senstences
Thanks for your time
No the option was ON and it was not marked with TSI: Localized (Don't Modify!)isiticov wrote:May be when you localized this string this option was OFF and later you turned it ON. Expert doesn't modify strings marked with "// TSI: Localized (Don't modify!)" as it supposes it was already localized.
and that's what's confusing me a lot, as I am 100% sure it was was just a regular string just like any other string, only difference is that it had the #13+ but I don't think it will make any difference
On all cases shall I empty the string manually?
Please let me know your thoughts