From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29471 invoked by alias); 28 Oct 2002 18:57:26 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 29444 invoked from network); 28 Oct 2002 18:57:25 -0000 Received: from unknown (HELO vortex.ticam.utexas.edu) (128.83.68.102) by sources.redhat.com with SMTP; 28 Oct 2002 18:57:25 -0000 Received: from gandalf.ticam.utexas.edu (IDENT:IgxQVSKneMDkcYfPuXKKqtHhxsecI1JR@gandalf.ticam.utexas.edu [128.83.68.35]) by vortex.ticam.utexas.edu (8.12.6/8.12.6) with ESMTP id g9SIvNLC012825; Mon, 28 Oct 2002 12:57:23 -0600 Date: Mon, 28 Oct 2002 10:57:00 -0000 From: Wolfgang Bangerth To: Zack Weinberg cc: gcc-bugs@gcc.gnu.org, , Michel Robitaille Subject: Re: c++/7765 [Patch] In-Reply-To: <20021028175923.GB24090@codesourcery.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-10/txt/msg01710.txt.bz2 > > 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 semiautomatically. Regards Wolfgang ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ticam.utexas.edu www: http://www.ticam.utexas.edu/~bangerth