Re: [Freeciv-Dev] patch: registry improvements (PR#98)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
David Perez Serrada <dperezs@xxxxxxx> wrote:
> In your patch, you mark multiline and i18n strings in the
> following way:
>
> - -------- a ruleset file -----
> wellcome=_("This is Freeciv
> version 2.3 :-)")
> - -----------------------------
>
> wich is parsed by freeciv, to one line string, as:
>
> wellcome=_("This is Freeciv\nversion 2.3 :-)")
>
> then the translatable string is fetch by xgettext and added to
> freeciv.pot file as following:
>
> msgid="This is Freeciv"
>
> ¿What has happend?. xgettext fetch the string from the ruleset
> file, and takes a new line as an end of a string, so only the first
> line of a multiline string is get.
Darn. I was hoping xgettext would be smarter, and convert this
to something like:
msgid=""
"This is Freeciv\n"
"version 2.3 :-)"
(which I understand is what gettext uses if you have strings
with embedded "\n").
> wellcome= _("This is Freeciv "
> "version 2.3 :-)")
Unfortunately this way it becomes painful to add multiline
helptext to the ruleset file, since one would have to manually
add double quotes to every line, and add explicit "\n" too
if/where they are actually desired.
But I guess maybe we have to do something like this to keep
gettext happy... Or maybe we could have a script which converts
marked strings in ruleset files to a more appropriate format.
(This could also make the output look more like C source to
suppress other warning messages from xgettext...)
Regards,
-- David
|
|