Forum > Translations

Problem with creating .po file

(1/1)

viman:
Hello,

I've just started to use Lazarus a few days ago and I have still a few problems with translation of my application.
What's wrong? I had some problems with making my application multilingual but, now they are almost solve. I use LResources, DefaultTranslator and LRSTranslator := TPoTranslator.Create() while initialization.

The problem is I wanted to do this with the least effort and let Lazarus to create .po file for me and... or it has some bug or I don't know how to solve it because it doesn't make it properly. I have a few hints on some components which takes several lines and when Lazarus makes .po file it only takes its first lines. Is it some bug or... how to make it in the right way?

Leledumbo:
Please post some code, we don't (and will never) know what you did that makes things doesn't work if we can't see how you did it.

viman:
I thought I post all needed informations about it. This is rather Lazarus problem than my code because code I use (from Lazarus Wiki) works:


--- Code: ---...
uses
  ...
  LResources, DefaultTranslator;
...
...
initialization
  LRSTranslator := TPoTranslator.Create('/path/to/the/po/file');
--- End code ---

I mean, I can translate my app with this perfectly.

The thing is I have a few components (TButton, TSpeedButton) which have several lines of Hint property (I made them with String Editor which is under [...] button. In Project Options->i18n I checked in "Enable i18n" option and set directory as "languages" which is in the same directory as my project, and also I have checked "Create/update .po file when saving a lfm file" option. When it creates this file it takes only first lines of Hint properties of this buttons.

For example, I have hint like this:

--- Code: ---Delay activation of pipette/ruler
Range: 0-5 [sec]
--- End code ---

In .lrt file I have something I want:

--- Code: ---TFMAIN.TBPICKDELAY.HINT=Delay activation of pipette/ruler
Range: 0-5 [sec]
--- End code ---

But in .po file I only get

--- Code: ---msgid: Delay activation of pipette/ruler
msgstr:
--- End code ---

So it's only the first line of it (missing "Range: 0-5 [sec]").

Navigation

[0] Message Index

Go to full version