From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21277 invoked by alias); 19 Apr 2011 03:56:36 -0000 Received: (qmail 21267 invoked by uid 22791); 19 Apr 2011 03:56:35 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,TW_GF,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-iy0-f169.google.com (HELO mail-iy0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 Apr 2011 03:56:21 +0000 Received: by iyh42 with SMTP id 42so6375664iyh.0 for ; Mon, 18 Apr 2011 20:56:20 -0700 (PDT) Received: by 10.42.52.133 with SMTP id j5mr188075icg.348.1303185380363; Mon, 18 Apr 2011 20:56:20 -0700 (PDT) Received: from elie ([69.209.64.141]) by mx.google.com with ESMTPS id t1sm3108771ibm.4.2011.04.18.20.56.18 (version=SSLv3 cipher=OTHER); Mon, 18 Apr 2011 20:56:19 -0700 (PDT) Date: Tue, 19 Apr 2011 03:56:00 -0000 From: Jonathan Nieder To: binutils@sourceware.org Cc: "Felipe E. F. de Castro" Subject: [PATCH binutils] gprof: add no-c-format comment for msgid '%time' Message-ID: <20110419035454.GA27588@elie> References: <20110417193136.29404.28033.reportbug@fel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110417193136.29404.28033.reportbug@fel> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-04/txt/msg00259.txt.bz2 The %time column heading in call graph profiles looks to xgettext like a printf format. When translators are confident to really translate it, the msgfmt program complains that the translation is malformed, which prevents the translation robot (of the Translation Project) from accepting the translation. But this is really just a plain string. Let xgettext know so by adding an xgettext:no-c-format comment to override the auto-detection. Reported-by: Felipe E. F. de Castro --- Hi, Felipe E. F. de Castro wrote[1]: > In the file cg_print.c, there is a translatable string which makes > gettext think it is in C-format, while in fact it is not: > _("%time") How about this patch? Untested. [1] http://bugs.debian.org/623151 gprof/ChangeLog | 5 +++++ gprof/cg_print.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gprof/ChangeLog b/gprof/ChangeLog index abb7959..6558b5f 100644 --- a/gprof/ChangeLog +++ b/gprof/ChangeLog @@ -1,3 +1,8 @@ +2011-04-18 Jonathan Nieder + + * cg_print.c (print_header): Add no-c-format comment to prevent + confusion when translating "%time". + 2011-03-30 Nick Clifton * po/eo.po: New Esperanto translation. diff --git a/gprof/cg_print.c b/gprof/cg_print.c index c1a2a31..de13f72 100644 --- a/gprof/cg_print.c +++ b/gprof/cg_print.c @@ -96,8 +96,11 @@ print_header () printf ("%6.6s %5.5s %7.7s %11.11s %7.7s/%-7.7s %-8.8s\n", "", "", "", "", _("called"), _("total"), _("parents")); printf ("%-6.6s %5.5s %7.7s %11.11s %7.7s+%-7.7s %-8.8s\t%5.5s\n", - _("index"), _("%time"), _("self"), _("descendants"), - _("called"), _("self"), _("name"), _("index")); + _("index"), + /* xgettext:no-c-format */ + _("%time"), + _("self"), _("descendants"), _("called"), _("self"), + _("name"), _("index")); printf ("%6.6s %5.5s %7.7s %11.11s %7.7s/%-7.7s %-8.8s\n", "", "", "", "", _("called"), _("total"), _("children")); printf ("\n"); -- 1.7.5.rc2