public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* some spelling and grammar fixes for messages and man pages
@ 2013-10-03 11:22 Benno Schulenberg
  2013-10-04 10:29 ` Karel Zak
  0 siblings, 1 reply; 3+ messages in thread
From: Benno Schulenberg @ 2013-10-03 11:22 UTC (permalink / raw)
  To: Util-Linux

[-- Attachment #1: Type: text/plain, Size: 330 bytes --]


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

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-textual-improve-grammar-of-four-error-messages.patch --]
[-- Type: text/x-patch; name="0002-textual-improve-grammar-of-four-error-messages.patch", Size: 1516 bytes --]

From 64bc44019135faa64d13fa338baf4d92c490d7d8 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Thu, 3 Oct 2013 12:33:29 +0200
Subject: [PATCH 2/7] textual: improve grammar of four error messages

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
 libfdisk/src/bsd.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libfdisk/src/bsd.c b/libfdisk/src/bsd.c
index a9e5d75..daec636 100644
--- a/libfdisk/src/bsd.c
+++ b/libfdisk/src/bsd.c
@@ -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;
 	}
-- 
1.7.0.4


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0003-libfdisk-paths-are-strings-not-numbers-in-some-error.patch --]
[-- Type: text/x-patch; name="0003-libfdisk-paths-are-strings-not-numbers-in-some-error.patch", Size: 1082 bytes --]

From d209397ecfbd264d87b5cedc110184853d1f03a4 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Thu, 3 Oct 2013 12:36:53 +0200
Subject: [PATCH 3/7] libfdisk: paths are strings, not numbers (in some error messages)

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
 libfdisk/src/bsd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libfdisk/src/bsd.c b/libfdisk/src/bsd.c
index daec636..d8d6805 100644
--- a/libfdisk/src/bsd.c
+++ b/libfdisk/src/bsd.c
@@ -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);
-- 
1.7.0.4


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0004-libfdisk-improve-spelling-of-two-comments.patch --]
[-- Type: text/x-patch; name="0004-libfdisk-improve-spelling-of-two-comments.patch", Size: 1107 bytes --]

From 9967f3a9f4301052c693355b3bcd26abc2ffd2ab Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Thu, 3 Oct 2013 12:41:00 +0200
Subject: [PATCH 4/7] libfdisk: improve spelling of two comments

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
 libfdisk/src/bsd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libfdisk/src/bsd.c b/libfdisk/src/bsd.c
index d8d6805..30be561 100644
--- a/libfdisk/src/bsd.c
+++ b/libfdisk/src/bsd.c
@@ -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) {
-- 
1.7.0.4


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0006-docs-tweak-the-grammar-of-an-agetty-man-page-fragmen.patch --]
[-- Type: text/x-patch; name="0006-docs-tweak-the-grammar-of-an-agetty-man-page-fragmen.patch", Size: 1625 bytes --]

From 78c80deaef035886952114dd34199e3cb8b3616b Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Thu, 3 Oct 2013 13:05:43 +0200
Subject: [PATCH 6/7] docs: tweak the grammar of an agetty man-page fragment

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
 term-utils/agetty.8 |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/term-utils/agetty.8 b/term-utils/agetty.8
index d779555..ad0bfa0 100644
--- a/term-utils/agetty.8
+++ b/term-utils/agetty.8
@@ -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
-- 
1.7.0.4


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: 0007-docs-spell-the-name-of-the-loop-control-device-corre.patch --]
[-- Type: text/x-patch; name="0007-docs-spell-the-name-of-the-loop-control-device-corre.patch", Size: 718 bytes --]

From afdea1b5244c241f3e69aba3d57b8bbd37e5dd11 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Thu, 3 Oct 2013 13:07:00 +0200
Subject: [PATCH 7/7] docs: spell the name of the loop-control device correctly

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
 sys-utils/losetup.8 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sys-utils/losetup.8 b/sys-utils/losetup.8
index 9c4c7c9..c61a61e 100644
--- a/sys-utils/losetup.8
+++ b/sys-utils/losetup.8
@@ -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
-- 
1.7.0.4


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #7: 0001-agetty-use-standard-angular-brackets-in-usage-messag.patch --]
[-- Type: text/x-patch; name="0001-agetty-use-standard-angular-brackets-in-usage-messag.patch", Size: 1194 bytes --]

From adc28ec6f73d4533849087ca6e4ae7602616f25b Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 25 Sep 2013 12:25:15 +0200
Subject: [PATCH] agetty: use standard angular brackets in usage message

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
 term-utils/agetty.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index 92d5a3c..b94f203 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -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);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: some spelling and grammar fixes for messages and man pages
  2013-10-03 11:22 some spelling and grammar fixes for messages and man pages Benno Schulenberg
@ 2013-10-04 10:29 ` Karel Zak
  2013-10-04 11:42   ` Benno Schulenberg
  0 siblings, 1 reply; 3+ messages in thread
From: Karel Zak @ 2013-10-04 10:29 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: Util-Linux

On Thu, Oct 03, 2013 at 01:22:07PM +0200, Benno Schulenberg wrote:
> 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!

> -		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.)

>  	if (read_all(fd, ptr, size) != size) {
> -		fdisk_warn(cxt, _("read failed %s"), path);
> +		fdisk_warn(cxt, _("reading %s failed"), path);

...

>  	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);

 I have committed "cannot {write,read} %s".


    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: some spelling and grammar fixes for messages and man pages
  2013-10-04 10:29 ` Karel Zak
@ 2013-10-04 11:42   ` Benno Schulenberg
  0 siblings, 0 replies; 3+ messages in thread
From: Benno Schulenberg @ 2013-10-04 11:42 UTC (permalink / raw)
  To: Karel Zak; +Cc: Util-Linux


On Fri, Oct 4, 2013, at 12:29, Karel Zak wrote:
>  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.

>  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.

I will be working on that.

>  (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


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-04 11:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-03 11:22 some spelling and grammar fixes for messages and man pages Benno Schulenberg
2013-10-04 10:29 ` Karel Zak
2013-10-04 11:42   ` Benno Schulenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox