[Lazarus] Resource strings and newline

Václav Valíček vaclav at valicek.name
Tue Jun 17 10:13:21 CEST 2014


In my opinion, ti should be solved... I am adding \n into po files 
translations of licences, where the new line is needed. But If I need 
linebreak in resourcestring, it's not really comfortable to replace 
every linebreak with %s and Format() param - it decreases readablity of 
file... In my apps, I am using gettext ported from some gnu library for 
delphi, where translation is done with _('text to translate') function 
(which accepts Format() params too) and there is no problem with \n in 
text... Another advantage is that I don't have to look for 
resourcestring and check if it is not used in another part of 
application, but I have to use external tool to regenerate translations....

Václav Valíček
vaclav at valicek.name

Dne 17.6.2014 07:36, Juha Manninen napsal(a):
> Could somebody please explain what happens when there is #13#10 in a
> resource string.
>
> See issue
>    http://bugs.freepascal.org/view.php?id=26343
> and a note:
>    http://bugs.freepascal.org/view.php?id=26343#c75738
>
> It is converted to \n in .po file strings.
> However Format() does not convert \n. How can it work?
> I will do more experiments later today.
>
> Regards,
> Juha
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus





More information about the Lazarus mailing list