[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xgettext does not preserve the translator comment.
From: |
Bruno Haible |
Subject: |
Re: [PATCH] xgettext does not preserve the translator comment. |
Date: |
Mon, 29 Dec 2003 13:21:42 +0100 |
User-agent: |
KMail/1.5 |
Sergey Poznyakoff wrote:
> Xgettext in versions 0.13 and 0.13.1 does not preserve the
> translators' comment in the following context:
>
> /* TRANSLATORS: Please, preserve the vertical tabulation (^K character)
> in this message */
> static char doc[] = N_("GNU MH forw\v"
> "Options marked with `*' are not yet implemented.\n"
> "Use -help to obtain the list of traditional MH options.");
>
> However, if the msgstr is rewritten as a single string, the comment
> is processed correctly.
Thanks for the report. It's a bug, indeed, and will be corrected in version
0.14.
> Attached is a patch that fixes this.
Thanks a lot for the patch. However, it does not treat the following
situation correctly:
/* TRANSLATORS: The strings get concatenated. */
print (gettext ("there is not enough"
" room on a single line for this entire long, " // confusing, eh?
"verbose string"));
It leads to
#. TRANSLATORS: The strings get concatenated.
#. confusing, eh?
msgid ""
"there is not enough room on a single line for this entire long, verbose "
"string"
msgstr ""
But in this case we want to drop the "confusing, eh?" comment, since the
documented behaviour of xgettext is to extract comments _before_ the strings,
not _inside_ the strings.
The xgettext Java backend (x-java.c) already handles this case correctly;
it's possible to copy the same technique to x-c.c and x-python.c.
> Previous versions of xgettext worked OK in both cases.
I'm now adding a test case to the test suite; this should guarantee that
it won't break again in the future.
Bruno