Recent

Author Topic: Problem with creating .po file  (Read 6179 times)

viman

  • Newbie
  • Posts: 2
Problem with creating .po file
« on: August 13, 2011, 08:28:38 pm »
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

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Problem with creating .po file
« Reply #1 on: August 14, 2011, 12:23:08 am »
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

  • Newbie
  • Posts: 2
Re: Problem with creating .po file
« Reply #2 on: August 14, 2011, 09:04:47 am »
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: [Select]
...
uses
  ...
  LResources, DefaultTranslator;
...
...
initialization
  LRSTranslator := TPoTranslator.Create('/path/to/the/po/file');

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: [Select]
Delay activation of pipette/ruler
Range: 0-5 [sec]

In .lrt file I have something I want:
Code: [Select]
TFMAIN.TBPICKDELAY.HINT=Delay activation of pipette/ruler
Range: 0-5 [sec]

But in .po file I only get
Code: [Select]
msgid: Delay activation of pipette/ruler
msgstr:

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

 

TinyPortal © 2005-2018