bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: final batch of tiny string fixes [patches]


From: Jim Meyering
Subject: Re: final batch of tiny string fixes [patches]
Date: Fri, 19 Sep 2008 12:33:01 +0200

Thanks for all the meticulous work!

I've applied all but two of those.  Comments below.

Re multiplier suffixes, I omitted part of this one,
  > Subject: [PATCH] od: avoid concatening two messages without a newline
as mentioned below.

In many of the ones I applied, I adjusted the one-line
summary to start with "progname --help: ..."
In a few logs, I mentioned "* src/filename.c (function): ...".
No big deal.

Benno Schulenberg <address@hidden> wrote:
>>From 4e00ae1354aa80baebf5ac3d2e1efc2c2a779ef3 Mon Sep 17 00:00:00 2001
> From: Benno Schulenberg <address@hidden>
> Date: Wed, 20 Aug 2008 22:24:38 +0200
> Subject: [PATCH] md5sum: avoid possible double singular/plural in warning 
> messages
>
> In many languages in "N out of M files failed" not only "files" needs to
> be singular or plural depending on M, but also "failed" needs a singular
> or plural form depending on N.  Avoid this complication and only say how
> many files failed; the total number of files is not really interesting
> anyway and only makes the message less clear.
> ---
>  src/md5sum.c |   26 +++++++++-----------------
>  1 files changed, 9 insertions(+), 17 deletions(-)
>
> diff --git a/src/md5sum.c b/src/md5sum.c
> index 238c02e..8bdbe97 100644
> --- a/src/md5sum.c
> +++ b/src/md5sum.c
> @@ -570,25 +570,17 @@ digest_check (const char *checkfile_name)
>       {
>         if (n_open_or_read_failures != 0)
>           error (0, 0,
> -                ngettext ("WARNING: %" PRIuMAX " of %" PRIuMAX
> -                          " listed file could not be read",
> -                          "WARNING: %" PRIuMAX " of %" PRIuMAX
> -                          " listed files could not be read",
> -                          select_plural (n_properly_formatted_lines)),
> -                n_open_or_read_failures, n_properly_formatted_lines);
> +                ngettext ("WARNING: %" PRIuMAX " file could not be read",
> +                          "WARNING: %" PRIuMAX " files could not be read",
> +                          select_plural (n_open_or_read_failures)),
> +                n_open_or_read_failures);
...
Ok, but rather, how about rewording it to retain the total number of
files considered.  That can be important information.  Imagine the user
thinks she is verifying the checksums of 10 files when in fact only 9
input lines are valid.  Omitting the "9" could be fatally misleading.
E.g., append "(of total: ...)"

Please adjust and resend this one.


>>From 3ef36c72666f7a6c1bc732c99d192bce8923a698 Mon Sep 17 00:00:00 2001
> From: Benno Schulenberg <address@hidden>
> Date: Wed, 20 Aug 2008 22:44:33 +0200
> Subject: [PATCH] pinky: gettextize two missed strings
>
> Additionally differentiate the strings for unknown idle time and
> unknown real name so they can be translated differently.
> ---
>  src/pinky.c |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/pinky.c b/src/pinky.c
> index 382f30f..8a7fe8b 100644
> --- a/src/pinky.c
> +++ b/src/pinky.c
> @@ -250,7 +250,8 @@ print_entry (const STRUCT_UTMP *utmp_ent)
>        name[UT_USER_SIZE] = '\0';
>        pw = getpwnam (name);
>        if (pw == NULL)
> -     printf (" %19s", "        ???");
> +     /* TRANSLATORS: Real name is unknown; at most 19 characters. */
> +     printf (" %19s", _("        ???"));
...
Why bother translating these in the first place?


>>From cc5f373ae5a7e0ea1186cb565c4147f2a155844e Mon Sep 17 00:00:00 2001
> From: Benno Schulenberg <address@hidden>
> Date: Wed, 20 Aug 2008 22:40:03 +0200
> Subject: [PATCH] od: avoid concatening two messages without a newline
>
> Better make them into two separate paragraphs.
> Also make the explanation of multiplier suffixes clearer.
> ---
>  src/od.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/od.c b/src/od.c
> index 5b4b7bd..ac515dd 100644
> --- a/src/od.c
> +++ b/src/od.c
> @@ -385,13 +385,13 @@ for sizeof(double) or L for sizeof(long double).\n\
>  \n\
>  RADIX is d for decimal, o for octal, x for hexadecimal or n for none.\n\
>  BYTES is hexadecimal with 0x or 0X prefix, and may have a multiplier 
> suffix:\n\
> -b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,\n\
> -GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.\n\
> +b =512, kB =1000, K =1024, MB =1000*1000, M =1024*1024,\n\
> +GB =1000*1000*1000, G =1024*1024*1024, and so on for T, P, E, Z, Y.\n\
>  Adding a z suffix to any type displays printable characters at the end of 
> each\n\

[dd already has your "b =512, ..." notation, but 8 other programs
 with the same strings do not]

I've applied this, but omitted the above part, because it adds "="
marks to just one of the several files that would need it in order to
keep those duplicated messages in sync.  However, I would welcome a patch
that unifies and (if possible) then factors out some of the duplication
displayed by this command:

    grep -E 'MB? =?10..\*10' src/*.c

Ideally, each message string would appear in just one place,
and all clients would use some symbol from e.g., system.h.

> -output line.  \
> +output line.\n\
>  "), stdout);
>        fputs (_("\
> ---string without a number implies 3.  --width without a number\n\
> +Option --string without a number implies 3; option --width without a 
> number\n\
>  implies 32.  By default, od uses -A o -t oS -w16.\n\
>  "), stdout);
>        emit_bug_reporting_address ();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]