[Lazarus] Multi-line msgid in PO file

Maxim Ganetsky ganmax at narod.ru
Fri Feb 1 00:38:23 CET 2019

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.

Note that multiline strings seem to be always stored with Unix-style 
linebreaks in MO file, while in form they can have e.g. Windows-style or 
maybe even Mac-style linebreaks. Because of this, these strings should 
be normalized with regards to linebreaks before searching in MO file.

Linebreak at the end of multilined string should be present as per PO 
format examples, most PO editors add it anyway.

Also note, that loading multiline resourcestrings from MO files probably 
won't work in many cases for aforementioned reasons too, because Gettext 
unit does not account for platform-specific lineending changes at all.

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

More information about the lazarus mailing list