From unknown Wed Jun 18 23:18:16 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#6587 <6587@debbugs.gnu.org> To: bug#6587 <6587@debbugs.gnu.org> Subject: Status: [PATCH] chcon, chmod, chown, du: don't translate "%s" Reply-To: bug#6587 <6587@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:18:16 +0000 retitle 6587 [PATCH] chcon, chmod, chown, du: don't translate "%s" reassign 6587 coreutils submitter 6587 Paul Eggert severity 6587 normal tag 6587 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 08 14:41:27 2010 Received: (at submit) by debbugs.gnu.org; 8 Jul 2010 18:41:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWw2J-0001q3-Bi for submit@debbugs.gnu.org; Thu, 08 Jul 2010 14:41:27 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWw2H-0001pv-3i for submit@debbugs.gnu.org; Thu, 08 Jul 2010 14:41:25 -0400 Received: from lists.gnu.org ([199.232.76.165]:59535) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OWw2C-00014B-Ni for submit@debbugs.gnu.org; Thu, 08 Jul 2010 14:41:20 -0400 Received: from [140.186.70.92] (port=40183 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWw2B-0001id-Bb for bug-coreutils@gnu.org; Thu, 08 Jul 2010 14:41:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OWw21-0000HN-UD for bug-coreutils@gnu.org; Thu, 08 Jul 2010 14:41:19 -0400 Received: from kiwi.cs.ucla.edu ([131.179.128.19]:44447) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWw21-0000H9-LR for bug-coreutils@gnu.org; Thu, 08 Jul 2010 14:41:09 -0400 Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by kiwi.cs.ucla.edu (8.13.8+Sun/8.13.8/UCLACS-6.0) with ESMTP id o68If7hx017458 for ; Thu, 8 Jul 2010 11:41:07 -0700 (PDT) Message-ID: <4C361BC3.9090000@cs.ucla.edu> Date: Thu, 08 Jul 2010 11:41:07 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100527 Thunderbird/3.0.5 MIME-Version: 1.0 To: bug-coreutils@gnu.org Subject: [PATCH] chcon, chmod, chown, du: don't translate "%s" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.8 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.8 (----) I noticed that du translates the string "%s". This doesn't make sense to me, and in looking at the translation files I notice that some translators were confused by this, and translated "%s" to "", thus causing the file names to be omitted in the output. Here is the obvious fix. >From 63e11d12383be1fd7b9fc0ea336250e44ec3c793 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 8 Jul 2010 11:38:15 -0700 Subject: [PATCH] chcon, chmod, chown, du: don't translate "%s" * src/chcon.c (process_file): Replace _("%s") with "%s". * src/chmod.c (process_file): Likewise. * src/chown-core.c (change_file_owner): Likewise. * src/du.c (process_file): Likewise. 2010-07-08 Paul Eggert --- src/chcon.c | 2 +- src/chmod.c | 2 +- src/chown-core.c | 2 +- src/du.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/chcon.c b/src/chcon.c index 02f190d..5d0a86b 100644 --- a/src/chcon.c +++ b/src/chcon.c @@ -257,7 +257,7 @@ process_file (FTS *fts, FTSENT *ent) break; case FTS_ERR: - error (0, ent->fts_errno, _("%s"), quote (file_full_name)); + error (0, ent->fts_errno, "%s", quote (file_full_name)); ok = false; break; diff --git a/src/chmod.c b/src/chmod.c index 83f6783..61a3807 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -212,7 +212,7 @@ process_file (FTS *fts, FTSENT *ent) case FTS_ERR: if (! force_silent) - error (0, ent->fts_errno, _("%s"), quote (file_full_name)); + error (0, ent->fts_errno, "%s", quote (file_full_name)); ok = false; break; diff --git a/src/chown-core.c b/src/chown-core.c index 22a178a..1d3f74c 100644 --- a/src/chown-core.c +++ b/src/chown-core.c @@ -305,7 +305,7 @@ change_file_owner (FTS *fts, FTSENT *ent, case FTS_ERR: if (! chopt->force_silent) - error (0, ent->fts_errno, _("%s"), quote (file_full_name)); + error (0, ent->fts_errno, "%s", quote (file_full_name)); ok = false; break; diff --git a/src/du.c b/src/du.c index d8c7e00..3d92579 100644 --- a/src/du.c +++ b/src/du.c @@ -465,7 +465,7 @@ process_file (FTS *fts, FTSENT *ent) case FTS_ERR: /* An error occurred, but the size is known, so count it. */ - error (0, ent->fts_errno, _("%s"), quote (file)); + error (0, ent->fts_errno, "%s", quote (file)); ok = false; break; -- 1.7.0.4 From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 09 09:15:24 2010 Received: (at 6587) by debbugs.gnu.org; 9 Jul 2010 13:15:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OXDQJ-0003Lo-K0 for submit@debbugs.gnu.org; Fri, 09 Jul 2010 09:15:23 -0400 Received: from smtp5-g21.free.fr ([212.27.42.5]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OXDQG-0003Lj-Fw for 6587@debbugs.gnu.org; Fri, 09 Jul 2010 09:15:22 -0400 Received: from mx.meyering.net (unknown [82.230.74.64]) by smtp5-g21.free.fr (Postfix) with ESMTP id 4198ED4812D; Fri, 9 Jul 2010 15:15:09 +0200 (CEST) Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id DBBBDDE18; Fri, 9 Jul 2010 15:15:08 +0200 (CEST) From: Jim Meyering To: Paul Eggert Subject: Re: bug#6587: [PATCH] chcon, chmod, chown, du: don't translate "%s" In-Reply-To: <4C361BC3.9090000@cs.ucla.edu> (Paul Eggert's message of "Thu, 08 Jul 2010 11:41:07 -0700") References: <4C361BC3.9090000@cs.ucla.edu> Date: Fri, 09 Jul 2010 15:15:08 +0200 Message-ID: <87vd8olrtv.fsf@meyering.net> Lines: 45 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 6587 Cc: 6587@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) Paul Eggert wrote: > I noticed that du translates the string "%s". This doesn't make sense > to me, and in looking at the translation files I notice that some > translators were confused by this, and translated "%s" to "", thus > causing the file names to be omitted in the output. Here is the > obvious fix. Thanks! > Subject: [PATCH] chcon, chmod, chown, du: don't translate "%s" > > * src/chcon.c (process_file): Replace _("%s") with "%s". > * src/chmod.c (process_file): Likewise. > * src/chown-core.c (change_file_owner): Likewise. > * src/du.c (process_file): Likewise. > > 2010-07-08 Paul Eggert > --- > src/chcon.c | 2 +- > src/chmod.c | 2 +- > src/chown-core.c | 2 +- > src/du.c | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/src/chcon.c b/src/chcon.c > index 02f190d..5d0a86b 100644 > --- a/src/chcon.c > +++ b/src/chcon.c > @@ -257,7 +257,7 @@ process_file (FTS *fts, FTSENT *ent) > break; > > case FTS_ERR: > - error (0, ent->fts_errno, _("%s"), quote (file_full_name)); > + error (0, ent->fts_errno, "%s", quote (file_full_name)); That is a fine change. Please push it. Though do note that I've tried (over the years) to eradicate such uses of bare "%s", replacing each with a format string containing %s and actual words telling what operation was being attempted or what has failed. That is usually a lot more informative than a bare "filename: strerror(errno)" diagnostic. What makes it hard here is that (as I recall) fts_* can fail with FTS_ERR in several different ways, so I punted and left it bare. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 12:17:59 2010 Received: (at control) by debbugs.gnu.org; 14 Jul 2010 16:17:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZ4el-0007dM-Ag for submit@debbugs.gnu.org; Wed, 14 Jul 2010 12:17:59 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OZ4ek-0007dD-IU for control@debbugs.gnu.org; Wed, 14 Jul 2010 12:17:58 -0400 Received: (qmail 3790 invoked from network); 14 Jul 2010 16:18:06 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 14 Jul 2010 16:18:06 -0000 Message-ID: <4C3DE2F0.6060703@draigBrady.com> Date: Wed, 14 Jul 2010 17:16:48 +0100 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: control@debbugs.gnu.org X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) close 6587 8.6 From unknown Wed Jun 18 23:18:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 12 Aug 2010 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator