Hello.
I have problem with translation of resource string in some unit.
Some string are translated, some are not translated. That is the mystery.
I have unit which contain all resource string I use in application.
Following code is used to translate unit:
procedure FavLoadFullResourceStrings;
var MyFileName: String;
MyTranslate: String;
MyTranslate1: String;
MyResult: Boolean;
begin
try
// this is hardcoded file name
MyFileName := 'languages' + SysUtils.PathDelim + 'fullresourcestrings-updated.po';
MyTranslate := rsLoginNetworkErrorNetworkIDFor;
if FileExists(MyFileName) then begin
MyResult := Translations.TranslateUnitResourceStrings('FullResourceStrings', MyFileName);
end;
MyTranslate1 := rsLoginNetworkErrorNetworkIDFor;
// FavSaveToFile('MyTranslate1.txt', MyTranslate1);
except
end;
end;
Now, this function translates some string in unit and some not. It is not an issue of fuzzy strings because I checked.
I suspect to TranslateUnitResourceStrings, but I'm not sure. I tried for 6 hours many combinations and without success.
String which is not translated
#: fullresourcestrings.rsloginnetworkerrornetworkidfor
msgctxt "fullresourcestrings:rsloginnetworkerrornetworkidfor"
msgid "Network \"ID\" for office [%s] and terminal [%s] is different then yours. Your network ID is [%s]. Call technical support for assistance!!!"
msgstr "Network \"ID\" for office [%s] and terminal [%s] is different then yours. Your network ID is [%s]. Call technical support for assistance|ID de rețea pentru agenția [%s] și terminalul [%s] este diferit de al vostru. ID-ul vostru este [%s]. Sunați la Call Center pentru ajutor"
After translation I expect string
Network \"ID\" for office [%s] and terminal [%s] is different then yours. Your network ID is [%s]. Call technical support for assistance|ID de rețea pentru agenția [%s] și terminalul [%s] este diferit de al vostru. ID-ul vostru este [%s]. Sunați la Call Center pentru ajutor"
but nothing happen
Maybe exists some limitation in translation function which I'm not aware of.
I use CT 5.10 32 on Win64.
Any idea is appreciated.
Regards, Dinko