[Lazarus] Multi-line msgid in PO file
Henry Vermaak
henry.vermaak at gmail.com
Fri Feb 1 10:43:48 CET 2019
On Thu, 31 Jan 2019 at 23:38, Maxim Ganetsky via lazarus
<lazarus at lists.lazarus-ide.org> wrote:
> 31.01.2019 14:01, Henry Vermaak via lazarus пишет:
> > On Wed, Jan 30, 2019 at 08:19:47PM +0300, Maxim Ganetsky via lazarus wrote:
> >> 30.01.2019 20:10, Henry Vermaak via lazarus пишет:
> >>> I've had a problem with multi-line translations not working and realised
> >>> that an extra '\n' was appended to the last line of the msgid in the PO
> >>> file causing the translation lookup to fail. I'm assuming that this is
> >>> a bug, but thought I'd ask here first.
>
> 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.
Could you explain what was wrong with the patch I sent in the first message?
Henry
More information about the lazarus
mailing list