[Top][All Lists]

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

Re: French translation of Bison runs afoul of gettext 0.15

From: Bruno Haible
Subject: Re: French translation of Bison runs afoul of gettext 0.15
Date: Mon, 24 Jul 2006 15:47:18 +0200
User-agent: KMail/1.9.1

Paul Eggert wrote:
> I'm CC'ing this to bug-gnu-gettext, because it seems to me that the
> translations are not strictly an error from a printf point of view
> (ignoring any issue of the correctness of the French), since printf
> allows formats that do not consume all the arguments.  For example,
> <http://www.opengroup.org/onlinepubs/009695399/functions/fprintf.html>
> says "If the format is exhausted while arguments remain, the excess
> arguments shall be evaluated but are otherwise ignored."; this is
> longstanding practice.  So it may make sense to warn about this
> particular usage, but a fatal error is a bit strong.

It is true that the printf function would not crash if some arguments
are passed but not used by the format string. However, these %d directives
are meant to give some information to the user. If the English original
string shows the precise number of reduce/reduce conflicts, but the
translation only shows that there is more than 1, without giving the
number, the translation is inadequate. This is why msgfmt gives an error.

You will notice that msgfmt didn't complain about msgstr[0]. This is
because this case is only used for n=0 and n=1. Here the translator
could have put all relevant information into the string without using

   #: src/conflicts.c:520
   #, c-format
   msgid "expected %d reduce/reduce conflict"
   msgid_plural "expected %d reduce/reduce conflicts"
   msgstr[0] "attendait 0 conflit par réduction/réduction"
   msgstr[1] "attendait 0 conflits par réduction/réduction"

Incidentally this msgstr[0] translation is wrong as well: it says that
there were 0 conflicts, but it could be 0 or 1 (according to the
Plural-Forms formula in the PO file's header).


reply via email to

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