some spelling and grammar fixes for messages and man pages
Hi,
Attached flurry of patches fix some tiny spelling and word-order problems in some error messages, man pages, and comments.
About the 0003 patch I'm not entirely sure, but looking at almost identical messages, a path should be %s, not %d.
Regards,
Benno
Signature · 1 line
http://www.fastmail.fm - Does exactly what it says on the tin
From 64bc44019135faa64d13fa338baf4d92c490d7d8 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Thu, 3 Oct 2013 12:33:29 +0200
Subject: [PATCH 2/7] textual: improve grammar of four error messages
--- libfdisk/src/bsd.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
libfdisk/src/bsd.c +4 -4
@@ -520,12 +520,12 @@ static int bsd_get_bootstrap(struct fdisk_context *cxt,int fd;if ((fd =open (path,O_RDONLY )) <0 ) { -fdisk_warn (cxt,_ ("open failed %s" ), path); +fdisk_warn (cxt,_ ("opening %s failed" ), path);return -errno; }if (read_all (fd, ptr, size) != size) { -fdisk_warn (cxt,_ ("read failed %s" ), path); +fdisk_warn (cxt,_ ("reading %s failed" ), path);close (fd);return -errno; }
@@ -592,12 +592,12 @@ int fdisk_bsd_write_bootstrap(struct fdisk_context *cxt)alpha_bootblock_checksum (l->bsdbuffer);#endif if (lseek (cxt->dev_fd, (off_t ) sector *DEFAULT_SECTOR_SIZE ,SEEK_SET ) ==-1 ) { -fdisk_warn (cxt,_ ("seek failed %s" ), cxt->dev_path); +fdisk_warn (cxt,_ ("seek on %s failed" ), cxt->dev_path); rc = -errno; goto done; }if (write_all (cxt->dev_fd, l->bsdbuffer,BSD_BBSIZE )) { -fdisk_warn (cxt,_ ("write failed %s" ), cxt->dev_path); +fdisk_warn (cxt,_ ("writing %s failed" ), cxt->dev_path); rc = -errno; goto done; }
Signature · 1 line
1.7.0.4
From d209397ecfbd264d87b5cedc110184853d1f03a4 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Thu, 3 Oct 2013 12:36:53 +0200
Subject: [PATCH 3/7] libfdisk: paths are strings, not numbers (in some error messages)
--- libfdisk/src/bsd.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
libfdisk/src/bsd.c +2 -2
@@ -760,11 +760,11 @@ static int bsd_write_disklabel(struct fdisk_context *cxt)alpha_bootblock_checksum (l->bsdbuffer);#endif if (lseek (cxt->dev_fd, offset,SEEK_SET ) ==-1 ) { -fdisk_warn (cxt,_ ("seek failed: %d" ), cxt->dev_path); +fdisk_warn (cxt,_ ("seek on %s failed" ), cxt->dev_path);return -errno; }if (write_all (cxt->dev_fd, l->bsdbuffer,sizeof (l->bsdbuffer))) { -fdisk_warn (cxt,_ ("write failed: %d" ), cxt->dev_path); +fdisk_warn (cxt,_ ("writing %s failed" ), cxt->dev_path);return -errno; }sync_disks (cxt);
Signature · 1 line
1.7.0.4
From 9967f3a9f4301052c693355b3bcd26abc2ffd2ab Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Thu, 3 Oct 2013 12:41:00 +0200
Subject: [PATCH 4/7] libfdisk: improve spelling of two comments
--- libfdisk/src/bsd.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
libfdisk/src/bsd.c +2 -2
@@ -751,12 +751,12 @@ static int bsd_write_disklabel(struct fdisk_context *cxt) d->d_checksum =0 ; d->d_checksum =bsd_dkcksum (d); -/* Update label with in boot block. */ +/* Update label within boot block. */ memmove (&l->bsdbuffer[BSD_LABELSECTOR *DEFAULT_SECTOR_SIZE +BSD_LABELOFFSET ], d,sizeof (*d));#if defined (__alpha__) &&BSD_LABELSECTOR ==0 -/* write the check sum to the end of the first sector */ +/* Write the checksum to the end of the first sector. */ alpha_bootblock_checksum (l->bsdbuffer);#endif if (lseek (cxt->dev_fd, offset,SEEK_SET ) ==-1 ) {
Signature · 1 line
1.7.0.4
From 78c80deaef035886952114dd34199e3cb8b3616b Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Thu, 3 Oct 2013 13:05:43 +0200
Subject: [PATCH 6/7] docs: tweak the grammar of an agetty man-page fragment
--- term-utils/agetty.8 | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
term-utils/agetty.8 +4 -4
@@ -144,14 +144,14 @@ Control the CLOCAL line flag. The optional \fImode\fP argument is 'auto', 'alwa If the \fImode\fP argument is omitted, then the default is 'always'. If the \-\-local\-line option is not given at all, then the default is 'auto'. -The \fImode\fP 'always' forces the line to be a local line with no need for carrier detect. This can -be useful when you have a locally attached terminal where the serial line +The \fImode\fP 'always' forces the line to be a local line with no need for carrier detect. +This can be useful when you have a locally attached terminal where the serial line does not set the carrier-detect signal. -The \fImode\fP 'never' explicitly clears CLOCAL flags from line setting and +The \fImode\fP 'never' explicitly clears the CLOCAL flag from the line setting and the carrier-detect signal is expected on the line. -The \fImode\fP 'auto' (agetty default) does not modify CLOCAL setting +The \fImode\fP 'auto' (agetty default) does not modify the CLOCAL setting and follows the setting enabled by the kernel. .TP \-m, \-\-extract\-baud
Signature · 1 line
1.7.0.4
From afdea1b5244c241f3e69aba3d57b8bbd37e5dd11 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Thu, 3 Oct 2013 13:07:00 +0200
Subject: [PATCH 7/7] docs: spell the name of the loop-control device correctly
--- sys-utils/losetup.8 | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sys-utils/losetup.8 +1 -1
@@ -140,7 +140,7 @@ from determining the status of the device. .I /dev/loop[0..N] loop block devices .TP -.I /dev/loop-cotrol +.I /dev/loop-control loop control device .SH EXAMPLE
Signature · 1 line
1.7.0.4
From adc28ec6f73d4533849087ca6e4ae7602616f25b Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Wed, 25 Sep 2013 12:25:15 +0200
Subject: [PATCH] agetty: use standard angular brackets in usage message
--- term-utils/agetty.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
term-utils/agetty.c +2 -2
@@ -1794,8 +1794,8 @@ static speed_t bcode(char *s)static void __attribute__ ((__noreturn__))usage (FILE *out) {fputs (USAGE_HEADER , out); -fprintf (out,_ (" %1$s [options] line [baud_rate,...] [termtype]\n" -" %1$s [options] baud_rate,... line [termtype]\n" ), program_invocation_short_name); +fprintf (out,_ (" %1$s [options] <line> [<baud_rate>,...] [<termtype>]\n" +" %1$s [options] <baud_rate>,... <line> [<termtype>]\n" ), program_invocation_short_name);fputs (USAGE_OPTIONS , out);fputs (_ (" -8, --8bits assume 8-bit tty\n" ), out);fputs (_ (" -a, --autologin <user> login the specified user automatically\n" ), out);
Signature · 1 line
1.7.0.4
Karel Zak
maintainerQuoted 2 lines · Benno Schulenberg
About the 0003 patch I'm not entirely sure, but looking at almost identical messages, a path should be %s, not %d.
You're right, %d is bug. Almost all your patches applied, thanks!
libfdisk/src/bsd.c static int bsd_get_bootstrap(struct fdisk_context *cxt, · line 523
Quoted 2 lines
libfdisk/src/bsd.c +1
-1-fdisk_warn (cxt,_ ("open failed %s" ), path); +fdisk_warn (cxt,_ ("opening %s failed" ), path);
I don't like this kind of change.
Please, ALWAYS when you want to change any very common message then see po/util-linux.pot.
We have on "cannot open %s" on more than 100 places!
The ideal solution is to use already translated message than introduce new one. Or if you don't like the message then change the string on *all places*.
The goal is to minimize number of messages and unify our utils.
It would be nice to cleanup all the messages and use for example
cannot open %s
cannot close %s
cannot read %s
cannot write %s
seek on %s failed
on all places. Now (rc1) is the ideal time for this change.
(Not sure why someone updated util-linux on translationproject.org
when there is no -rc2 yet.)
Quoted 3 lines
libfdisk/src/bsd.c +1
-1if (read_all (fd, ptr, size) != size) { -fdisk_warn (cxt,_ ("read failed %s" ), path); +fdisk_warn (cxt,_ ("reading %s failed" ), path);
...
libfdisk/src/bsd.c int fdisk_bsd_write_bootstrap(struct fdisk_context *cxt) · line 600
Quoted 3 lines
libfdisk/src/bsd.c +1
-1if (write_all (cxt->dev_fd, l->bsdbuffer,BSD_BBSIZE )) { -fdisk_warn (cxt,_ ("write failed %s" ), cxt->dev_path); +fdisk_warn (cxt,_ ("writing %s failed" ), cxt->dev_path);
I have committed "cannot {write,read} %s".
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 8 lines · Karel Zak
Please, ALWAYS when you want to change any very common message then see po/util-linux.pot.
We have on "cannot open %s" on more than 100 places!
The ideal solution is to use already translated message than introduce new one. Or if you don't like the message then change the string on *all places*.
Yes, you are right. I wasn't thinking.
Quoted 9 lines
It would be nice to cleanup all the messages and use for example
cannot open %s
cannot close %s
cannot read %s
cannot write %s
seek on %s failedon all places. Now (rc1) is the ideal time for this change.
I will be working on that.
Quoted 2 lines
(Not sure why someone updated util-linux on translationproject.org
when there is no -rc2 yet.)
I did. To give translators extra time to catch up, because there have been massive string changes. And to give them a chance to report errors or doubts, and get them fixed before rc2.
Benno
Signature · 1 line
http://www.fastmail.fm - mmm... Fastmail...