GNU bug report logs -
#6587
[PATCH] chcon, chmod, chown, du: don't translate "%s"
Previous Next
Reported by: Paul Eggert <eggert <at> CS.UCLA.EDU>
Date: Thu, 8 Jul 2010 18:42:01 UTC
Severity: normal
Tags: patch
Fixed in version 8.6
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6587 in the body.
You can then email your comments to 6587 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#6587
; Package
coreutils
.
(Thu, 08 Jul 2010 18:42:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Paul Eggert <eggert <at> CS.UCLA.EDU>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Thu, 08 Jul 2010 18:42:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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 <eggert <at> cs.ucla.edu>
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 <eggert <at> cs.ucla.edu>
---
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
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#6587
; Package
coreutils
.
(Fri, 09 Jul 2010 13:16:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 6587 <at> debbugs.gnu.org (full text, mbox):
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 <eggert <at> cs.ucla.edu>
> ---
> 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.
bug marked as fixed in version 8.6, send any further explanations to Paul Eggert <eggert <at> CS.UCLA.EDU>
Request was from
Pádraig Brady <P <at> draigBrady.com>
to
control <at> debbugs.gnu.org
.
(Wed, 14 Jul 2010 16:18:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 12 Aug 2010 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 313 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.