Forum > Translations

One string not translated for unknown reason

(1/5) > >>

Roland57:
Hello!

I use PO files for this project. This is the first time I use PO files.

All my strings are correctly translated, excepted one which is always displayed in English.

The only difference that I can see with the other strings of the project is that this string has several lines, and that I use an included file.


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---(* aboutform.pas *)resourcestring  ReadMeText = {$I readme};  BTCloseCaption = 'Close';  FormCaption = 'About Mater GUI';

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---(* readme.pas *)  '' + LineEnding +  'Mater GUI %s' + LineEnding +  '' + LineEnding +  'Graphical user interface for Valentin Albillo''s mate searching program.' + LineEnding +  '' + LineEnding +  'Uses Chest by Heiner Marxen as auxiliary search engine.' + LineEnding +  '' + LineEnding +  'For Linux, uses Chest 3.19 (1). For Windows, uses WinChest by Heiner Marxen and Franz Huber (2).' + LineEnding +  '' + LineEnding +  '(1) http://turbotm.de/~heiner/Chess/chest.html' + LineEnding +  '(2) https://fhub.jimdofree.com' 
The included file is automatically generated from a .txt file that I edit by hand. That's why I do like that.

If someone who has more experience than I do with PO files would take a look, or has an idea why it doesn't work...

Regards.

Roland

Kays:

--- Quote from: Roland57 on November 27, 2021, 11:00:27 am ---The only difference that I can see with the other strings of the project is that this string has several lines, and that I use an included file.
--- End quote ---
If that was of any concern, you must see a difference if you substituted the {$I} with the file’s contents.


--- Quote from: Roland57 on November 27, 2021, 11:00:27 am ---All my strings are correctly translated, excepted one which is always displayed in English.
--- End quote ---
I checked out what messages you got and noticed readMeText is the only message containing newlines. This might be the culprit of your problem, that the msgids don’t match because of different encoding of newlines.

Roland57:
@Kays

Thank you for your answer.

I replaced "LineEnding" with "#10", and pasted the code directly in the file: the problem is still here.

Sieben:
You might want to have a look at this 'official' doc on handling po strings. Do a Ctrl-F on 'remainder' and read on. However, I don't know if it's implemented with the Lazarus version of GetText as well. But worth a try.

Roland57:
@Sieben

Thanks. I have read that page. I didn't find an explanation to my problem.

Navigation

[0] Message Index

[#] Next page

Go to full version