From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28909 invoked by alias); 25 Oct 2004 20:10:18 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28898 invoked from network); 25 Oct 2004 20:10:16 -0000 Received: from unknown (HELO legolas.inter.net.il) (192.114.186.24) by sourceware.org with SMTP; 25 Oct 2004 20:10:16 -0000 Received: from zaretski ([80.230.142.68]) by legolas.inter.net.il (MOS 3.5.3-GR) with ESMTP id CYE65044 (AUTH halo1); Mon, 25 Oct 2004 22:09:30 +0200 (IST) Date: Mon, 25 Oct 2004 20:10:00 -0000 From: "Eli Zaretskii" To: Daniel Jacobowitz Message-ID: <01c4bace$Blat.v2.2.2$09c744a0@zahav.net.il> Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=ISO-8859-1 CC: ibr@ata.cs.hun.edu.tr, gdb-patches@sources.redhat.com In-reply-to: <20041024201802.GA17380@nevyn.them.org> (message from Daniel Jacobowitz on Sun, 24 Oct 2004 16:18:02 -0400) Subject: Re: an i18n sample Reply-to: Eli Zaretskii References: <20041024104805.GA2369@ata.cs.hun.edu.tr> <01c4b9ff$Blat.v2.2.2$1ebcb860@zahav.net.il> <20041024201802.GA17380@nevyn.them.org> X-SW-Source: 2004-10/txt/msg00413.txt.bz2 > Date: Sun, 24 Oct 2004 16:18:02 -0400 > From: Daniel Jacobowitz > Cc: Baurjan Ismagulov , > gdb-patches@sources.redhat.com > > I agree about partial translations, of course. In this particular > case, it looks like the file needs type_sprint or type_to_string. It is generally bad to produce strings in parts, because that prevents the translator from seing the full sentence or at least a full phrase. So I think type_sprint etc. will not solve the problem I was worried about. > > > if (TYPE_LENGTH (type) <= 0) > > > { > > > - warning ("Invalid type size for `%s' detected: %d.", > > > - TYPE_NAME (rtype) ? TYPE_NAME (rtype) : "", > > > + warning (_("Invalid type size for `%s' detected: %d."), > > > + TYPE_NAME (rtype) ? TYPE_NAME (rtype) : _(""), > > > TYPE_LENGTH (type)); > > > } > > > > Same here. > > Actually, I disagree about this one. Whether or not "" > should be translated, is there any reason not to translate the format > string? That's not what I meant. I wanted to see something like this: if (TYPE_LENGTH (type) <= 0) { if (TYPE_NAME (rtype)) warning (_("Invalid type size for `%s' detected: %d."), TYPE_NAME (rtype), TYPE_LENGTH (type)); else warning (_("Invalid type size for detected: %d."), TYPE_LENGTH (type)); } > That said, the "when" is a partial sentence, and the \n%*s doesn't > need to be translated. That's a very partial sentence, so it needs to be made a full sentence along the same lines as above.