bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Request for modification of msgfmt.c and format-c.c


From: Bruno Haible
Subject: Re: Request for modification of msgfmt.c and format-c.c
Date: Mon, 4 Aug 2003 13:04:23 +0200
User-agent: KMail/1.5

Dear Ishikawa-san,

Thank you for drawing my attention to this issue.

It's not only 'msgfmt' which needs to be modified to support these gcc
format strings, but also 'xgettext', as you noticed.

Also, it is important to note that the GCC internal format strings are
*not* an extension of the C format strings: when you look at the
function output_format() in gcc-3.3/gcc/diagnostic.c you see that many
valid C format directives are not allowed in this context. This means
that a translator must not provide a translation that contains things
like %2$x or %llx or so. And "msgfmt -c" must give an error if a
translator does such things. This means that modifiying format-c.c
is not the right approach; rather a new file format-gcc-internal.c,
written from scratch, is needed.

And in the PO file the format strings for gcc should be marked as
"#, gcc-internal-format", not "#, c-format".

For this to happen, the simplest implementation is to allow an
xgettext option "--language=gcc-internal". This way, xgettext and
msgfmt don't need to have yet another command line option like "--gcc".

Best regards,

                     Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]