[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xstrtol.h
From: |
Bruno Haible |
Subject: |
Re: xstrtol.h |
Date: |
Sun, 22 Jul 2007 13:03:32 +0200 |
User-agent: |
KMail/1.5.4 |
Hi Jim,
> What do you suggest to use as those strings?
> I.e., are you suggesting to convert each of the 5 uses of
> STRTOL_FATAL_ERROR in coreutils from e.g.,
>
> STRTOL_FATAL_ERROR (optarg, _("skip argument"), s_err);
>
> to
>
> STRTOL_FATAL_ERROR (optarg,
> _("invalid skip argument `%s'"),
> _("invalid character following skip argument in `%s'"),
> _("skip argument `%s' too large"),
> s_err);
Yes, this is what I'm proposing. This one is at least translatable:
- "invalid block size `%s'" => "ungültige Blockgröße «%s»"
- "invalid skip argument `%s'" => "ungültiges Lückenargument «%s»"
And as a side note: Translators understand "skip argument", as if 'skip' was
verb, leading to a completely unintelligible message. The German translation
interprets it like "to skip argument", the French translation like
"skipped argument".
> It doesn't seem justifiable to do that to the code solely
> to emit marginally improved diagnostics.
"Marginally improved"?! I bet if you were to use a program written by a
Chinese author and localized to English in the same way as through
babelfish:
"invalid jumps the argument `%s'"
you would see it differently.
But in this particular case, there is also a different possibility, that
also improves the quality of the English message. (You are using "skip"
as a noun. But what is "a skip"?) Namely, make it behave like
STRTOL_FATAL_ERROR (optarg,
_("invalid --skip-bytes argument `%s'"),
_("invalid character following --skip-bytes argument in
`%s'"),
_("--skip-bytes argument `%s' too large"),
s_err);
It is clearer what the message is referring to. And also --skip-bytes is a
string that does not require translation, therefore the macro invocation
actually can read
STRTOL_FATAL_ERROR (optarg, "--skip-bytes", s_err);
All uses of STRTOL_FATAL_ERROR are in this category:
./src/od.c: STRTOL_FATAL_ERROR (optarg, _("skip argument"), s_err);
--skip-bytes argument
./src/od.c: STRTOL_FATAL_ERROR (optarg, _("limit argument"), s_err);
--read-bytes argument
./src/od.c: STRTOL_FATAL_ERROR (optarg, _("minimum string length"),
s_err);
--strings argument
./src/od.c: STRTOL_FATAL_ERROR (optarg, _("width specification"),
s_err);
--width argument
./src/pr.c: _STRTOL_ERROR (EXIT_FAILURE, pages, _("page range"), err);
./src/pr.c: _STRTOL_ERROR (EXIT_FAILURE, pages, _("page range"), err);
--pages argument
./src/sort.c: STRTOL_FATAL_ERROR (s, _("sort size"), e);
--buffer-size argument
./src/df.c: human_output_opts = human_options (optarg, true,
&output_block_size);
--block-size argument
./src/du.c: human_output_opts = human_options (optarg, true,
&output_block_size);
--block-size argument
./src/ls.c: human_output_opts = human_options (optarg, true,
&output_block_size);
--block-size argument
I can prepare a patch for this; just let me know whether for
$ od -j -1
you would see the error message
od: invalid --skip-bytes argument `-1'
or
od: invalid `-j' argument `-1'
Bruno
- Re: POTFILES.in updates?, (continued)
- Re: POTFILES.in updates?, Bruno Haible, 2007/07/18
- Re: POTFILES.in updates?, Bruno Haible, 2007/07/19
- Re: POTFILES.in updates?, Eric Blake, 2007/07/19
- Re: xstrtol.h (was: Re: POTFILES.in updates?), Bruno Haible, 2007/07/21
- Re: xstrtol.h, Jim Meyering, 2007/07/21
- Re: xstrtol.h,
Bruno Haible <=
- Re: xstrtol.h, Eric Blake, 2007/07/22
- Re: xstrtol.h, Jim Meyering, 2007/07/22
- Re: xstrtol.h, Ben Pfaff, 2007/07/22
- Re: xstrtol.h, Jim Meyering, 2007/07/22
- Re: xstrtol.h, Jim Meyering, 2007/07/22
- Re: xstrtol.h, Jim Meyering, 2007/07/22
- Re: xstrtol.h, Bruno Haible, 2007/07/25
- human interface change?!? [Re: xstrtol.h, Jim Meyering, 2007/07/26
- Re: human interface change?!? [Re: xstrtol.h, Bruno Haible, 2007/07/26
- Re: human interface change?!? [Re: xstrtol.h, Jim Meyering, 2007/07/26