From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22656 invoked by alias); 21 Jun 2005 03:40:45 -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 22646 invoked by uid 22791); 21 Jun 2005 03:40:40 -0000 Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 21 Jun 2005 03:40:40 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-206-160.inter.net.il [83.130.206.160]) by romy.inter.net.il (MOS 3.5.8-GR) with ESMTP id BPE56177 (AUTH halo1); Tue, 21 Jun 2005 06:40:31 +0300 (IDT) Date: Tue, 21 Jun 2005 03:40:00 -0000 Message-Id: From: Eli Zaretskii To: Nick Roberts CC: gdb-patches@sources.redhat.com In-reply-to: <17079.14386.484824.134375@farnswood.snap.net.nz> (message from Nick Roberts on Tue, 21 Jun 2005 09:42:10 +1200) Subject: Re: [PATCH] MI error messages Reply-to: Eli Zaretskii References: <17075.57612.684597.392526@farnswood.snap.net.nz> <20050618155742.GB3663@nevyn.them.org> <17076.42233.730605.834264@farnswood.snap.net.nz> <20050618232032.GA28368@nevyn.them.org> <17076.59646.873454.551250@farnswood.snap.net.nz> <20050619145612.GA8219@nevyn.them.org> <17077.61587.164352.664225@farnswood.snap.net.nz> <17078.19977.660644.9978@farnswood.snap.net.nz> <20050620135108.GA29453@nevyn.them.org> <17079.14386.484824.134375@farnswood.snap.net.nz> X-SW-Source: 2005-06/txt/msg00325.txt.bz2 > From: Nick Roberts > Date: Tue, 21 Jun 2005 09:42:10 +1200 > Cc: Eli Zaretskii , gdb-patches@sources.redhat.com > > > I like this idea; in fact, this is the style I was going to recommend > > to you (until I went through and noticed that it is only used for > > functions with arguments, not without, at the moment). > > Here's a patch for mi-cmd-stack.c and mi-cmd-var.c to start with. Only the > word "Usage" should be translated so e.g > > error (_("Usage: -stack-list-locals PRINT_VALUES")); > > should be something like: > > error (_("Usage")(": -stack-list-locals PRINT_VALUES")); > > but I don't what the correct way to do this is. Andreas suggested one way to do this. But I think it would be better to add a function called, say, mi_error, that would do error (_("Usage: %s."), msg); where `msg' is a char * string passed as its argument, and then replace each call to `error' with a call to `mi_error', like so: mi_error ("-stack-list-locals PRINT_VALUES"); The advantage of this is that "Usage: %s" is not repeated dozens of times in the message catalog and in the program. > Also, in mi-cmd-stack.c, I've given get_selected_frame the message string > "No stack." but presumably this also gets translated so should it be: > > get_selected_frame (_("No stack.")) ? Yes. > Some error messages are terminated with a period, others aren't. I don't > know which style is preferred but clearly it would be best to just use > one. They should all end with a period, I think.