* [PATCH binutils] gprof: add no-c-format comment for msgid '%time'
[not found] <20110417193136.29404.28033.reportbug@fel>
@ 2011-04-19 3:56 ` Jonathan Nieder
2011-04-28 5:13 ` Alan Modra
0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Nieder @ 2011-04-19 3:56 UTC (permalink / raw)
To: binutils; +Cc: Felipe E. F. de Castro
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 <fefcas@gmail.com>
---
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 <jrnieder@gmail.com>
+
+ * cg_print.c (print_header): Add no-c-format comment to prevent
+ confusion when translating "%time".
+
2011-03-30 Nick Clifton <nickc@redhat.com>
* 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
^ permalink raw reply [flat|nested] 2+ messages in thread