[Lazarus] Resource strings and newline
Juha Manninen
juha.manninen62 at gmail.com
Tue Jun 17 15:52:10 CEST 2014
On Tuesday, June 17, 2014, Péter Gábor <ptrg at freemail.hu> wrote:
>
>
> Can someone change the title of the bug-report #26343 to something
> that is more descriptive and refers to what we are talking about there?
>
> eg.: lazaruside.*.po contains semi converted and/or confusing strings:
> "%s%s%s"
>
I will explain what has happened so far.
First I noticed the usage of double quote character in resource strings is
inconsistent. Some were hard coded inside a string and some were passed as
Format parameter %s.
Together with other parameters they often formed long, 5 or 6,
parameters in row. Their meaning was not obvious and had to be dug from
source code.
I changed some and removed few duplicates, but then I decided to switch all
quotation marks to hard coded. They were plenty but still it is only a
small fraction of all resource strings in Lazarus project.
Often the resource strings are generated with a tool. It used to add
parameters for quotes but does't any more. Thus the change was logical, the
usage of quotes will be consistent.
Gábor's bug report is about parameters used for newlines. They are not
"semi converted". I did not touch them, they have been there always.
It seems to be possible to use #13#10 inside the string instead of
using parameters. Why is it not done for Lazarus IDE strings, I don't know.
Maybe other Lazarus developers could comment on this.
There is a massive amount of those parametrized newlines and the tools are
generating more of them. It is not realistic to change them, although I
personally would like to see parameters used only for truly varying data.
Regards
Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140617/c12c8fc7/attachment-0003.html>
More information about the Lazarus
mailing list