GNU bug report logs - #11470
bug in 8.17 pot file

Previous Next

Package: coreutils;

Reported by: Toomas Soome <Toomas.Soome <at> Elion.ee>

Date: Mon, 14 May 2012 17:52:01 UTC

Severity: normal

Merged with 11471, 11472, 11483, 11494, 11740

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Primoz PETERLIN <primozz.peterlin <at> gmail.com>
Subject: bug#11483: closed (Re: bug#11472: Message src/fmt.c:285 marked as
 c-formatted string erroneously)
Date: Wed, 16 May 2012 05:34:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#11470: Problem with translation of coreutils 8.17

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 11483 <at> debbugs.gnu.org.

-- 
11470: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11470
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jim Meyering <jim <at> meyering.net>
To: Eric Blake <eblake <at> redhat.com>
Cc: 11470-done <at> debbugs.gnu.org
Subject: Re: bug#11472: Message src/fmt.c:285 marked as c-formatted string
	erroneously
Date: Wed, 16 May 2012 07:33:00 +0200
Eric Blake wrote:
> merge 11470 11472
> thanks
>
> On 05/14/2012 01:27 PM, Petr Pisar wrote:
>> The problem is such string does not pass through msgfmt tool while compiling
>> the catalog because the '% ' is not a valid printf sequence.
>>
>> Solution is to suppress the auto-detection by adding /*xgettext:no-c-format*/
>> before the fputs() line in the source code.
>
> Thanks.  You're the third person to report this today, but the first to
> provide a potential patch.  Are you comfortable submitting that fix in
> 'git format-patch' form with a proper commit message?  If not, we will
> probably do it on your behalf in the next 24 hours or so.

Thanks for all the replies and for merging those, Eric.

I wrote the patch.  As expected, it was more work to collect and
insert names in THANKS.in than to make the actual change ;-)
Note that Göran's name is already in the generated THANKS file,
so I didn't add it below.

If anyone listed prefers a different spelling of name or email,
just let us know.

From 54be50197b47ba9200a1c3e48847fa959d4f5bfd Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering <at> redhat.com>
Date: Wed, 16 May 2012 07:26:36 +0200
Subject: [PATCH] maint: tell xgettext that fputs arg "93% of..." is not a C
 format string
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* src/fmt.c (usage): Add a comment to tell
xgettext that the "% o" in fputs argument string of "...93% of..."
is not a C format string.  Reported by Toomas Soome, Göran Uddeborg,
Petr Pisar, Primoz PETERLIN and Chusslove Illich via
http://bugs.gnu.org/11470
---
 THANKS.in | 4 ++++
 src/fmt.c | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/THANKS.in b/THANKS.in
index 5c7dde8..6c826af 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -121,6 +121,7 @@ Christian Rose                      menthos <at> menthos.com
 Christian von Roques                roques <at> pond.sub.org
 Christophe LYON                     christophe.lyon <at> st.com
 Chuck Hedrick                       hedrick <at> klinzhai.rutgers.edu
+Chusslove Illich                    caslav.ilic <at> gmx.net
 Clark Morgan                        cmorgan <at> aracnet.com
 Clement Wang                        clem.wang <at> overture.com
 Colin Plumb                         colin <at> nyx.net
@@ -482,6 +483,7 @@ Peter Horst                         peter <at> ointment.org
 Peter Moulder                       reiter <at> netspace.net.au
 Peter Samuelson                     psamuels <at> sampo.creighton.edu
 Peter Seebach                       seebs <at> taniemarie.solon.com
+Petr Pisar                          petr.pisar <at> atlas.cz
 Petr Uzel                           petr.uzel <at> suse.cz
 Petter Reinholdtsen                 pere <at> hungry.com
 Phelippe Neveu                      pneveu <at> pcigeomatics.com
@@ -496,6 +498,7 @@ Piotr Gackiewicz                    gacek <at> intertele.pl
 Piotr Kwapulinski                   kwap <at> univ.gda.pl
 Prashant TR                         tr <at> eth.net
 Priit Jõerüüt                       jemm4jemm <at> yahoo.com
+Primoz PETERLIN                     primozz.peterlin <at> gmail.com
 Rainer Orth                         ro <at> TechFak.Uni-Bielefeld.DE
 Ralf W. Stephan                     stephan <at> tmt.de
 Ralph Loader                        loader <at> maths.ox.ac.uk
@@ -593,6 +596,7 @@ Ton Nijkes                          ton <at> murphy.nl
 Tony Kocurko                        akocurko <at> mun.ca
 Tony Leneis                         tony <at> plaza.ds.adp.com
 Tony Robinson                       ajr <at> eng.cam.ac.uk
+Toomas Soome                        Toomas.Soome <at> Elion.ee
 Toralf Förster                      toralf.foerster <at> gmx.de
 Torbjorn Granlund                   tege <at> nada.kth.se
 Torbjorn Lindgren                   tl <at> funcom.no
diff --git a/src/fmt.c b/src/fmt.c
index 3da198e..3e93654 100644
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -281,10 +281,12 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -p, --prefix=STRING       reformat only lines beginning with STRING,\n\
                               reattaching the prefix to reformatted lines\n\
   -s, --split-only          split long lines, but do not refill\n\
 "),
              stdout);
+      /* Tell xgettext that the "% o" below is not a printf-style
+         format string:  xgettext:no-c-format */
       fputs (_("\
   -t, --tagged-paragraph    indentation of first line different from second\n\
   -u, --uniform-spacing     one space between words, two after sentences\n\
   -w, --width=WIDTH         maximum line width (default of 75 columns)\n\
   -g, --goal=WIDTH          goal width (default of 93% of width)\n\
--
1.7.10.2.520.g6a4a482

[Message part 3 (message/rfc822, inline)]
From: Primoz PETERLIN <primozz.peterlin <at> gmail.com>
To: bug-coreutils <at> gnu.org, translation-i18n <at> lists.sourceforge.net
Subject: Problem with translation of coreutils 8.17
Date: Tue, 15 May 2012 21:57:07 +0200
Hello,

Coreutils 8.17 introduced a small change in the message catalogue
which causes considerable problems to translators.

The part which causes problems is:

#: src/fmt.c:285
#, c-format
msgid ""
"  -t, --tagged-paragraph    indentation of first line different from second\n"
"  -u, --uniform-spacing     one space between words, two after sentences\n"
"  -w, --width=WIDTH         maximum line width (default of 75 columns)\n"
"  -g, --goal=WIDTH          goal width (default of 93% of width)\n"
msgstr ""

Apparently, msgfmt interprets "% o" in the help text of the --goal
option as a format specifier. This means that the translations will be
rejected unless the translation also contains the same sequence: %
being followed by a space, being followed by a small o.

All the best,
Primož



This bug report was last modified 12 years and 343 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.