GNU bug report logs - #6587
[PATCH] chcon, chmod, chown, du: don't translate "%s"

Previous Next

Package: coreutils;

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.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> CS.UCLA.EDU>
To: 6587 <at> debbugs.gnu.org
Subject: bug#6587: [PATCH] chcon, chmod, chown, du: don't translate "%s"
Date: Thu, 08 Jul 2010 11:41:07 -0700
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






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.