bug#45358: Wrong CA certificate on translationproject.org

2021-02-19 Thread Benno Schulenberg


Op 17-02-2021 om 10:28 schreef Nekolyanich:
> I find this https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45358 recently.

Cannot reproduce.  Downloading any project's PO files with wget works
fine here -- no complaints about certificates.

Why does your wget complain when curl and Firefox have no problem?

> Your site(translationproject.org) provides
> 
> Subject: C=US,O=Let's Encrypt,CN=R3
> Issuer: O=Digital Signature Trust Co.,CN=DST Root CA X3
> Serial: 85078157426496920958827089468591623647
> 
> as CA certificate.
> But your EndEntity certificate signed with
> 
> Subject: C=US,O=Let's Encrypt,CN=R3
> Issuer: C=US,O=Internet Security Research Group,CN=ISRG Root X1
> Serial: 192961496339968674994309121183282847578
> 
> You can find this certificate on LetsEncrypt site.

I have no idea what to do about this.  Any guidance?

Benno






bug#43707: [PATCH] stat: use a colon before a list, and don't use backticks as quotes

2020-09-29 Thread Benno Schulenberg
* src/stat.c (usage): Replace a mistaken semicolon with a colon,
  and replace mistaken backticks with single quotes.  Also reorder
  some words, for clarity.
---
 src/stat.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/stat.c b/src/stat.c
index 4e6c2aa86..1c09073a2 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -1717,10 +1717,10 @@ Display file or file system status.\n\
   fputs (VERSION_OPTION_DESCRIPTION, stdout);
 
   fputs (_("\n\
-The --cached MODE argument can be; always, never, or default.\n\
-`always` will use cached attributes if available, while\n\
-`never` will try to synchronize with the latest attributes, and\n\
-`default` will leave it up to the underlying file system.\n\
+The MODE argument of --cached can be: always, never, or default.\n\
+'always' will use cached attributes if available, while\n\
+'never' will try to synchronize with the latest attributes, and\n\
+'default' will leave it up to the underlying file system.\n\
 "), stdout);
 
   fputs (_("\n\
-- 
2.25.4






bug#26621: hint for translators is missing from POT file, but is opaque anyhow

2017-04-24 Thread Benno Schulenberg

On Mon, Apr 24, 2017, at 09:38, Paul Eggert wrote:
> Benno Schulenberg wrote:
> > It would be nicer to use a fixed number of
> > decimals so that the message doesn't unnecessarily "jump".
> 
> Yes, and since the messages you're talking about are supposed to come out 
> once a 
> second, dd should just omit everything after the decimal point.

Well, in the past week I have been writing several ISO images
to a USB stick, and dd's progress messages first come out at
about 1.1 second intervals, then slow down to about every four
or five seconds, and after about a minute start to arrive again
at close to every 1.0 seconds.

(Also, when dd is done copying records, the USB stick isn't
ready yet: it continuous blinking for nearly a minute, but dd
sits there as if nothing is happening.  I don't know if this is
feasible, but it would be nice if dd would continue to count up
the seconds, and slowly reduce the transfer rate.)

> Thanks for your other comments. I installed the attached patch, which I hope 
> addresses them.

Okay.  If I understand the new comment well, I would have written:

/* TRANSLATORS: The translations of the next three msgids should
be of ascending length.  That is: each subsequent msgstr should be
longer than the preceding one. */

Benno

-- 
http://www.fastmail.com - Or how I learned to stop worrying and
  love email again






bug#26621: hint for translators is missing from POT file, but is opaque anyhow

2017-04-23 Thread Benno Schulenberg

Commit 2dab6cd3c2e18eb574b24e54fba86a33c80b6a27 changed
the progress messages for dd, but in doing so separated
the instruction/hint for translators from the call to
ngettext().  For xgettext to pick up such comments, the
comment must end of the line directly before the call.
So the current POT file for coreutils does not contain
this comment/hint/instruction.

Second, the comment seems to consist of two parts that
appear to be unrelated.  So it would be better to split
the text into two separate paragraphs.

Third, the second part of that comment reads like this:

 If one of
 these formats A looks shorter on the screen than another format
 B, then A's string length should be less than B's, and appending
 strlen (B) - strlen (A) spaces to A should make it appear to be
 at least as long as B.

I don't understand what it is trying to say.  Does it say
that if, of those four strings, untranslated string A is
shorter than untranslated string B, that then also the
translation of string A must be shorter than the translation
of string B?  If yes, then: 1) please reword, 2) why?, and
3) does the program blow up if not?  Or is this part of the
comment not meant for translators at all?

Fourth, the first part of the comment begins with this:

 The instances of "s" in the following formats are
 the SI symbol "s" (meaning second), and should not be translated.

Why should they not be translated?  In order to avoid problems
with grammatical congruence in languages like Polish?  But for
a language like Dutch I would accept the mild incongruence
when the elapsed time is exactly x.1 seconds, which will be
a rare occasion.  For all other numbers it will be much clearer
to say "seconden" instead of just "s".  So I would suggest to
change this part of the comment to:

 The instances of "s" in the next four strings are the SI
 symbol "s" (meaning seconds).  It may be preferrable
 to leave them untranslated, to avoid problems with
 grammatical congruence.

Fifth (and this is the reason I arrived here), when using
status=progress, the elapsed time that is printed is shown
with four or five decimals.  1) Is the time measurement
really this accurate?  2) Sometimes the last one or two
or three decimals happen to be zero, and then they get
truncated, making the progress message a bit shorter for
one second.  It would be nicer to use a fixed number of
decimals so that the message doesn't unnecessarily "jump".

Sixth, the format string uses %g, which means that the
number of seconds will be displayed in exponential form
when the number becomes very large.  Is that intentional?
Wouldn't it be better to use %f?  I've played a bit with it,
and I think %.1f is best, because also the other numbers
in the progress message, when they are in decimal form,
use a single decimal of precision.

Benno

-- 
http://www.fastmail.com - Email service worth paying for. Try it for free






bug#21571: [patches] some small message improvements

2015-09-28 Thread Benno Schulenberg

On Sun, Sep 27, 2015, at 20:14, Andreas Schwab wrote:
> Benno Schulenberg <bensb...@justemail.net> writes:
> > Or does it just mean that when ONLRET is set that the receiving
> > end will do also a CR when a LF is received?  The tty doesn't do
> > any conversion, it just has to be aware that sending a LF causes
> > also a CR in order to be able to line things up properly?
> 
> Yes.

Hm.  But the termios layer cannot know whether the sender is
aware that NL also causes a carriage return, so it cannot take
any compensatory action on the data coming through.  So, ONLRET
by itself does not do anything at all.  Only when combined with
ONOCR does it have an effect: not only after a CR but also after
an NL any subsequent CRs are discarded, until some printable
character moves the cursor out of column zero again.  Right?

Maybe then the documentation should mention that ONLRET
is only useful in combination with ONOCR?  Because otherwise
the introduction of the "Output settings" section is somewhat
misleading: "These settings control operations on data sent to
the terminal."  As ONLRET does not cause anything to be done
with the data unless ONOCR is set.


Glibc only documents ONLCR, not OCRNL nor ONLRET nor ONOCR.
Is that just a lack of documentation?  Or does it mean that
the latter three flags are in effect nonfunctional?

Benno

-- 
http://www.fastmail.com - Access your email from home and the web






bug#21571: [patches] some small message improvements

2015-09-27 Thread Benno Schulenberg

On Sun, Sep 27, 2015, at 13:26, Andreas Schwab wrote:
> 
> 
>  [...]  If ONLRET is set, the NL character is assumed to do the
> carriage-return function; [...] Otherwise, the NL character is
> assumed to do just the line-feed function; [...]

This wording seems to faintly suggest that ONLRET is meant to
cause NL to do /also/ CR besides doing NL.  Is that whjat is
meant?

Or does it just mean that when ONLRET is set that the receiving
end will do also a CR when a LF is received?  The tty doesn't do
any conversion, it just has to be aware that sending a LF causes
also a CR in order to be able to line things up properly?

Benno

-- 
http://www.fastmail.com - Faster than the air-speed velocity of an
  unladen european swallow






bug#21571: [patches] some small message improvements

2015-09-27 Thread Benno Schulenberg

Hi,

Attached three patches (sorry, I can't do 'git send-email' from here)
make some small changes to error messages and option descriptions.

The first patch puts the words "carriage return" and "newline" a bit
wider apart, instead of gluing them together with a hyphen -- this
had confused me up to now.  And it makes the wording for the onlret
option the same as for the ocrnl and onlcr options.  If the latter
change is not correct, please suggest another wording that makes
clear how this option differs from ocrnl and onlcr.

Benno

-- 
http://www.fastmail.com - Email service worth paying for. Try it for free

From c8fa3c8dbfa58512ab7efe0aa162cb8da7ffdc09 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensb...@justemail.net>
Date: Sun, 27 Sep 2015 08:54:02 +0200
Subject: [PATCH 1/3] stty: improve the wording of the CR-LF translation options

* src/stty.c: Make the description of the onlcr option slightly clearer,
and harmonize the description of onlret with those of ocrnl and onlcr.
* doc/coreutils.texi: Likewise.
---
 doc/coreutils.texi |4 ++--
 src/stty.c |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index a029ec6..ff65b2e 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -13908,7 +13908,7 @@ Translate carriage return to newline.  Non-POSIX@.  May be negated.
 @item onlcr
 @opindex onlcr
 @cindex newline, translating to crlf
-Translate newline to carriage return-newline.  Non-POSIX@.  May be
+Translate newline to carriage return + newline.  Non-POSIX@.  May be
 negated.
 
 @item onocr
@@ -13918,7 +13918,7 @@ May be negated.
 
 @item onlret
 @opindex onlret
-Newline performs a carriage return.  Non-POSIX@.  May be negated.
+Translate newline to carriage return.  Non-POSIX@.  May be negated.
 
 @item ofill
 @opindex ofill
diff --git a/src/stty.c b/src/stty.c
index c0057f2..0833475 100644
--- a/src/stty.c
+++ b/src/stty.c
@@ -755,12 +755,12 @@ Output settings:\n\
 #endif
 #ifdef ONLCR
   fputs (_("\
- * [-]onlcr  translate newline to carriage return-newline\n\
+ * [-]onlcr  translate newline to carriage return + newline\n\
 "), stdout);
 #endif
 #ifdef ONLRET
   fputs (_("\
- * [-]onlret newline performs a carriage return\n\
+ * [-]onlret translate newline to carriage return\n\
 "), stdout);
 #endif
 #ifdef ONOCR
-- 
1.7.0.4

From 44d122b9213a7c08959f5d6c162bf1687f9e7478 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensb...@justemail.net>
Date: Sun, 27 Sep 2015 09:01:42 +0200
Subject: [PATCH 2/3] stty: remove an inconsistent newline from an error message

* src/stty.c: Remove an inappropriate \n from within an error message.
---
 src/stty.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/stty.c b/src/stty.c
index 0833475..d8cd739 100644
--- a/src/stty.c
+++ b/src/stty.c
@@ -1151,7 +1151,7 @@ main (int argc, char **argv)
   /* Specifying both -a and -g gets an error.  */
   if (verbose_output && recoverable_output)
 error (EXIT_FAILURE, 0,
-   _("the options for verbose and stty-readable output styles are\n"
+   _("the options for verbose and stty-readable output styles are "
  "mutually exclusive"));
 
   /* Specifying any other arguments with -a or -g gets an error.  */
-- 
1.7.0.4

From 5fcad7706af3a84a66b2b3a7aa37fa6bb6c5525a Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensb...@justemail.net>
Date: Sun, 27 Sep 2015 09:19:52 +0200
Subject: [PATCH 3/3] sync: slightly improve the usage text

* src/sync.c: Indicate that more than one option is possible, and
add a period at the end of the docstring.
---
 src/sync.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/sync.c b/src/sync.c
index 5e1dbb8..910baad 100644
--- a/src/sync.c
+++ b/src/sync.c
@@ -61,9 +61,9 @@ usage (int status)
 emit_try_help ();
   else
 {
-  printf (_("Usage: %s [OPTION] [FILE]...\n"), program_name);
+  printf (_("Usage: %s [OPTION]... [FILE]...\n"), program_name);
   fputs (_("\
-Synchronize cached writes to persistent storage\n\
+Synchronize cached writes to persistent storage.\n\
 \n\
 If one or more files are specified, sync only them,\n\
 or their containing file systems.\n\
-- 
1.7.0.4



bug#20406: tr French translation

2015-04-23 Thread Benno Schulenberg

On 2015-04-22 22:19, Eric Blake wrote:
 On 04/22/2015 11:05 AM, Dimitri Papadopoulos Orfanos wrote:
 Thank you for forwarding my mail to the proper channel. I haven't been
 able to find information on how to report translation bugs on the web
 site:
   http://translationproject.org/domain/coreutils.html

 The coreutils maintainers have no control over the content of the
 translation project web pages, but I'm passing your idea along.

A remark has been added to every package page and every language page,
and to the welcome page too.  If you have further suggestions for
improvement, don't hesitate.

Regards,

Benno






bug#19503: most translations of proper names aren't being used

2015-01-04 Thread Benno Schulenberg

Hi,

Just now I noticed that 'du --version | tail -2' produces here this:

Verkita de Torbjern GRANLUND (Torbjörn Granlund), David MacKenzie, Paul Eggert
kaj Jim Meyering.

whereas I expected it to produce this:

Verkita de Torbjern GRANLUND (Torbjörn Granlund), David MEKENZI (David 
MacKenzie), Paŭl EGERT (Paul Eggert)
kaj Ĝim MEJERING (Jim Meyering).

Quite a few languages transcribe proper names to their own
writing system and phonology.  But coreutils, when a proper
name does not contain any UTF-8 characters, defines away the
propername() function, thus ignoring any transcription that
translators made for this name.  I think this is wrong and
that propername() should always be used, or at least that
disabling it should be optional.

If however propername() is never going to be used, then please
don't waste translator time by marking proper names as
translatable/transcribable.

The propername() function is defined to a noop in the system.h
file with the argument that it saves 17K on each executable.
But... shouldn't propername() be a library function that isn't
actually included into each and every util?

Benno

-- 
http://www.fastmail.com - Same, same, but different...






bug#17277: improve translator comment

2014-04-16 Thread Benno Schulenberg

Hi,

The translator comment regarding the prompt in remove.c is
unclear, and the suggested alternative way of translation is
hardly any better than the original string.  Looking back in
history, the very first version of this comment was better:
it suggested an alternative that would seem to avoid any
grammatical discrepancies in most languages.  So, attached
patch reinstates that primal alternative, and tries to improve
the surrounding wording to explain the difficulty better.

Benno

-- 
http://www.fastmail.fm - Accessible with your email software
  or over the web

From 9443f57b045ee203f9cb772b3a4893b7eaa20419 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Wed, 16 Apr 2014 21:26:54 +0200
Subject: [PATCH] remove: improve translator comment by reinstating older version

* src/remove.c (prompt): Explain where the difficulty with translating
these two strings resides, and suggest an alternative: the one that
Paul Eggert first proposed back in 2002, which seems fully resistant.
---
 src/remove.c |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/remove.c b/src/remove.c
index b98f3ec..4cc4a08 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -283,10 +283,11 @@ prompt (FTS const *fts, FTSENT const *ent, bool is_dir,
 
   fprintf (stderr,
(write_protected
-/* TRANSLATORS: You may find it more convenient to
-   translate %s: remove %s (write-protected) %s? 
-   instead.  It should avoid grammatical problems
-   with the output of file_type.  */
+/* TRANSLATORS: In the next two strings the second %s is
+   replaced by the type of the file.  To avoid grammatical
+   problems, it may be more convenient to translate these
+   strings instead as: %1$s: %3$s is write-protected and
+   is of type '%2$s' -- remove it? .  */
 ? _(%s: remove write-protected %s %s? )
 : _(%s: remove %s %s? )),
program_name, file_type (sbuf), quoted_name);
-- 
1.7.0.4



bug#14976: [patch] use semicolons in option descriptions, not periods

2013-08-04 Thread Benno Schulenberg

Hello Pádraig,

On Sat, Aug 3, 2013, at 18:08, Pádraig Brady wrote:
  -  -d, --directorylist directory entries instead of contents,
  -   and do not dereference symbolic links
  +  -d, --directorylist just names of directories, not their 
 contents
 
 So I was wondering why that clarification was added.
 I guess that it's obvious from the output for -l and -F
 that the symlink is being operated on: [...]
 whereas with -d it's not: [...]

Okay, I see.  Although I still think it's an unneeded detail in a
help text, the addition of by default makes it better.

 Also I don't like the just names in the new description as
 it might imply that it overrides -l or something.

Well, the phrase was taken from the info documentation, where it says:
List just the names of directories, [...] rather than listing their 
contents.  :)  But I see your point.

The thing is, I have to read the phrase three times before I realize
that directory entries does not mean entries OF directories but
entries that ARE directories.  The problematic word is entries,
which makes me think of items in a container, whereas in fact it
refers to items on the command line, which requires some stretch
of the imagination.

So I propose the following change:

-  -d, --directorylist directory entries instead of contents,
+  -d, --directorylist directories themselves, not their contents,


(Oh, by the way, when you modify a patch, please make a note of this
in the log message -- I don't like to see changes that I would never
have made booked without further ado under my name.)

For the tail --follow thingy I have the following suggestion:

- -f and --follow[=descriptor] are equivalent\n\
+ an absent option argument means 'descriptor'\n\

Regards,

Benno

-- 
http://www.fastmail.fm - Or how I learned to stop worrying and
  love email again






bug#14976: [patch] use semicolons in option descriptions, not periods

2013-08-04 Thread Benno Schulenberg

On Sun, Aug 4, 2013, at 13:28, Pádraig Brady wrote:
 The latest patch is attached,
 with all the above discussed changes.
 I'll wait for confirmation before pushing.

Ack.  The patch is fine, with the spello corrected.

Bernhard, in my opinion can be is better than the too «pressing»
is one of or must be or must be one of -- it is more «friendly».
The syntax shows that the argument is not optional.

Regards,

Benno

-- 
http://www.fastmail.fm - Accessible with your email software
  or over the web






bug#14976: [patch] use semicolons in option descriptions, not periods

2013-08-04 Thread Benno Schulenberg

On Sun, Aug 4, 2013, at 22:28, Pádraig Brady wrote:
 Also I was thinking of doing:
 
 -  -d, --directorylist directories themselves, not their 
 contents\n\
 +  -d, --directoryfor directories, list themselves, not their 
 contents\n\

Hmmm...  I don't like that.  The themselves in my mind already expresses
that this phrase is relevant only for directories.  Also, saying list 
themselves 
is very strange usage, in my opinion.

 Also with your changes, we've gone over 80 chars per line in various places.

I don't think so --  I took care never to exceed 80 printing chars per line.
Only when also counting the non-printing \n\ are some lines too long.
So... I would prefer not to do this realignment.

Regards,

Benno

-- 
http://www.fastmail.fm - Send your email first class






bug#14976: [patch] use semicolons in option descriptions, not periods

2013-08-03 Thread Benno Schulenberg

Hello Pádraig,

On Fri, Aug 2, 2013, at 10:11, Pádraig Brady wrote:
 On 08/01/2013 08:56 PM, Benno Schulenberg wrote:
  A semicolon is a sentence separator too; it just avoids the need for
  a capital starter letter and a finishing period.
 
 Well generally there should be some tenuous relationship
 between the ; delimited sentences

True.  But as the phrases all describe aspects of the same option,
there is in my opinion always some relationship between them,
which could be expressed with where or however or something.

Attached patch does some more semicolon substitutions, of periods
I overlooked the first time.  It also does more indentation adjustments,
and adds some parentheses around equivalent short options for clarity.

It also removes the phrase and do not dereference symbolic links from
the 'ls -d' option, because 1) to be correct it would have to add unless
-H or -L etcera, but such precision is something for the manual; 2) the
phrase is not given for -F nor -l either, for which it is also valid.

Regards,

Benno

-- 
http://www.fastmail.fm - The way an email service should be

From 2ebb239420ac78736415e8b2414ed57136b0ca7e Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Sat, 3 Aug 2013 10:38:12 +0200
Subject: [PATCH] doc: more semicolons instead of periods in option descriptions

Also slightly rephrase some descriptions for extra clarity, and
add more consistent indentation.

* src/df.c (usage): Semicolon, no final period.
* src/du.c (usage): Likewise, plus indentation and clarifying words.
* src/ls.c (usage): Semicolon, rephrasings, added parentheses for
clarity, indentation.
* src/rm.c (usage): Semicolons.
---
 src/df.c |6 +++---
 src/du.c |   12 ++--
 src/ls.c |   38 ++
 src/rm.c |4 ++--
 4 files changed, 29 insertions(+), 31 deletions(-)

diff --git a/src/df.c b/src/df.c
index e018064..c2c390e 100644
--- a/src/df.c
+++ b/src/df.c
@@ -1233,9 +1233,9 @@ or all file systems by default.\n\
 
   fputs (_(\
   -a, --all include dummy file systems\n\
-  -B, --block-size=SIZE  scale sizes by SIZE before printing them.  E.g.,\n\
-   '-BM' prints sizes in units of 1,048,576 bytes.\n\
-   See SIZE format below.\n\
+  -B, --block-size=SIZE  scale sizes by SIZE before printing them; e.g.,\n\
+   '-BM' prints sizes in units of 1,048,576 bytes;\n\
+   see SIZE format below\n\
   --total   produce a grand total\n\
   -h, --human-readable  print sizes in human readable format (e.g., 1K 234M 2G)\
 \n\
diff --git a/src/du.c b/src/du.c
index b8aba0b..a265b10 100644
--- a/src/du.c
+++ b/src/du.c
@@ -298,9 +298,9 @@ Summarize disk usage of each FILE, recursively for directories.\n\
   fragmentation, indirect blocks, and the like\n\
 ), stdout);
   fputs (_(\
-  -B, --block-size=SIZE  scale sizes by SIZE before printing them.  E.g.,\n\
-   '-BM' prints sizes in units of 1,048,576 bytes.\n\
-   See SIZE format below.\n\
+  -B, --block-size=SIZE  scale sizes by SIZE before printing them; e.g.,\n\
+   '-BM' prints sizes in units of 1,048,576 bytes;\n\
+   see SIZE format below\n\
   -b, --bytes   equivalent to '--apparent-size --block-size=1'\n\
   -c, --total   produce a grand total\n\
   -D, --dereference-args  dereference only symlinks that are listed on the\n\
@@ -338,9 +338,9 @@ Summarize disk usage of each FILE, recursively for directories.\n\
   directory, or any of its subdirectories\n\
   --time=WORD   show time as WORD instead of modification time:\n\
   atime, access, use, ctime or status\n\
-  --time-style=STYLE  show times using style STYLE:\n\
-  full-iso, long-iso, iso, +FORMAT\n\
-  FORMAT is interpreted like 'date'\n\
+  --time-style=STYLE  show times using STYLE, which can be:\n\
+full-iso, long-iso, iso, or +FORMAT;\n\
+FORMAT is interpreted like in 'date'\n\
 ), stdout);
   fputs (_(\
   -X, --exclude-from=FILE  exclude files that match any pattern in FILE\n\
diff --git a/src/ls.c b/src/ls.c
index f3c3a1b..8bb3df9 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -4769,10 +4769,9 @@ Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.\n\
 ), stdout);
   fputs (_(\
   -C list entries by columns\n\
-  --color[=WHEN] colorize the output.  WHEN defaults to 'always'\n\
-   or can be 'never' or 'auto'; more info below\n\
-  -d, --directorylist directory entries instead of contents,\n\
-   and do not dereference symbolic links\n\
+  --color[=WHEN] colorize

bug#14976: [patch] use semicolons in option descriptions, not periods

2013-08-01 Thread Benno Schulenberg

Hello Pádraig,

On Mon, Jul 29, 2013, at 19:02, Pádraig Brady wrote:
 On 07/28/2013 08:27 PM, Benno Schulenberg wrote:
  Attached patch replaces in several usage texts some periods with
  semicolons, removes from them several inconsistent final periods,
  properly double-indents continuation lines, and rephrases two or
  three sentences a little for increased clarity.


  -  -m fill width with a comma separated list of 
  entries\
  +  -m fill width with a comma-separated list of 
  entries\
 
 -1 This doesn't seem warranted.
 Also all other mentions in usage() it various utilities use the non 
 hyphenated version

Okay, I'll propose a patch to change all of those later.


  -  --suffix=SUFF   append SUFF to TEMPLATE.  SUFF must not contain 
  slash.\n\
  -This option is implied if TEMPLATE does not end in 
  X.\n\
  +  --suffix=SUFF   append SUFF to TEMPLATE; SUFF must not contain a 
  slash;\n\
  +this option is implied if TEMPLATE does not end in 
  X\n\
 
 -1 First ; OK, second doesn't seem right.

Well, the thing is: option descriptions never end with a period, which means
they are not proper sentences, so should not start with a capital letter either.
When part of the description _does start with a capital, then it attempts to
be a sentence and must thus end in a period -- which is not done, so...

  -  --tmpdir[=DIR]  interpret TEMPLATE relative to DIR.  If DIR is not\n\
  -specified, use $TMPDIR if set, else /tmp.  With\n\
  -this option, TEMPLATE must not be an absolute 
  name.\n\
  -Unlike with -t, TEMPLATE may contain slashes, 
  but\n\
  +  --tmpdir[=DIR]  interpret TEMPLATE relative to DIR; if DIR is not\n\
  +specified, use $TMPDIR if set, else /tmp; with\n\
  +this option, TEMPLATE must not be an absolute 
  name;\n\
  +unlike with -t, TEMPLATE may contain slashes, 
  but\n\
   mktemp creates only the final component\n\
 
 -1 The second ; doesn't seem right. Best to have 2 sentences here?

A semicolon is a sentence separator too; it just avoids the need for
a capital starter letter and a finishing period.


  -   -f, --follow, and --follow=descriptor are\n\
  -   equivalent\n\
  + --follow equals --follow=descriptor\n\
 
 +1

Ah, you plussed-one this change, but the actual line you put in is:

-f and --follow[=descriptor] are equivalent\n\

Which to me is kind of puzzling, because it is already known that
-f and --follow are equivalent.  What the added sentence tries to
say is that 'descriptor' is the default option argument when none
is provided.  I think my version says that more clearly, but maybe
a still better phrasing can be found.

Regards,

Benno

-- 
http://www.fastmail.fm - mmm... Fastmail...






bug#14976: [patch] use semicolons in option descriptions, not periods

2013-07-28 Thread Benno Schulenberg

Hi,

Attached patch replaces in several usage texts some periods with
semicolons, removes from them several inconsistent final periods,
properly double-indents continuation lines, and rephrases two or
three sentences a little for increased clarity.

Regards,

Benno

-- 
http://www.fastmail.fm - Accessible with your email software
  or over the web

From 2bac2f05a68bc3534b54b480469f58bfd2489c8f Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Sun, 28 Jul 2013 13:54:20 +0200
Subject: [PATCH] textual: use semicolon instead of period in option descriptions

Also do not end option descriptions with a period, properly indent
continuation lines, and make some tiny clarifications.

* src/du.c (usage): Lowercase after semicolon.
* src/ls.c (usage): Semicolons instead of periods, small rephrasing
and two hyphens for clarity, proper indentation.
* src/mktemp.c (usage): Semicolons and lowercase.
* src/od.c (usage): Semicolons.
* src/ptx.c (usage): Use the standard phrase, clarify default option.
* src/setuidgid.c (usage): Properly indent continuation line.
* src/split.c (usage): Semicolons, lowercase, no final period.
* src/stat.c (usage): Semicolons, lowercase.
* src/tail.c (usage): Proper indentation, one shorter rephrasing,
semicolons, no final periods.
* src/timeout.c (usage): Properly indent, semicolons, no final periods.
---
 src/du.c|4 ++--
 src/ls.c|   28 ++--
 src/mktemp.c|   12 ++--
 src/od.c|6 +++---
 src/ptx.c   |2 +-
 src/setuidgid.c |2 +-
 src/split.c |8 
 src/stat.c  |4 ++--
 src/tail.c  |   21 ++---
 src/timeout.c   |   16 
 10 files changed, 51 insertions(+), 52 deletions(-)

diff --git a/src/du.c b/src/du.c
index 9f1f98c..849ddab 100644
--- a/src/du.c
+++ b/src/du.c
@@ -312,8 +312,8 @@ Summarize disk usage of each FILE, recursively for directories.\n\
 ), stdout);
   fputs (_(\
   --files0-from=F   summarize disk usage of the NUL-terminated file\n\
-  names specified in file F;\n\
-  If F is - then read names from standard input\n\
+  names specified in file F; if F is -, then read\n\
+  names from standard input\n\
   -Hequivalent to --dereference-args (-D)\n\
   -h, --human-readable  print sizes in human readable format (e.g., 1K 234M 2G)\
 \n\
diff --git a/src/ls.c b/src/ls.c
index e341c67..2936498 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -4758,19 +4758,19 @@ Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.\n\
   -b, --escape   print C-style escapes for nongraphic characters\n\
 ), stdout);
   fputs (_(\
-  --block-size=SIZE  scale sizes by SIZE before printing them.  E.g.,\n\
+  --block-size=SIZE  scale sizes by SIZE before printing them; e.g.,\n\
'--block-size=M' prints sizes in units of\n\
-   1,048,576 bytes.  See SIZE format below.\n\
+   1,048,576 bytes; see SIZE format below\n\
   -B, --ignore-backups   do not list implied entries ending with ~\n\
   -c with -lt: sort by, and show, ctime (time of last\n\
-   modification of file status information)\n\
-   with -l: show ctime and sort by name\n\
+   modification of file status information);\n\
+   with -l: show ctime and sort by name;\n\
otherwise: sort by ctime, newest first\n\
 ), stdout);
   fputs (_(\
   -C list entries by columns\n\
   --color[=WHEN] colorize the output.  WHEN defaults to 'always'\n\
-   or can be 'never' or 'auto'.  More info below\n\
+   or can be 'never' or 'auto'; more info below\n\
   -d, --directorylist directory entries instead of contents,\n\
and do not dereference symbolic links\n\
   -D, --diredgenerate output designed for Emacs' dired mode\n\
@@ -4788,8 +4788,8 @@ Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.\n\
 ), stdout);
   fputs (_(\
   --group-directories-first\n\
- group directories before files.\n\
-   augment with a --sort option, but any\n\
+ group directories before files;\n\
+   can be augmented with a --sort option, but any\n\
use of --sort=none (-U) disables grouping\n\
 ), stdout);
   fputs (_(\
@@ -4803,7 +4803,7 @@ Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.\n\
  follow symbolic

bug#13680: [patch] numfmt: do not gettextize developer debugging messages

2013-02-10 Thread Benno Schulenberg

Hi,

The new command numfmt includes a bunch of debugging messages that
are only meant for the developers.  They shouldn't be gettextized.
Offering things up for translation which are only for developers
is a waste of translators' time.  Attached patch fixes this.

Regards,

Benno

-- 
http://www.fastmail.fm - The way an email service should be

From 9de8dd37bcc0af2bd702113a04349eebb09ef0c7 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Sun, 10 Feb 2013 19:02:04 +0100
Subject: [PATCH 1/3] doc: do not gettextize debugging messages meant for developers

* src/numfmt.c: Remove the call to gettext() around developer messages.
---
 src/numfmt.c |   46 +++---
 1 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/src/numfmt.c b/src/numfmt.c
index e42cbf8..117f19b 100644
--- a/src/numfmt.c
+++ b/src/numfmt.c
@@ -584,8 +584,8 @@ simple_strtod_human (const char *input_str,
   int scale_base = default_scale_base (allowed_scaling);
 
   if (dev_debug)
-error (0, 0, _(simple_strtod_human:\n  input string: '%s'\n  
-   locale decimal-point: '%s'\n), input_str, decimal_point);
+error (0, 0, simple_strtod_human:\n  input string: '%s'\n  
+ locale decimal-point: '%s'\n, input_str, decimal_point);
 
   enum simple_strtod_error e =
 simple_strtod_float (input_str, endptr, value, precision);
@@ -593,8 +593,8 @@ simple_strtod_human (const char *input_str,
 return e;
 
   if (dev_debug)
-error (0, 0, _(  parsed numeric value: %Lf\n
- input precision = %d\n), *value, (int)*precision);
+error (0, 0,   parsed numeric value: %Lf\n
+   input precision = %d\n, *value, (int)*precision);
 
   if (**endptr != '\0')
 {
@@ -620,7 +620,7 @@ simple_strtod_human (const char *input_str,
   scale_base = 1024;
   (*endptr)++;  /* skip second  ('i') suffix character.  */
   if (dev_debug)
-error (0, 0, _(  Auto-scaling, found 'i', switching to base %d\n),
+error (0, 0,   Auto-scaling, found 'i', switching to base %d\n,
 scale_base);
 }
 
@@ -638,14 +638,14 @@ simple_strtod_human (const char *input_str,
   long double multiplier = powerld (scale_base, power);
 
   if (dev_debug)
-error (0, 0, _(  suffix power=%d^%d = %Lf\n),
+error (0, 0,   suffix power=%d^%d = %Lf\n,
scale_base, power, multiplier);
 
   /* TODO: detect loss of precision and overflows.  */
   (*value) = (*value) * multiplier;
 
   if (dev_debug)
-error (0, 0, _(  returning value: %Lf (%LG)\n), *value, *value);
+error (0, 0,   returning value: %Lf (%LG)\n, *value, *value);
 
   return e;
 }
@@ -696,7 +696,7 @@ double_to_human (long double val, int precision,
  enum scale_type scale, int group, enum round_type round)
 {
   if (dev_debug)
-error (0, 0, _(double_to_human:\n));
+error (0, 0, double_to_human:\n);
 
   if (scale == scale_none)
 {
@@ -707,7 +707,7 @@ double_to_human (long double val, int precision,
   if (dev_debug)
 error (0, 0,
(group) ?
-   _(  no scaling, returning (grouped) value: %'.*Lf\n) :
+ no scaling, returning (grouped) value: %'.*Lf\n :
_(  no scaling, returning value: %.*Lf\n), precision, val);
 
   int i = snprintf (buf, buf_size, (group) ? %'.*Lf : %.*Lf,
@@ -725,7 +725,7 @@ double_to_human (long double val, int precision,
   unsigned int power = 0;
   val = expld (val, scale_base, power);
   if (dev_debug)
-error (0, 0, _(  scaled value to %Lf * %0.f ^ %d\n),
+error (0, 0,   scaled value to %Lf * %0.f ^ %d\n,
val, scale_base, power);
 
   /* Perform rounding. */
@@ -755,7 +755,7 @@ double_to_human (long double val, int precision,
   /*  (absld (val)  simple_round_floor (val))) */
 
   if (dev_debug)
-error (0, 0, _(  after rounding, value=%Lf * %0.f ^ %d\n),
+error (0, 0,   after rounding, value=%Lf * %0.f ^ %d\n,
val, scale_base, power);
 
   snprintf (buf, buf_size, (show_decimal_point) ? %.1Lf%s : %.0Lf%s,
@@ -765,7 +765,7 @@ double_to_human (long double val, int precision,
 strncat (buf, i, buf_size - strlen (buf) - 1);
 
   if (dev_debug)
-error (0, 0, _(  returning value: '%s'\n), buf);
+error (0, 0,   returning value: '%s'\n, buf);
 
   return;
 }
@@ -1013,9 +1013,9 @@ parse_format_string (char const *fmt)
 }
 
   if (dev_debug)
-error (0, 0, _(format String:\n  input: %s\n  grouping: %s\n
- padding width: %ld\n  alignment: %s\n
- prefix: '%s'\n  suffix: '%s'\n),
+error (0, 0, format String:\n  input: %s\n  grouping: %s\n
+   padding width: %ld\n  alignment: %s\n
+   prefix: '%s'\n  suffix: '%s'\n,
quote (fmt), (grouping) ? yes : no,
padding_width,
(padding_alignment == MBS_ALIGN_LEFT

bug#13681: [patches] numfmt: standardize synopsis and docstring, and slice up helptext

2013-02-10 Thread Benno Schulenberg

Hi,

The synopsis of numfmt currently says:

  Usage: %s [OPTIONS] [NUMBER]

But multiple numbers are allowed, and a single option too,
so it should read:

  Usage: %s [OPTION]... [NUMBER]...

Further, the command description says:

  Reformat NUMBER(s) from stdin or command arguments.

This is double, because the NUMBER(s) already are the command
arguments.  Furthermore, it is usual to refer to standard input,
in full, not with the abbreviation.

Also, several of the option descriptions start with an uppercase
letter, some not.  It is customary to start with a lowercase one,
and also to not use a period at the end, and a semicolon if there
is needed for multiple phrases.

Since now all of the descriptions change, the attached patch
takes the opportunity to slice the big help text (which is a
nuisance for translators) into strings that encompass a single
option.  (This follows the preference of the vast majority of
translators.  Sami Kerola, who does a lot of work on util-linux,
conducted a small but telling survey:
http://www.spinics.net/lists/util-linux-ng/msg07489.html)

Regards,

Benno

-- 
http://www.fastmail.fm - Does exactly what it says on the tin

From 590c544d02ceecb30f5ac72e77e603a415ad8b6e Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Sun, 10 Feb 2013 19:16:02 +0100
Subject: [PATCH 2/3] doc: standardize the synopsis and docstring of command 'numfmt'

* src/numfmt.c: Correct synopsis and make command description clearer.
---
 src/numfmt.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/numfmt.c b/src/numfmt.c
index 117f19b..f8593c8 100644
--- a/src/numfmt.c
+++ b/src/numfmt.c
@@ -810,10 +810,10 @@ usage (int status)
   else
 {
   printf (_(\
-Usage: %s [OPTIONS] [NUMBER]\n\
+Usage: %s [OPTION]... [NUMBER]...\n\
 ), program_name);
   fputs (_(\
-Reformat NUMBER(s) from stdin or command arguments.\n\
+Reformat NUMBER(s), or the numbers from standard input if none are specified.\n\
 ), stdout);
   emit_mandatory_arg_note ();
   fputs (_(\
-- 
1.7.0.4

From edb80a6e50138d0c9a6ebc38ff85dce0af25662c Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Sun, 10 Feb 2013 19:42:02 +0100
Subject: [PATCH 3/3] doc: standardize helptext of numfmt and slice into single options

* src/numfmt.c: Start option descriptions with lowercase letter; use
semicolon instead of period where needed; indent continuation lines;
gettextize single options for ease of translation and maintenance.
---
 src/numfmt.c |  131 +-
 1 files changed, 75 insertions(+), 56 deletions(-)

diff --git a/src/numfmt.c b/src/numfmt.c
index f8593c8..f99ebb8 100644
--- a/src/numfmt.c
+++ b/src/numfmt.c
@@ -817,86 +817,106 @@ Reformat NUMBER(s), or the numbers from standard input if none are specified.\n\
 ), stdout);
   emit_mandatory_arg_note ();
   fputs (_(\
-  --from=UNIT auto-scale input numbers to UNITs. Default is 'none'.\n\
-  See UNIT below.\n\
-  --from-unit=N   specify the input unit size (instead of the default 1).\n\
-  --to=UNIT   auto-scale output numbers to UNITs.\n\
-  See UNIT below.\n\
-  --to-unit=N the output unit size (instead of the default 1).\n\
-  --round=METHOD  the rounding method to use when scaling. METHOD can be:\n\
+  --from=UNIT auto-scale input numbers to UNITs; default is 'none';\n\
+see UNIT below\n\
+), stdout);
+  fputs (_(\
+  --from-unit=N   specify the input unit size (instead of the default 1)\n\
+), stdout);
+  fputs (_(\
+  --to=UNIT   auto-scale output numbers to UNITs; see UNIT below\n\
+), stdout);
+  fputs (_(\
+  --to-unit=N the output unit size (instead of the default 1)\n\
+), stdout);
+  fputs (_(\
+  --round=METHOD  the rounding method to use when scaling; METHOD can be:\n\
   up, down, from-zero (default), towards-zero, nearest\n\
+), stdout);
+  fputs (_(\
   --suffix=SUFFIX add SUFFIX to output numbers, and accept optional SUFFIX\n\
-  in input numbers.\n\
-  --padding=N pad the output to N characters.\n\
-  Positive N will right-aligned. Negative N will left-align.\n\
-  Note: if the output is wider than N, padding is ignored.\n\
-  Default is to automatically pad if whitespace is found.\n\
-  --grouping  group digits together (e.g. 1,000,000).\n\
-  Uses the locale-defined grouping (i.e. have no effect\n\
-  in C/POSIX locales).\n\
-  --header[=N]print (without converting) the first N header lines.\n\
-  N defaults to 1 if not specified.\n\
+in input numbers\n\
+), stdout);
+  fputs (_(\
+  --padding=N pad the output to N characters;\n\
+positive N will right-aligned; negative N will left-align;\n\
+note: if the output

bug#13681: [patches] numfmt: standardize synopsis and docstring, and slice up helptext

2013-02-10 Thread Benno Schulenberg

On Sun, Feb 10, 2013, at 21:01, Pádraig Brady wrote:
 I'll apply this for the upcoming release.

Thanks.  Just to be sure: this will require a pre3, if translations
are meant (where possible) to be complete.

Oh, and one small overlooked typo still:
-positive N will right-aligned;
+positive N will right-align;

Benno

-- 
http://www.fastmail.fm - Send your email first class






bug#13409: [patch] make some error messages clearer

2013-02-06 Thread Benno Schulenberg

On Wed, Feb 6, 2013, at 16:54, Pádraig Brady wrote:
 But I'll note that error reading and error writing are quite
 unambiguous and fit well to indicate partial failure of the operation.
 If we used failed to write, then it might imply that nothing was written 
 etc.

To both points: +1.

 So I've adjusted Benno's patch as per the attached,
 which rewraps long lines and s/error closing/failed to close/
 as that is a single operation where failed to fits well.

+1 to that too.

Benno

-- 
http://www.fastmail.fm - One of many happy users:
  http://www.fastmail.fm/help/overview_quotes.html






bug#12913: gettextizing an overlooked string in 'uptime'

2013-01-12 Thread Benno Schulenberg

Ping?

-- 
http://www.fastmail.fm - The professional email service






bug#13409: [patch] make some error messages clearer

2013-01-11 Thread Benno Schulenberg

On Thu, Jan 10, 2013, at 21:06, Paul Eggert wrote:
 -  error (0, errno, _(reading %s), quote (src_name));
 +  error (0, errno, _(error reading %s), quote (src_name));
 
 Surely a translator who read the message in context will see
 that it's an error message, since 'error' is being called.

Translators will generally only look at the source code when the
message is somehow puzzling or unclear.  Here the meaning
seems straightforward, and thus the Catalan, Dutch, Esperanto,
French, German, Italian, Romanian and Spanish translators all
translated the above message as if it described an activity.
(The other languages I cannot judge.)

Benno

-- 
http://www.fastmail.fm - Faster than the air-speed velocity of an
  unladen european swallow






bug#13409: [patch] make some error messages clearer

2013-01-10 Thread Benno Schulenberg

Hi,

Several error messages in some of the utilities say things
like reading %s.  They sound like progress messages, and
translators might be tempted to translate them as if they
said busy reading %s -- whereas I think they are trying
to say error while reading %s.

Attached patch suggests improvements for a bunch of those
messages.

Regards,

Benno

-- 
http://www.fastmail.fm - mmm... Fastmail...

From 1bb86c6f228f16bd4e15a83bac81f5fe521fe55e Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Fri, 4 Jan 2013 22:45:34 +0100
Subject: [PATCH 2/2] textual: improve error messages upon failed read, write, access, close

* src/copy.c: Improve error messages for failing read, write and close.
* src/cp.c: Improve error messages for failing access.
* src/dd.c: Improve error messages for failing read, write and open.
* src/head.c: Improve error message for failing close.
* src/install.c: Improve error messages for failing access.
* src/ln.c: Likewise.
* src/mv.c: Likewise.
* src/touch.c: Improve error message for failing close.
* src/truncate.c: Likewise.
---
 src/copy.c |8 
 src/cp.c   |4 ++--
 src/dd.c   |   12 ++--
 src/head.c |2 +-
 src/install.c  |4 ++--
 src/ln.c   |8 
 src/mv.c   |4 ++--
 src/touch.c|2 +-
 src/truncate.c |2 +-
 9 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/src/copy.c b/src/copy.c
index 0decf9f..664a878 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -165,7 +165,7 @@ sparse_copy (int src_fd, int dest_fd, char *buf, size_t buf_size,
 {
   if (errno == EINTR)
 continue;
-  error (0, errno, _(reading %s), quote (src_name));
+  error (0, errno, _(error reading %s), quote (src_name));
   return false;
 }
   if (n_read == 0)
@@ -203,7 +203,7 @@ sparse_copy (int src_fd, int dest_fd, char *buf, size_t buf_size,
   size_t n = n_read;
   if (full_write (dest_fd, buf, n) != n)
 {
-  error (0, errno, _(writing %s), quote (dst_name));
+  error (0, errno, _(error writing %s), quote (dst_name));
   return false;
 }
 
@@ -1172,13 +1172,13 @@ preserve_metadata:
 close_src_and_dst_desc:
   if (close (dest_desc)  0)
 {
-  error (0, errno, _(closing %s), quote (dst_name));
+  error (0, errno, _(error closing %s), quote (dst_name));
   return_val = false;
 }
 close_src_desc:
   if (close (source_desc)  0)
 {
-  error (0, errno, _(closing %s), quote (src_name));
+  error (0, errno, _(error closing %s), quote (src_name));
   return_val = false;
 }
 
diff --git a/src/cp.c b/src/cp.c
index 231d6a3..a5eb67d 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -568,7 +568,7 @@ target_directory_operand (char const *file, struct stat *st, bool *new_dst)
   if (err)
 {
   if (err != ENOENT)
-error (EXIT_FAILURE, err, _(accessing %s), quote (file));
+error (EXIT_FAILURE, err, _(failed to access %s), quote (file));
   *new_dst = true;
 }
   return is_a_dir;
@@ -1067,7 +1067,7 @@ main (int argc, char **argv)
 {
   struct stat st;
   if (stat (optarg, st) != 0)
-error (EXIT_FAILURE, errno, _(accessing %s), quote (optarg));
+error (EXIT_FAILURE, errno, _(failed to access %s), quote (optarg));
   if (! S_ISDIR (st.st_mode))
 error (EXIT_FAILURE, 0, _(target %s is not a directory),
quote (optarg));
diff --git a/src/dd.c b/src/dd.c
index 4e35df0..9d8f073 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -1614,7 +1614,7 @@ skip (int fdesc, char const *file, uintmax_t records, size_t blocksize,
 {
   if (fdesc == STDIN_FILENO)
 {
-  error (0, errno, _(reading %s), quote (file));
+  error (0, errno, _(error reading %s), quote (file));
   if (conversions_mask  C_NOERROR)
 print_stats ();
 }
@@ -1981,7 +1981,7 @@ dd_copy (void)
 
   if (nread  0)
 {
-  error (0, errno, _(reading %s), quote (input_file));
+  error (0, errno, _(error reading %s), quote (input_file));
   if (conversions_mask  C_NOERROR)
 {
   print_stats ();
@@ -2044,7 +2044,7 @@ dd_copy (void)
   w_bytes += nwritten;
   if (nwritten != n_bytes_read)
 {
-  error (0, errno, _(writing %s), quote (output_file));
+  error (0, errno, _(error writing %s), quote (output_file));
   return EXIT_FAILURE;
 }
   else if (n_bytes_read == input_blocksize)
@@ -2107,7 +2107,7 @@ dd_copy (void)
 w_partial++;
   if (nwritten != oc)
 {
-  error (0, errno, _(writing %s), quote (output_file));
+  error (0, errno, _(error writing %s), quote (output_file

bug#13410: [patch] tiniest of uniformizations for msgids

2013-01-10 Thread Benno Schulenberg

Hi,

Attached patch moves a newline in the help text of 'ln' to the
next text fragment, so the preceding fragment about backup
methods becomes identical to the ones for 'cp', 'mv', and 'install'.
It means one less msgid for translators.

Regards,

Benno

-- 
http://www.fastmail.fm - A no graphics, no pop-ups email service

From 1874463b2f554378cd2b71f21b3b0fc03f7b116a Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Fri, 4 Jan 2013 22:07:49 +0100
Subject: [PATCH 1/2] ln: make a help text fragment identical to three others

* src/ln.c (usage): Move a newline to the next text fragment, so
the preceding fragment about backup methods becomes the same as
the ones for cp, mv, and install.  A bit easier for translators.
---
 src/ln.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/ln.c b/src/ln.c
index e7ab348..8d5e31e 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -430,9 +430,9 @@ the VERSION_CONTROL environment variable.  Here are the values:\n\
   numbered, t make numbered backups\n\
   existing, nil   numbered if numbered backups exist, simple otherwise\n\
   simple, never   always make simple backups\n\
-\n\
 ), stdout);
   printf (_(\
+\n\
 Using -s ignores -L and -P.  Otherwise, the last option specified controls\n\
 behavior when a TARGET is a symbolic link, defaulting to %s.\n\
 ), LINK_FOLLOWS_SYMLINKS ? -L : -P);
-- 
1.7.0.4



bug#12913: [patch] an overlooked string in 'uptime'

2012-11-17 Thread Benno Schulenberg

Hi,

Well, tiny patch says everything.

Benno

-- 
http://www.fastmail.fm - One of many happy users:
  http://www.fastmail.fm/help/overview_quotes.html

From 855f5c860acb350125476765cf064f6ccc4d2aaa Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Sat, 17 Nov 2012 11:49:21 +0100
Subject: [PATCH] uptime: gettextize an overlooked string, and normalize another

* src/uptime.c: Add calls to gettext() and select_plural().
---
 src/uptime.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/uptime.c b/src/uptime.c
index f8c7cfa..1bef1cb 100644
--- a/src/uptime.c
+++ b/src/uptime.c
@@ -146,9 +146,9 @@ print_uptime (size_t n, const STRUCT_UTMP *this)
   select_plural (updays)),
 updays, uphours, upmins);
   else
-printf (up  %2d:%02d,  , uphours, upmins);
+printf (_(up  %2d:%02d,  ), uphours, upmins);
 }
-  printf (ngettext (%lu user, %lu users, entries),
+  printf (ngettext (%lu user, %lu users, select_plural (entries)),
   (unsigned long int) entries);
 
   loads = getloadavg (avg, 3);
-- 
1.7.0.4



bug#12658: [patches] some undocumented options in chcon

2012-11-07 Thread Benno Schulenberg
On Fri, Oct 19, 2012, at 11:17, Jim Meyering wrote:
 Please ping us if they're not applied soon after 8.20.

Ping.

-- 
http://www.fastmail.fm - Or how I learned to stop worrying and
  love email again






bug#12658: [patches] some undocumented options in chcon

2012-10-15 Thread Benno Schulenberg

Hi,

The texi documentation of chcon does not mention the options
--dereference, --preserve-root and --no-preserve-root, while the
usage message just misses the latter two.  The third attached
patch fixes this, plus a missing word in the general description
of the --preserve options.

The second attached patch removes a stray parenthesis in the
documentation of cp.

In the description of --force for cp, saying that -f is redundant
when -n is specified makes it sound as if -n encompasses -f,
whereas in fact -n cancels, nullifies, overrides -f.  So the first
attached patch changes redundant to ignored.

Regards,

Benno

-- 
http://www.fastmail.fm - mmm... Fastmail...

From 9ccf1c6e310d559362a25d88c3246e47f1687a3b Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Mon, 15 Oct 2012 13:06:37 +0200
Subject: [PATCH 1/3] cp: with option -n option -f is not redundant but ignored

* src/cp.c (usage): Replace redundant with ignored.
* doc/coreutils.texi (cp invocation): Likewise.
---
 doc/coreutils.texi |4 ++--
 src/cp.c   |5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 63ad22b..d3e24fe 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -7734,8 +7734,8 @@ description of @option{--remove-destination}.
 This option is independent of the @option{--interactive} or
 @option{-i} option: neither cancels the effect of the other.
 
-This option is redundant if the @option{--no-clobber} or @option{-n} option is
-used.
+This option is ignored when the @option{--no-clobber} or @option{-n} option
+is also used.
 
 @item -H
 @opindex -H
diff --git a/src/cp.c b/src/cp.c
index 61b31af..231d6a3 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -177,9 +177,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
 ), stdout);
   fputs (_(\
   -f, --force  if an existing destination file cannot be\n\
- opened, remove it and try again (redundant if\
-\n\
- the -n option is used)\n\
+ opened, remove it and try again (this option\n\
+ is ignored when the -n option is also used)\n\
   -i, --interactiveprompt before overwrite (overrides a previous -n\
 \n\
   option)\n\
-- 
1.7.0.4

From eb4163d320b0c0c34495d19656856b3da6461e63 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Mon, 15 Oct 2012 13:12:46 +0200
Subject: [PATCH 2/3] doc: remove a stray parenthesis from description of 'cp --force'

* doc/coreutils.texi (cp invocation): Remove Cheshire Cat.
---
 doc/coreutils.texi |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index d3e24fe..cac66a4 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -7724,7 +7724,7 @@ Equivalent to @option{--no-dereference --preserve=links}.
 @opindex -f
 @opindex --force
 When copying without this option and an existing destination file cannot
-be opened for writing, the copy fails.  However, with @option{--force}),
+be opened for writing, the copy fails.  However, with @option{--force},
 when a destination file cannot be opened, @command{cp} then removes it and
 tries to open it again.  Contrast this behavior with that enabled by
 @option{--link} and @option{--symbolic-link}, whereby the destination file
-- 
1.7.0.4

From 6b8f01f8cb4094e1e45db72bfae7cfefad273525 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Mon, 15 Oct 2012 19:37:34 +0200
Subject: [PATCH 3/3] chcon: add descriptions for three undocumented options

* src/chcon.c (usage): Mention the two --preserve-root options.
* doc/coreutils.texi (chcon invocation): Plus the --dereferece option.
---
 doc/coreutils.texi |   20 ++--
 src/chcon.c|6 ++
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index cac66a4..9486eb2 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -1384,7 +1384,7 @@ legitimate uses for such a command,
 that resolves to @file{/}.  If you really want to try to remove all
 the files on your system, you can use the @option{--no-preserve-root}
 option, but the default behavior, specified by the
-@option{--preserve-option}, is safer for most purposes.
+@option{--preserve-root} option, is safer for most purposes.
 
 The commands @command{chgrp}, @command{chmod} and @command{chown}
 can also operate destructively on entire hierarchies, so they too
@@ -15190,12 +15190,16 @@ The program accepts the following options.  Also see @ref{Common options}.
 
 @table @samp
 
+@item --dereference
+@opindex --dereference
+Do not affect symbolic links but what they refer to; this is the default.
+
 @item -h
 @itemx --no-dereference
 @opindex -h
 @opindex --no-dereference
 @cindex no dereference
-Affect

bug#12334: [patches] two tiny textual fixes for 'touch'

2012-09-03 Thread Benno Schulenberg

On Sun, Sep 2, 2012, at 18:10, Jim Meyering wrote:
 Sure, but please s/recognized/accepted/.

Then let it be, as for me accepted means just about
the opposite of ignored.  I chose recognized because
'touch' reacts to an option it does not know at all with:
unrecognized option.

$ touch --the bell
touch: unrecognized option '--the'

Benno

-- 
http://www.fastmail.fm - A no graphics, no pop-ups email service






bug#12334: [patches] two tiny textual fixes for 'touch'

2012-09-02 Thread Benno Schulenberg

Hi,

Attached two patches slightly improve the help text
and documentation of 'touch'.

Regards,

Benno

-- 
http://www.fastmail.fm - A no graphics, no pop-ups email service

From 5df770d0e0b1d64d18a1ca0885f334e98e892f35 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Sat, 18 Aug 2012 12:18:37 +0200
Subject: [PATCH 1/2] touch: line up long option in help text properly

---
 src/touch.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/touch.c b/src/touch.c
index 5976a34..3d93464 100644
--- a/src/touch.c
+++ b/src/touch.c
@@ -238,7 +238,7 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   fputs (_(\
   -r, --reference=FILE   use this file's times instead of current time\n\
   -t STAMP   use [[CC]YY]MMDDhhmm[.ss] instead of current time\n\
-  --time=WORDchange the specified time:\n\
+  --time=WORDchange the specified time:\n\
WORD is access, atime, or use: equivalent to -a\n\
WORD is modify or mtime: equivalent to -m\n\
 ), stdout);
-- 
1.7.0.4

From 5a55f3554f4cc6293b8defc0ab7b87299ff9d54a Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Sat, 18 Aug 2012 12:20:39 +0200
Subject: [PATCH 2/2] docs: slightly clarify why touch recognizes option -f

---
 doc/coreutils.texi |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index f2620bc..d143a32 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -10468,7 +10468,7 @@ silently ignore any excess precision here.
 @item -f
 @opindex -f
 @cindex BSD @command{touch} compatibility
-Ignored; for compatibility with BSD versions of @command{touch}.
+Ignored; recognized for compatibility with BSD versions of @command{touch}.
 
 @item -h
 @itemx --no-dereference
-- 
1.7.0.4



bug#12334: [patches] two tiny textual fixes for 'touch'

2012-09-02 Thread Benno Schulenberg
On Sun, Sep 2, 2012, at 13:54, Jim Meyering wrote:
 Benno Schulenberg wrote:
  -Ignored; for compatibility with BSD versions of @command{touch}.
  +Ignored; recognized for compatibility with BSD versions of @command{touch}.
 
 This seems understandable to me already.

Yes, with a little thought jump it's understandable; the sentence
simply makes more sense with the recognized included.

 And besides, the same construct appears in at least 3 other places: [...]

Then I would suggest to change them all.  Would such patch be accepted?

Benno

-- 
http://www.fastmail.fm - Choose from over 50 domains or use your own






bug#12212: [patch] dd's help text contains superfluous word

2012-08-16 Thread Benno Schulenberg

Hi,

The help text of dd now mentions that the word BLOCKS can
be replaced with something.  But the word BLOCKS does not
occur any longer in the entire help text.  Attached patch
removes the superfluous mention.

The second patch converts the word BYTES to a single letter
(X), as was done for BLOCKS (now N) -- this to avoid the
awkward word combination of BYTES bytes.

Regards,

Benno

-- 
http://www.fastmail.fm - One of many happy users:
  http://www.fastmail.fm/docs/quotes.html

From 31596e328019702857dcb1760c76d7a27b32c75c Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Thu, 16 Aug 2012 18:30:01 +0200
Subject: [PATCH 1/2] dd: the word BLOCKS no longer occurs in the help text

---
 src/dd.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/dd.c b/src/dd.c
index 2ebbfae..de51435 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -540,7 +540,7 @@ Copy a file, converting and formatting according to the operands.\n\
 ), stdout);
   fputs (_(\
 \n\
-N, BLOCKS and BYTES may be followed by the following multiplicative suffixes:\n\
+N and BYTES may be followed by the following multiplicative suffixes:\n\
 c =1, w =2, b =512, kB =1000, K =1024, MB =1000*1000, M =1024*1024, xM =M\n\
 GB =1000*1000*1000, G =1024*1024*1024, and so on for T, P, E, Z, Y.\n\
 \n\
-- 
1.7.0.4

From 5f5db4e0c5060cd554dcecc16a126b274c9d6bd6 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Thu, 16 Aug 2012 18:34:10 +0200
Subject: [PATCH 2/2] dd: change BYTES to a single letter, as was done for BLOCKS

---
 src/dd.c |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/dd.c b/src/dd.c
index de51435..2a3bda0 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -522,16 +522,16 @@ Usage: %s [OPERAND]...\n\
   fputs (_(\
 Copy a file, converting and formatting according to the operands.\n\
 \n\
-  bs=BYTESread and write up to BYTES bytes at a time\n\
-  cbs=BYTES   convert BYTES bytes at a time\n\
+  bs=Xread and write up to X bytes at a time\n\
+  cbs=X   convert X bytes at a time\n\
   conv=CONVS  convert the file as per the comma separated symbol list\n\
   count=N copy only N input blocks\n\
-  ibs=BYTES   read up to BYTES bytes at a time (default: 512)\n\
+  ibs=X   read up to X bytes at a time (default: 512)\n\
 ), stdout);
   fputs (_(\
   if=FILE read from FILE instead of stdin\n\
   iflag=FLAGS read as per the comma separated symbol list\n\
-  obs=BYTES   write BYTES bytes at a time (default: 512)\n\
+  obs=X   write X bytes at a time (default: 512)\n\
   of=FILE write to FILE instead of stdout\n\
   oflag=FLAGS write as per the comma separated symbol list\n\
   seek=N  skip N obs-sized blocks at start of output\n\
@@ -540,7 +540,7 @@ Copy a file, converting and formatting according to the operands.\n\
 ), stdout);
   fputs (_(\
 \n\
-N and BYTES may be followed by the following multiplicative suffixes:\n\
+N and X may be followed by the following multiplicative suffixes:\n\
 c =1, w =2, b =512, kB =1000, K =1024, MB =1000*1000, M =1024*1024, xM =M\n\
 GB =1000*1000*1000, G =1024*1024*1024, and so on for T, P, E, Z, Y.\n\
 \n\
-- 
1.7.0.4



bug#7254: [patch] making md5sum's --quiet and --warn independent, plus some comments

2010-10-20 Thread Benno Schulenberg

Hi,

When the command 'md5sum -c longlist --quiet' would result
in the message WARNING: 1 line is improperly formatted,
then the subsequent command to find out which line is wrong
'md5sum -c longlist --quiet --warn' results in an unexpected
barrage of output.  It would be much nicer if --warn did not
undo the effect of --quiet, so the report of the misformatted
line does not get swamped in a long list of okays.  Attached
first patch makes this change.

(To be fully logical, the above probably has to be extended
to make --status always override --warn and --quiet and not
be overridden by them, otherwise the order '--warn --status
--quiet' would do something else than '--quiet --status 
--warn'.)

The second patch improves the description of '--warn'.  In
my opinion the option is always useful, not only when just a
few lines are misformatted -- and it would be handy if it were
the default.

By the way, why is there a short option for --warn, but not
for --quiet and --status?

Regards,

Benno

-- 
http://www.fastmail.fm - Send your email first class

From 600424f36d056388eab2c5fa9df1eaa79bc686b2 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Tue, 19 Oct 2010 22:21:21 +0200
Subject: [PATCH 1/2] md5sum: make the options --warn and --quiet orthogonal

* src/md5sum.c (main): Allow --warn and --quiet to both be true;
the most useful combination when checking a long list of files.
---
 src/md5sum.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/src/md5sum.c b/src/md5sum.c
index a660e3b..0b8a20e 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -646,11 +646,9 @@ main (int argc, char **argv)
   case 'w':
 status_only = false;
 warn = true;
-quiet = false;
 break;
   case QUIET_OPTION:
 status_only = false;
-warn = false;
 quiet = true;
 break;
   case_GETOPT_HELP_CHAR;
-- 
1.6.3.3

From f330a66ec22b3698ec9c24f76c1e3d58d8b5f9e6 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Tue, 19 Oct 2010 23:09:55 +0200
Subject: [PATCH 2/2] md5sum: remove strange sentence from description of --warn

* doc/coreutils (md5sum invocation): Improve the explanation of --warn.
---
 doc/coreutils.texi |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 4d17ed1..3585062 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -3517,9 +3517,8 @@ terminal.
 @opindex -w
 @opindex --warn
 @cindex verifying MD5 checksums
-When verifying checksums, warn about improperly formatted MD5 checksum lines.
-This option is useful only if all but a few lines in the checked input
-are valid.
+When verifying checksums, warn about each improperly formatted MD5
+checksum line, including the line number in the message.
 
 @end table
 
-- 
1.6.3.3



bug#7243: [patch] making md5sum's warnings clearer

2010-10-18 Thread Benno Schulenberg

Hi,

Two years ago I complained about the untranslatability of the warnings
that md5sum prints when it has encountered unexpected things:
http://lists.gnu.org/archive/html/bug-coreutils/2008-09/msg00168.html

Jim asked to come up with a change that doesn't remove information.
I've finally gotten around to making this -- see the attached patch.
In addition to read failures and checksum failures, md5sum now alerts
the user to the number of misformatted checksum lines.  It prints this
line also when '--warn' is not given, because it is so important.

Regards,

Benno

(Please CC, not subscribed.)

-- 
http://www.fastmail.fm - Same, same, but different...

From fc5460ed05561a9754754993f7aadd541eb98c1c Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Mon, 18 Oct 2010 22:35:39 +0200
Subject: [PATCH] md5sum: print a summary warning for improperly formatted lines

And remove the now superfluous totals from the other two warnings,
so the plurals will also work in other languages than English.

Signed-off-by: Benno Schulenberg bensb...@justemail.net
---
 src/md5sum.c |   36 +++-
 1 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/src/md5sum.c b/src/md5sum.c
index 10d4fa2..a660e3b 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -431,6 +431,7 @@ static bool
 digest_check (const char *checkfile_name)
 {
   FILE *checkfile_stream;
+  uintmax_t n_misformatted_lines = 0;
   uintmax_t n_properly_formatted_lines = 0;
   uintmax_t n_mismatched_checksums = 0;
   uintmax_t n_open_or_read_failures = 0;
@@ -489,6 +490,8 @@ digest_check (const char *checkfile_name)
   ! (is_stdin  STREQ (filename, -))
   hex_digits (hex_digest)))
 {
+  ++n_misformatted_lines;
+
   if (warn)
 {
   error (0, 0,
@@ -571,27 +574,26 @@ digest_check (const char *checkfile_name)
 {
   if (!status_only)
 {
+  if (n_misformatted_lines != 0)
+error (0, 0,
+   ngettext (WARNING: % PRIuMAX  line is improperly formatted,
+ WARNING: % PRIuMAX  lines are improperly formatted,
+ select_plural (n_misformatted_lines)),
+   n_misformatted_lines);
+
   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  listed file could not be read,
+ WARNING: % PRIuMAX  listed files could not be read,
+ select_plural (n_open_or_read_failures)),
+   n_open_or_read_failures);
 
   if (n_mismatched_checksums != 0)
-{
-  uintmax_t n_computed_checksums =
-(n_properly_formatted_lines - n_open_or_read_failures);
-  error (0, 0,
- ngettext (WARNING: % PRIuMAX  of % PRIuMAX
-computed checksum did NOT match,
-   WARNING: % PRIuMAX  of % PRIuMAX
-computed checksums did NOT match,
-   select_plural (n_computed_checksums)),
- n_mismatched_checksums, n_computed_checksums);
-}
+error (0, 0,
+   ngettext (WARNING: % PRIuMAX  computed checksum did NOT match,
+ WARNING: % PRIuMAX  computed checksums did NOT match,
+ select_plural (n_mismatched_checksums)),
+   n_mismatched_checksums);
 }
 }
 
-- 
1.6.3.3



bug#6516: [patch] improving error messages for when 'ln' fails

2010-06-26 Thread Benno Schulenberg

Hi,

Trying to make a link that already exists, 'ln' prints a message that
is slightly confusing, especially when using '-v' and thus expexting
a progress message.  For example:

$ ln -sv bash /bin/sh
ln: creating symbolic link '/bin/sh': File exists

The 'creating... seems to say that the link is being created.
The message would be clearer in the following form:

ln: cannot create symbolic link '/bin/sh': File exists

Attached patch makes this change.

Regards,

Benno

-- 
http://www.fastmail.fm - Faster than the air-speed velocity of an
  unladen european swallow

From 05939f3bf8907f9ae9f36d72e521d934c49daf37 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg bensb...@justemail.net
Date: Sat, 26 Jun 2010 12:00:42 +0200
Subject: [PATCH] ln: print a clearer error message when linking fails

---
 src/ln.c |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/ln.c b/src/ln.c
index 8612afe..bd5f361 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -304,14 +304,14 @@ do_link (const char *source, const char *dest)
   error (0, errno,
  (symbolic_link
   ? (errno != ENAMETOOLONG  *source
- ? _(creating symbolic link %s)
- : _(creating symbolic link %s - %s))
+ ? _(cannot create symbolic link %s)
+ : _(cannot create symbolic link %s - %s))
   : (errno == EMLINK  !source_is_dir
- ? _(creating hard link to %.0s%s)
+ ? _(cannot create hard link to %.0s%s)
  : (errno == EDQUOT || errno == EEXIST || errno == ENOSPC
 || errno == EROFS)
- ? _(creating hard link %s)
- : _(creating hard link %s = %s))),
+ ? _(cannot create hard link %s)
+ : _(cannot create hard link %s = %s))),
  quote_n (0, dest), quote_n (1, source));
 
   if (dest_backup)
-- 
1.6.3.3



Re: several wording mistakes in FAQ

2009-11-19 Thread Benno Schulenberg

Hola Bob,

On Thu, 05 Nov 2009 15:32 -0700, Bob Proulx b...@proulx.com wrote:
 Benno Schulenberg wrote:
  If not, ´file names that start with a dot´ are not an example but
  an explication.  Maybe write it as follows: ...I never see hidden files,
  that is dot files, that is files whose names start with a dot...
 
 Unix filesystems use the convention that files that start with a dot
 are hidden files.  But the code has been ported to many other systems
 and some of those have different conventions for what makes a hidden
 file.  I know that the emphasis is on GNU systems but I didn't want to
 completely close the door on other non-GNU systems.

But the title of the item already speaks of dot files, not of hidden ones.
And the rest of the item only talks of dot files (twice adding that they
are hidden), and all the examples are about dot files.  Seeing all this
context, really only that is makes sense.

In my opinion there is no need to cater for other systems -- the FAQ
is located at gnu.org and it should describe GNU coreutils as clearly as
possible: don't say for example when the example given is the only
possibility.  Better the above suggested phrase, to closely bind together
the three possible descriptions of hidden files.


Another strange phrase appears near the end of this item about ´ls´:
as this is a very similar theme.  Maybe: as the sometimes surprising
behavior of the globbing character ´*´ is a very common theme.

In the title of item 28 the name of tar should be all lowercase.  I know
you resist changing titles because of posted URLs, but it's better to be
correct.  Also : s/this file this is not possible/this file is not possible/

Regards,

Benno

-- 
http://www.fastmail.fm - Email service worth paying for. Try it for free





Re: several wording mistakes in FAQ

2009-11-04 Thread Benno Schulenberg

Hi Bob,

On Sun, 01 Nov 2009 00:36 -0600, Bob Proulx b...@proulx.com wrote:
 Benno Schulenberg wrote:
  In item 14: wild-cards - wildcards, wild card - wildcard
 
 A spell checker error.  Corrected.

Still one present: you provided a wild card - wildcard

  In item 18: e.g. files with names - that is files with names
 
 Rome fell so let it lie? :-) But e.g.  translates to for example.
 I.e would have been that is.

The change from for example to that is was intentional.  :)
Because, are there kinds of hidden files that do not start with a dot?
If not, ´file names that start with a dot´ are not an example but
an explication.  Maybe write it as follows: ...I never see hidden files,
that is dot files, that is files whose names start with a dot...

  In item 33: the cp and move - the cp and mv
 
 This is an artifact of dropping punctuation for the URL.

Ehm, the above text is in the body of the item, not the title.
For variety, maybe turn the word order around, while adding
the relevant @option{} and @command{} markers:

the cp and move –reply=X option was deprecated -
the option –reply=X for cp and mv was deprecated

One other error: It did not have any affect - effect

By the way, @command{} markers are missing in many places.
For example in item 18: This is regardless of it being ls,
the ls command is only listing out, what is ls doing,
Suddenly using ls, with the -l option.

(By the way, after the above Suddenly a comma is needed.  It makes
a difference.  :)

Regards,

Benno

-- 
http://www.fastmail.fm - Same, same, but different...





Re: ls --help: further tweak

2009-09-23 Thread Benno Schulenberg
On Tue, 22 Sep 2009 22:16 +0200, Jim Meyering j...@meyering.net wrote:
 +Using color to distinguish file types is disabled both by default and\n\
 +with --color=never.

Okay with me.  It forces is disabled to describe a state also for the option.
(In some translations this won't work, though.  But that is something for the
translators to solve.)


One other tiny thing about the HTML pages.  Subsection 23.6.1 does not
have its own subnode (whereas for example 7.6.1 does).  Clicking 23.6.1
at 
http://www.gnu.org/software/coreutils/manual/html_node/index.html#toc_Modified-command-invocation
shows section 23.6 instead.

Benno

-- 
http://www.fastmail.fm - Access all of your messages and folders
  wherever you are





ls --help: further tweak

2009-09-22 Thread Benno Schulenberg
(Sorry for breaking thread.  I am using the archives and webmail.)

Jim Meyering quoted Pádraig Brady's change:
  Using color to distinguish types of files is not enabled by default, or 
 when\n\
  --color=never is specified.  [...]

Hmm, the above is not quite grammatical.  Paraphrased:
Something is not true by default, or when option --foo is given.

What might be okay:
Using color to distinguish types of files is disabled by default and also\n\
when --color=never is specified.

But I would prefer to be perfectly clear:
Using color to distinguish types of files is disabled by default. It is\n\
also disabled when --color=never is specified.

Benno

-- 
http://www.fastmail.fm - Accessible with your email software
  or over the web





Re: ls --help: further tweak

2009-09-22 Thread Benno Schulenberg
On Tue, 22 Sep 2009 20:53 +0200, Jim Meyering j...@meyering.net wrote:
 +Using color to distinguish file types is disabled by default, and with\n\
 +--color=never.  With --color=auto, ls emits color codes only when\n\
 +standard output is connected to a terminal.

The thing is: the explicit is disabled before the comma describes a
situation, the understood is disabled after the comma describes
an action.  In my head this grates.  But maybe this is just my Dutch
shimmering through: there different verbs are needed for those two
things (is uitgeschakeld, wordt uitgeschakeld).

Using color is disabled by default, and (is disabled) with --color=never.

The grating gets less but not nil when putting in an also:

Using color is disabled by default, and also with --color=never.

Benno

-- 
http://www.fastmail.fm - Access all of your messages and folders
  wherever you are





several wording mistakes in FAQ

2009-09-20 Thread Benno Schulenberg

Hi,

On http://www.gnu.org/software/coreutils/faq/ the second paragraph
says: This master location of this document is available online at ...
It should probably read either The master location of this document
is: ... or The master version of this document is available online at ...

In the third paragraph it says: consider posting the question to the
bug lists.  lists - list

The third element of the table of contents still mentions fileutils instead
of coreutils: Where can I get the latest version of GNU fileutils?  The
item itself correctly mentions coreutils.

The later elements in that table of contents do not consistently end in
periods.  And in the last element a colon is missing after cp and mv.

In item 2: three packages combined implement the core set --
implement - implemented.
14 character limited?  Not 9-character limited?
But all three - But the three
These three packages - In 2003 these three packages
This greatly simplifies - This greatly simplified
And in the title a comma is missing after Fileutils.

In item 4: and although are generally - and although generally
using this command. - using this command:

In item 5: Also with the - Including the

In item 6: are in no position to be able to do anything -
are in no position to do anything
We can't help you about any - We can't help you with any
were severely effected - were severely affected

In item 8: has put in to - has put into

In item 9: another place that file could be created -
another place that a file could be created
You use up their quote - You use up their quota

Item 10 can probably be deleted.  It still refers to fileutils.

In item 11: in the front of it - in front of it

In item 12: them you can interrupt - then you can interrupt

In item 13: expands file globs - expands globbing characters
(When someone does not know what glob means, googling for
globbing will give preciser results than for globs.)
You can test that with the echo command. echo rm -i * -
(You can test this with the echo command: echo rm -i * )
with the command in code/code tags.

In item 14: wild-cards - wildcards, wild card - wildcard
handing the arguments off to - handing the arguments to
the expanded out names - the expanded names
(In my opinion those extra prepositions make the sentences
harder to understand.)
names in current directory - names in the current directory
and hands of the - and hands the
but any arbitrary path - or any arbitrary path
in a way keeping with - in keeping with
and hand the results off to - and hands the results to
will fail execute - will fail to execute
there is still limit - there is still a limit
this limited argument space limit - this limited argument space
equivalent to the following question - equivalent to the following example
easier to understand what is going on - easier to understand
as an extension was using the - as an extension by using the

In item 16: you only want to restrict directory listings to only show
you want to restrict directory listings to only show
This will do what you want. - This will do what you want:
are using bash, some - are using bash. Some
to quote it, this will - to quote it. This will
many power file finding features - many powerful file finding features
allowed the operating system - allowed by the operating system

In item 18: e.g. files with names - that is files with names

In item 20 it is very unclear what the first sentence is an answer to.
Also: such as, I have found a bug in the sleep() function, or, ... . -
such as 'I have found a bug in the sleep() function' or '...'.
are also C program - is also a C program

In item 21: the internal shell built in - the internal shell builtin
improve the speed performance - improve the speed of execution

In item 22: environment variables like LANG, LC_ALL, or LANG -
environment variables like LANG, LC_COLLATE or LC_ALL
Unset them, and then set LC_ALL to POSIX.  Unsetting the others
should not be necessary, as LC_ALL overrides them.  So -
Simply set LC_ALL to POSIX.

The link at the end of item 23 does not work any more.

In item 25: until such time at that file was created -
until the time that such file was created

In item 26: will allow you change the owner -
will allow you to change the owner

In item 27: compile them up again - compile them again
make it is possible - make it possible

In item 31: A very common case is when this occurs is -
A very common case where this occurs is
A related question which is why does ... filesystem?-
A related question is 'why does ... filesystem?'

In item 33: the cp and move - the cp and mv
The best recommended alternative is to use rsync command -
Previously the best alternative was to use the rsync command

Okay, enough.  :)

Benno

-- 
http://www.fastmail.fm - Faster than the air-speed velocity of an
  unladen european swallow





Re: table of contents of manual contains mistake

2009-09-19 Thread Benno Schulenberg
On Tue, 28 Jul 2009 23:34 +0100, Pádraig Brady p...@draigbrady.com wrote:
 I've just pushed:
 http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=8aeda9b

Thanks.  Since that change versions 7.5 and 7.6 have been released, but
http://www.gnu.org/software/coreutils/manual/html_node/index.html#toc_System-context
still contains the mistake.  Apparently the online manual pages are not
automatically regenerated after a release:
http://www.gnu.org/software/coreutils/manual/html_node/index.html#Top
says it documents version 7.2.

By the way, the Output of entire files menu item there does not mention
the base64 program, only cat tac nl od.

Benno

-- 
http://www.fastmail.fm - One of many happy users:
  http://www.fastmail.fm/docs/quotes.html





Re: final batch of tiny string fixes [patches]

2008-09-21 Thread Benno Schulenberg
Jim Meyering wrote:
 Benno Schulenberg [EMAIL PROTECTED] wrote:
  -  ngettext (WARNING: % PRIuMAX  of % PRIuMAX
  - listed file could not be read,
  +  ngettext (WARNING: % PRIuMAX  file could not be read,
 ...
 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.

Hmm...  But in general it is unlikely that the user knows how many 
files should be verified.  For small numbers, okay, but not for 
tens or hundreds.  More importantly, though, this summary line only 
gets printed when one or more checksums do not match, so the user 
will not be alerted to too few files being verified (if she knows 
the total) when all valid lines verify OK.  If she wants to be 
alerted to misformatted lines, she should use -w.  But when 
verifying lots of files, any such error message will probably 
scroll quickly off the screen, so instead of mentioning the total 
number of checked files, it would be more useful to add another 
summary line that mentions the total number of improperly formatted 
lines.  This line should probably be printed before the summary of 
checksum mismatches, and probably only when -w is used.

  -   printf ( %19s, ???);
  +   /* TRANSLATORS: Real name is unknown; at most 19 characters.
  */ +printf ( %19s, _(???));
 ...
 Why bother translating these in the first place?

For symmetry, because in print_long_entry() it is gettextized too.  
And because some languages may have a special word or character or 
designation for unknown name, unknown person, unknown thing.  
Or some translators may simply prefer to use a clearer message 
than ???.

 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

Okay.  But I won't have time to make this: in a few days I will 
break camp.  So this will probably be my last message to this list, 
not counting the upcoming pings.

Benno


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: output of 'date' is not properly localized

2008-09-21 Thread Benno Schulenberg
Benno Schulenberg wrote:
 (with LC_TIME and LC_ALL unset):

 $ LANG=da_DK.utf8 src/date
 søn aug 31 13:21:21 CEST 2008

 The day and month are reversed and the year is at the end instead
 of after the month.

Ping?

Benno




___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: descriptions of 'who' differ

2008-09-21 Thread Benno Schulenberg
Benno Schulenberg wrote:
 Git does mention -p, -r and -t, but out of order.  Attached patch
 puts them in their alphabetical positions, and removes the
 duplication of -H. 

Ping?

Benno



___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: final batch of tiny string fixes [patches]

2008-09-18 Thread Benno Schulenberg
Benno Schulenberg wrote:
 Attached the last of the series of tiny fixes for string problems

Ping?

Benno


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: descriptions of 'who' differ

2008-09-02 Thread Benno Schulenberg
Benno Schulenberg wrote:
 The texts from 'who --help' and 'info who' say different things.
 The latter does not mention the options -p, -r and -t.

Oops, I was looking at 6.12. instead of git.  Git does mention -p, 
-r and -t, but out of order.  Attached patch puts them in their 
alphabetical positions, and removes the duplication of -H.

Benno
From 7bc5c976f966d220aa77c89f2d2d8bfffcdfefcf Mon Sep 17 00:00:00 2001
From: Benno Schulenberg [EMAIL PROTECTED]
Date: Tue, 2 Sep 2008 21:40:52 +0200
Subject: [PATCH] doc: order the options of 'who' alphabetically

---
 doc/coreutils.texi |   50 ++
 1 files changed, 22 insertions(+), 28 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 3a04176..4e6e2bc 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -12711,29 +12711,7 @@ Print information corresponding to dead processes.
 @itemx --heading
 @opindex -H
 @opindex --heading
-Print column headings.
-
[EMAIL PROTECTED] -m
[EMAIL PROTECTED] -m
-Same as @samp{who am i}.
-
[EMAIL PROTECTED] -q
[EMAIL PROTECTED] --count
[EMAIL PROTECTED] -q
[EMAIL PROTECTED] --count
-Print only the login names and the number of users logged on.
-Overrides all other options.
-
[EMAIL PROTECTED] -s
[EMAIL PROTECTED] -s
-Ignored; for compatibility with other versions of @command{who}.
-
[EMAIL PROTECTED] -u
[EMAIL PROTECTED] -u
[EMAIL PROTECTED] idle time
-After the login time, print the number of hours and minutes that the
-user has been idle.  @samp{.} means the user was active in the last minute.
[EMAIL PROTECTED] means the user has been idle for more than 24 hours.
+Print a line of column headings.
 
 @item -l
 @itemx --login
@@ -12748,11 +12726,9 @@ Attempt to canonicalize hostnames found in utmp through a DNS lookup.  This
 is not the default because it can cause significant delays on systems with
 automatic dial-up internet access.
 
[EMAIL PROTECTED] -H
[EMAIL PROTECTED] --heading
[EMAIL PROTECTED] -H
[EMAIL PROTECTED] --heading
-Print a line of column headings.
[EMAIL PROTECTED] -m
[EMAIL PROTECTED] -m
+Same as @samp{who am i}.
 
 @item -p
 @itemx --process
@@ -12760,18 +12736,36 @@ Print a line of column headings.
 @opindex --process
 List active processes spawned by init.
 
[EMAIL PROTECTED] -q
[EMAIL PROTECTED] --count
[EMAIL PROTECTED] -q
[EMAIL PROTECTED] --count
+Print only the login names and the number of users logged on.
+Overrides all other options.
+
 @item -r
 @itemx --runlevel
 @opindex -r
 @opindex --runlevel
 Print the current (and maybe previous) run-level of the init process.
 
[EMAIL PROTECTED] -s
[EMAIL PROTECTED] -s
+Ignored; for compatibility with other versions of @command{who}.
+
 @item -t
 @itemx --time
 @opindex -t
 @opindex --time
 Print last system clock change.
 
[EMAIL PROTECTED] -u
[EMAIL PROTECTED] -u
[EMAIL PROTECTED] idle time
+After the login time, print the number of hours and minutes that the
+user has been idle.  @samp{.} means the user was active in the last minute.
[EMAIL PROTECTED] means the user has been idle for more than 24 hours.
+
 @item -w
 @itemx -T
 @itemx --mesg
-- 
1.5.6.4

___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


output of 'date' is not properly localized

2008-08-31 Thread Benno Schulenberg

Hi,

On http://www.opengroup.org/onlinepubs/95399/utilities/date.html 
it says under the examples:

$ LANG=da_DK.iso_8859-1 date
ons 02 okt 1991 15:03:32 CET

But when coreutils' current date is used (with LC_TIME and LC_ALL 
unset):

$ LANG=da_DK.utf8 src/date
søn aug 31 13:21:21 CEST 2008

The day and month are reversed and the year is at the end instead of 
after the month.  For Dutch the same misformat is used: an American 
format with only the abbreviations translated to Dutch.

date uses 'nl_langinfo (_DATE_FMT)', but the manpage for nl_langinfo 
does not mention _DATE_FMT; it only lists D_T_FMT, D_FMT and T_FMT.

After applying the attached first patch (changing _DATE_FMT to 
D_T_FMT) things are correct (using libc-2.7):

$ LANG=da_DK.utf8 date
søn 31 aug 2008 13:24:32 CEST


The second patch removes a comment that seems mistaken, because it 
doesn't take into account that LC_TIME could be for example da_DK.  
Alternatively, it could let translators specify a fallback format 
by doing something like this:

  setlocale (LC_MESSAGES, getlocale (LC_TIME));
  format = _(%a %b %e %H:%M:%S %Z %Y);
  setlocale (LC_ALL, );

Benno

From 5e17acc09261e16e747c58583510d66549185c5a Mon Sep 17 00:00:00 2001
From: Benno Schulenberg [EMAIL PROTECTED]
Date: Sun, 31 Aug 2008 13:09:52 +0200
Subject: [PATCH] date: call nl_langinfo with proper argument

---
 src/date.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/date.c b/src/date.c
index 3cfcc62..4e84a5f 100644
--- a/src/date.c
+++ b/src/date.c
@@ -109,8 +109,8 @@ static struct option const long_options[] =
 # define TZSET /* empty */
 #endif
 
-#ifdef _DATE_FMT
-# define DATE_FMT_LANGINFO() nl_langinfo (_DATE_FMT)
+#ifdef D_T_FMT
+# define DATE_FMT_LANGINFO() nl_langinfo (D_T_FMT)
 #else
 # define DATE_FMT_LANGINFO() 
 #endif
-- 
1.5.6.4


From 46bff8f13ff524fcdfc8d969b8a739b70405f44f Mon Sep 17 00:00:00 2001
From: Benno Schulenberg [EMAIL PROTECTED]
Date: Sun, 31 Aug 2008 13:34:06 +0200
Subject: [PATCH] date: correct a non-localization comment

---
 src/date.c |9 ++---
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/date.c b/src/date.c
index 4e84a5f..2eccef0 100644
--- a/src/date.c
+++ b/src/date.c
@@ -451,13 +451,8 @@ main (int argc, char **argv)
   format = DATE_FMT_LANGINFO ();
   if (! *format)
 	{
-	  /* Do not wrap the following literal format string with _(...).
-	 For example, suppose LC_ALL is unset, LC_TIME=POSIX,
-	 and LANG=ko_KR.  In that case, POSIX says that LC_TIME
-	 determines the format and contents of date and time strings
-	 written by date, which means date must generate output
-	 using the POSIX locale; but adding _() would cause date
-	 to use a Korean translation of the format.  */
+	  /* Do not wrap the following literal format string with _(); it
+	 is a fallback format for when localization isn't working.  */
 	  format = %a %b %e %H:%M:%S %Z %Y;
 	}
 }
-- 
1.5.6.4


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


descriptions of 'who' differ

2008-08-31 Thread Benno Schulenberg

Hi,

The texts from 'who --help' and 'info who' say different things.  
The latter does not mention the options -p, -r and -t.  It further 
mentions -H twice, does not list -l, --login and --lookup in their 
alphabetical positions, and says that -s is ignored, but it is not 
entirely: it overrides -u.  Finally, 'who --help' does not describe 
the -u option very well: list users logged in.  That is the 
default behaviour.  Better would be: also show idle time and PID.

(By the way, the description of the -l option on 'man 1p who' is 
not good: List only those lines on which the system is waiting 
for someone to login.  It cannot be only when -a combines -l 
with other options.  It had better say: List the lines)

Benno


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


final batch of tiny string fixes [patches]

2008-08-31 Thread Benno Schulenberg

Hi,

Attached the last of the series of tiny fixes for string problems 
that I found while updating the Dutch translation for coreutils.

To clarify the change to some strings of uptime.c: some languages 
may want to put the translation of up after the uptime instead of 
in front; having the up in an unrelated string makes this awkward.  
So the patch moves it to the relevant strings, even though this 
means some duplication.

Benno
From 4e00ae1354aa80baebf5ac3d2e1efc2c2a779ef3 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg [EMAIL PROTECTED]
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);
 
 	  if (n_mismatched_checksums != 0)
-	{
-	  uintmax_t n_computed_checksums =
-		(n_properly_formatted_lines - n_open_or_read_failures);
-	  error (0, 0,
-		 ngettext (WARNING: % PRIuMAX  of % PRIuMAX
-			computed checksum did NOT match,
-			   WARNING: % PRIuMAX  of % PRIuMAX
-			computed checksums did NOT match,
-			   select_plural (n_computed_checksums)),
-		 n_mismatched_checksums, n_computed_checksums);
-	}
+	error (0, 0,
+		   ngettext (WARNING: % PRIuMAX  checksum did NOT match,
+			 WARNING: % PRIuMAX  checksums did NOT match,
+			 select_plural (n_mismatched_checksums)),
+		   n_mismatched_checksums);
 	}
 }
 
-- 
1.5.6.4

From 3ef36c72666f7a6c1bc732c99d192bce8923a698 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg [EMAIL PROTECTED]
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, _(???));
   else
 	{
 	  char *const comma = strchr (pw-pw_gecos, ',');
@@ -273,7 +274,8 @@ print_entry (const STRUCT_UTMP *utmp_ent)
   if (last_change)
 	printf ( %-6s, idle_string (last_change));
   else
-	printf ( %-6s, ???);
+	/* TRANSLATORS: Idle time is unknown; at most 5 characters. */
+	printf ( %-6s, _(?));
 }
 
   printf ( %s, time_string (utmp_ent));
@@ -328,6 +330,7 @@ print_long_entry (const char name[])
   printf (_(In real life: ));
   if (pw == NULL)
 {
+  /* TRANSLATORS: Real name is unknown; no hard limit. */
   printf ( %s, _(???\n));
   return;
 }
-- 
1.5.6.4

From cc5f373ae5a7e0ea1186cb565c4147f2a155844e Mon Sep 17 00:00:00 2001
From: Benno Schulenberg [EMAIL PROTECTED]
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

Re: moot and unposixy error message

2008-08-19 Thread Benno Schulenberg
Andreas Schwab wrote:
 But the sum can overflow, and since the involved types are
 unsigned this has defined (wrap-around) behaviour.

Thanks.  I felt I must be overlooking something, but couldn't figure 
out what.

  Further, the Open Group says that 'od' should not produce an
  error when '-j' plus '-N' is longer than the file, so the above
  section can be removed.

 This is a good point, however.  But end_offset should then be set
 to (uintmax_t)-1 on overflow.

Setting end_offset to the largest possible integer upon overflow 
will probably do the right thing in all practical cases; but if the 
file is really longer than an integer can represent, it would then 
output the wrong number of bytes.  Better print an error message 
instead then.

$ od -j1 -N18446744073709551615 testfile
od: skip-bytes + read-bytes is too large

$ od -j1 -N18446744073709551616 testfile
od: -N argument `18446744073709551616' too large

$ od -j18446744073709551616 -N1 testfile
od: -j argument `18446744073709551616' too large

$ od -j18446744073709551615 -N1 testmail.k
od: skip-bytes + read-bytes is too large

Benno


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


moot and unposixy error message

2008-08-18 Thread Benno Schulenberg

Hi,

In src/od.c around line 1820 it says this:

  if (limit_bytes_to_format)
{
  end_offset = n_bytes_to_skip + max_bytes_to_format;
  if (end_offset  n_bytes_to_skip)
error (EXIT_FAILURE, 0, _(skip-bytes + read-bytes is too large));
}

Since max_bytes_to_format cannot be negative, the second 'if' will 
never trigger, so the whole six lines are moot.

Further, the Open Group says that 'od' should not produce an error 
when '-j' plus '-N' is longer than the file, so the above section 
can be removed.

  http://www.opengroup.org/onlinepubs/7990989775/xcu/od.html --
  If count bytes of input (after successfully skipping, if -j skip 
  is specified) are not available, it will not be considered an error; 
  the od utility will format the input that is available.

Benno


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


'echo' does not ignore other arguments with --help or --version

2008-08-12 Thread Benno Schulenberg

Hi,

Most of the coreutils tools will ignore all other arguments 
when --help or --version is given, but not 'echo':

$ /bin/echo --help ignore this
--help ignore this

$ /bin/echo --version ignore this
--version ignore this

But it says that it would:

$ /bin/echo --help | grep help
  --help display this help and exit

$ /bin/echo --version | head -n1
echo (GNU coreutils) 6.12

Benno


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: tiny string fixes [patches]

2008-08-04 Thread Benno Schulenberg

Hello Jim,

Jim Meyering wrote:
 Benno Schulenberg [EMAIL PROTECTED] wrote:
  -Usage: %s NEWROOT [COMMAND...]\n\
  +Usage: %s NEWROOT [COMMAND]\n\

 How about this instead, to make it consistent with env --help:

 -Usage: %s NEWROOT [COMMAND...]\n\
 +Usage: %s NEWROOT [COMMAND [ARG]...]\n\

Yes, probably better.  I hesitated whether to cut or to add, and 
then opted for the simplest.

Thanks for applying the patches.  A few more will follow in some 
days.

Benno


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


tiny string fixes [patches]

2008-08-03 Thread Benno Schulenberg

Hi,

While updating the Dutch translation for coreutils, I came across a 
few small inconsistencies.  Attached patches fix those.

Benno
From 0cceb3fb67b07d7ca50e65f85aaf6b9eeb487939 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg [EMAIL PROTECTED]
Date: Sun, 3 Aug 2008 23:52:59 +0200
Subject: [PATCH] chroot: It accepts only one command.

---
 src/chroot.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/chroot.c b/src/chroot.c
index 399f76c..2196503 100644
--- a/src/chroot.c
+++ b/src/chroot.c
@@ -41,7 +41,7 @@ usage (int status)
   else
 {
   printf (_(\
-Usage: %s NEWROOT [COMMAND...]\n\
+Usage: %s NEWROOT [COMMAND]\n\
   or:  %s OPTION\n\
 ), program_name, program_name);
   fputs (_(\
-- 
1.5.4.5

From 184fae41aef2ffaa4de60a2d710a097119423196 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg [EMAIL PROTECTED]
Date: Mon, 4 Aug 2008 00:00:56 +0200
Subject: [PATCH] shred: Normalize the synopsis.

---
 src/shred.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/shred.c b/src/shred.c
index 9e82cf2..d766405 100644
--- a/src/shred.c
+++ b/src/shred.c
@@ -155,7 +155,7 @@ usage (int status)
 	 program_name);
   else
 {
-  printf (_(Usage: %s [OPTIONS] FILE [...]\n), program_name);
+  printf (_(Usage: %s [OPTION]... FILE...\n), program_name);
   fputs (_(\
 Overwrite the specified FILE(s) repeatedly, in order to make it harder\n\
 for even very expensive hardware probing to recover the data.\n\
-- 
1.5.4.5

From 5beb4f171685d457306a72e35fc7f12b86038303 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg [EMAIL PROTECTED]
Date: Sun, 3 Aug 2008 23:59:22 +0200
Subject: [PATCH] sum: Option -r does not overrule -s; the last one counts.

---
 src/sum.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/sum.c b/src/sum.c
index 4dfc867..314656f 100644
--- a/src/sum.c
+++ b/src/sum.c
@@ -62,7 +62,7 @@ Usage: %s [OPTION]... [FILE]...\n\
   fputs (_(\
 Print checksum and block counts for each FILE.\n\
 \n\
-  -r  defeat -s, use BSD sum algorithm, use 1K blocks\n\
+  -r  use BSD sum algorithm, use 1K blocks\n\
   -s, --sysv  use System V sum algorithm, use 512 bytes blocks\n\
 ), stdout);
   fputs (HELP_OPTION_DESCRIPTION, stdout);
-- 
1.5.4.5

From d06c881ce6ba6b321c0295fa683a28ddb7581331 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg [EMAIL PROTECTED]
Date: Sun, 3 Aug 2008 23:56:21 +0200
Subject: [PATCH] stty: Options -F and --file are alternatives, cannot both be used.

---
 src/stty.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/stty.c b/src/stty.c
index 5ac2cc6..a70fd95 100644
--- a/src/stty.c
+++ b/src/stty.c
@@ -504,9 +504,9 @@ usage (int status)
   else
 {
   printf (_(\
-Usage: %s [-F DEVICE] [--file=DEVICE] [SETTING]...\n\
-  or:  %s [-F DEVICE] [--file=DEVICE] [-a|--all]\n\
-  or:  %s [-F DEVICE] [--file=DEVICE] [-g|--save]\n\
+Usage: %s [-F DEVICE | --file=DEVICE] [SETTING]...\n\
+  or:  %s [-F DEVICE | --file=DEVICE] [-a|--all]\n\
+  or:  %s [-F DEVICE | --file=DEVICE] [-g|--save]\n\
 ),
 	  program_name, program_name, program_name);
   fputs (_(\
-- 
1.5.4.5

From e9807a9769db21a7efc65df97fbf4bbfee8abdfd Mon Sep 17 00:00:00 2001
From: Benno Schulenberg [EMAIL PROTECTED]
Date: Mon, 4 Aug 2008 00:07:20 +0200
Subject: [PATCH] du: Remove superfluous argument after short option -X.

Also remove inconsistent uppercase and final period;
and use a single indent level for prettiness.
---
 src/du.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/du.c b/src/du.c
index ee24269..fafcea0 100644
--- a/src/du.c
+++ b/src/du.c
@@ -311,9 +311,9 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   -s, --summarize   display only a total for each argument\n\
 ), stdout);
   fputs (_(\
-  -x, --one-file-system  skip directories on different file systems\n\
-  -X FILE, --exclude-from=FILE  Exclude files that match any pattern in FILE.\n\
-  --exclude=PATTERN  Exclude files that match PATTERN.\n\
+  -x, --one-file-systemskip directories on different file systems\n\
+  -X, --exclude-from=FILE  exclude files that match any pattern in FILE\n\
+  --exclude=PATTERNexclude files that match PATTERN\n\
   --max-depth=N print the total for a directory (or file, with --all)\n\
   only if it is N or fewer levels below the command\n\
   line argument;  --max-depth=0 is the same as\n\
-- 
1.5.4.5

From 7525fcf31fda7cda9bfbf7acb500feb38ec3a070 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg [EMAIL PROTECTED]
Date: Mon, 4 Aug 2008 00:18:03 +0200
Subject: [PATCH] uptime, users: Remove inconsistent space from the synopses.

---
 src/uptime.c |2 +-
 src/users.c  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/uptime.c b/src/uptime.c
index 9e3384f..56ad861 100644
--- a/src

redundancy in description of 'cp -a'

2007-11-12 Thread Benno Schulenberg

Hi,

Since option -d of 'cp' includes the function of -P, mentioning the 
latter in the description of option -a is redundant and therefore 
slightly confusing, as the reader tries to figure out what it adds.

-  -a, --archivesame as -dpPR\n\
+  -a, --archivesame as -dpR\n\

(To save the reader the looking up of -d, -p and -R, it might be 
useful to add after -dpR that this means --no-dereference
--preserve=links,mode,ownership,timestamps --resursive.  However, 
that might give a wrong idea about the meaning of -p.)

Benno


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: redundancy in description of 'cp -a'

2007-11-12 Thread Benno Schulenberg
Jim Meyering wrote:
 Benno Schulenberg [EMAIL PROTECTED] wrote:
  -  -a, --archivesame as -dpPR\n\
  +  -a, --archivesame as -dpR\n\

 Thank you!  Applied and pushed.

The same change is needed in the texi file.  :)  (This should teach 
me to provide a complete patch next time.)

-Equivalent to @option{-dpPR}.
+Equivalent to @option{-dpR}.

Benno


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: Errors in the coreutils-6.9 PO file

2007-10-29 Thread Benno Schulenberg

(Sorry for breaking thread, I'm not subscribed.)

Jim Meyering wrote:
 Clytie Siddall [EMAIL PROTECTED] wrote:
  1. This is a fatal error for msgfmt:
 
  #: src/expr.c:133
  #, c-format
  msgid 
  \n
ARG1 * ARG2   arithmetic product of ARG1 and ARG2\n
ARG1 / ARG2   arithmetic quotient of ARG1 divided by ARG2\n
ARG1 % ARG2   arithmetic remainder of ARG1 divided by ARG2\n

 As you know, it's already fixed, but I'm wondering
 why I couldn't provoke the error from msgfmt -cv.

 Are you using a version of msgfmt newer than 0.16.1?
 When I run msgfmt -cv po/fr.po, the only output I get is this:
 1001 translated messages, 190 fuzzy translations, 81 untranslated messages.

With fr.po (and most other PO files) the error does not occur because
ARG1 % ARG2 is translated to ARG1 % ARG2, which is still a valid
C-format string.  In vi.po it gets translated to ĐỐI_SỐ1 % ĐỐI_SỐ2,
which is what causes msgfmt to cry alarum.

Benno



___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils