[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6587: [PATCH] chcon, chmod, chown, du: don't translate "%s"
From: |
Jim Meyering |
Subject: |
bug#6587: [PATCH] chcon, chmod, chown, du: don't translate "%s" |
Date: |
Fri, 09 Jul 2010 15:15:08 +0200 |
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 <address@hidden>
> ---
> 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.