bug-bison
[Top][All Lists]
Advanced

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

Untranslatable messages


From: Göran Uddeborg
Subject: Untranslatable messages
Date: Sat, 10 Nov 2001 13:12:52 +0100

I'm working on the translation of bison 1.30a.

In src/reduce.c there are a number of instances where you assume "s"
is a universal plural ending:

      fprintf (stderr, _("%d useless nonterminal%s"),
               nuseless_nonterminals,
               (nuseless_nonterminals == 1 ? "" : "s"));

      fprintf (stderr, _("%d useless rule%s"),
               nuseless_productions, (nuseless_productions == 1 ? "" : "s"));

    fprintf (stderr, _("reduced %s defines %d terminal%s, %d nonterminal%s\
, and %d production%s.\n"),
             infile,
             ntokens,
             (ntokens == 1 ? "" : "s"),
             nvars,
             (nvars == 1 ? "" : "s"),
             nrules,
             (nrules == 1 ? "" : "s"));

Unfortunately, this won't work for very many languages.

To do this correctly, may I suggest you have a look at the function
ngettext().

If you don't want to use that for some reason, please at least split
it up in two messages and an if-statement.  Assuming only one is the
only special case is still not universally true, but it is at least
better than also assuming "s" is the plural ending.



reply via email to

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