c++/7765 [Patch]

Wolfgang Bangerth bangerth@ticam.utexas.edu
Mon Oct 28 11:06:00 GMT 2002

> > I'm presently about to do just that, with a small script. There are
> > literally dozens of such cases in the danish translation, and at least ten
> > more in the french one, where formats don't match (things are a little bit
> > complicated, since a % might be followed by a charater that needs to be
> > escaped in perl...).
> Joy.

I may have misunderstood the format at first when I said that. The present 
version of the script only checks for %., where initially I thought I 
would have to take care of %%. as well, where . could have been in 
[()\[\]\\]. But then, if one would do it correctly, one would have to 
check for length-width-size-height and whatnot specifiers as well, the 
full set of what printf et al understand. I did not do that -- there are 
more obvious problems that can be fixed first.

> > Also, do I understand you correctly that the
> > _order_ of formats needs to be preserved? (One would think so if things
> > are called via functions with an ellipsis at the end.) This is going to be
> > a headache for translators, because it restricts their choice of wording,
> > and it can also not be checked automatically, if the same format appears
> > more than once in the text.
> Yes, the order of formats must presently be preserved.  I realize that
> this interferes with proper translation.  What we need to do is
> implement the SVR4 "%1$x" printf extension: this allows you to write
>  msgid "statement about %d %s"
>  msgstr "statement about %2$s in quantity %1$d"
> (I will get to this eventually, but the list of things I will get to
> eventually has items on it from 1998, so don't hold your breath.
> Patches for diagnostic.c are welcome.)

Doing this first, before cleaning up what is there now, may be even 
the simpler way: about 1000 (half of the total) are ordering problems. 
These could, to a large extent, probably be fixed if the SVR4 syntax would 
be there, without even knowing the language in question. Maybe even 


Wolfgang Bangerth              email:           bangerth@ticam.utexas.edu
                               www: http://www.ticam.utexas.edu/~bangerth

More information about the Gcc-bugs mailing list