[Lazarus] Multi-line msgid in PO file

Maxim Ganetsky ganmax at narod.ru
Fri Feb 1 13:46:26 CET 2019


01.02.2019 12:43, Henry Vermaak пишет:
> On Thu, 31 Jan 2019 at 23:38, Maxim Ganetsky via lazarus
> <lazarus at lists.lazarus-ide.org> wrote:
>> Should be fixed in r60268.
> 
> No, lazarus still adds an extra newline to the end of the msgid
> entries in the PO files.  This is incorrect, the original text does
> not include a trailing newline (check the lrj file).  rstconv also
> doesn't write spurious newlines to PO files when I feed the lrj to it.
> 
>> Linebreak at the end of multilined string should be present as per PO
>> format examples, most PO editors add it anyway.

> No, this is incorrect.  PO editors have nothing to do with what gets
> added to msgid, but they will preserve the newlines that are in the
> msgid and make sure that the translation ends in a newline if the
> original ends in a newline.  xgettext is responsible for extracting
> strings from source and it does not add an extra newline when used
> with C or lua source, we've been using multiline strings in C and lua
> for years without issues.

As I remember, it was not the case earlier at least with Poedit. But its
current version behaves exactly as you describe. Maybe it is indeed a
good idea to avoid changing these newlines. I will look into it.

> Could you explain what was wrong with the patch I sent in the first message?

It needlessly changes formatting of PO files and is not sufficient to
correctly solve the problem at hand anyway. But changes along its lines
should be made, yes.

-- 
Best regards,
 Maxim Ganetsky                  mailto:ganmax at narod.ru


More information about the lazarus mailing list