* [patches] some proper pluralization, and a bunch of textual fixes
@ 2013-01-23 16:02 Benno Schulenberg
2013-01-25 16:36 ` Karel Zak
2013-01-30 14:38 ` Karel Zak
0 siblings, 2 replies; 4+ messages in thread
From: Benno Schulenberg @ 2013-01-23 16:02 UTC (permalink / raw)
To: Util-Linux
[-- Attachment #1: Type: text/plain, Size: 1337 bytes --]
Hi,
The first two patches properly pluralize two error messages. The third
patch makes some tiny grammar, style and punctuation tweaks to a few
error messages. The fourth marks the filedescriptor as optional for the
-C option of fsck, and adds some missing markup to the man page, corrects
a word there, and expands an abbreviation for clarity. The ninth patch
then slices the help text of fsck into single options, for ease of
translation maintenance. (I hadn't seen Sami's survey request nor its
results until today -- his request had landed in my spam folder. :|
But I fully agree with the outcome.)
The fifth patch corrects the description of the --sysroot option of lscpu,
and the tenth patch then slices the text into single options.
The sixth patch removes the incorrect spaces from "-e [=list]" and
"-p [=list]" in the lscpu manpage, normalizes the spacing of the text,
and corrects a word here and there. The seventh patch normalizes
the help text of mkfs (using <type> instead of TYPE, for example),
marks that -t and fs-options are independent (a distinction that has
gone missing in a commit a year and a half ago), and slices it into
strips. The eighth patch standardizes the version reporting to:
"program from util-linux-x.xx.x".
Regards,
Benno
--
http://www.fastmail.fm - A fast, anti-spam email service.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-agetty-properly-pluralize-the-reporting-of-the-numbe.patch --]
[-- Type: text/x-patch; name="0001-agetty-properly-pluralize-the-reporting-of-the-numbe.patch", Size: 909 bytes --]
From f860096c1461fd3700ef113e760aede17461e3e6 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Tue, 22 Jan 2013 09:36:01 +0100
Subject: [PATCH 01/10] agetty: properly pluralize the reporting of the number of users
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
term-utils/agetty.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index ed97bc5..d3a6e58 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -1930,9 +1930,10 @@ static void output_special_char(unsigned char c, struct options *op,
if (ut->ut_type == USER_PROCESS)
users++;
endutent();
- printf ("%d ", users);
if (c == 'U')
- printf((users == 1) ? _("user") : _("users"));
+ printf(P_("%d user", "%d users", users), users);
+ else
+ printf ("%d ", users);
break;
}
case '4':
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-mkswap-properly-pluralize-the-bad-pages-message.patch --]
[-- Type: text/x-patch; name="0002-mkswap-properly-pluralize-the-bad-pages-message.patch", Size: 832 bytes --]
From ce84643b452d31e999a0f85e41d958a994b5d58c Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Tue, 22 Jan 2013 09:49:59 +0100
Subject: [PATCH 02/10] mkswap: properly pluralize the bad-pages message
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
disk-utils/mkswap.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c
index 415a985..47865b2 100644
--- a/disk-utils/mkswap.c
+++ b/disk-utils/mkswap.c
@@ -329,10 +329,7 @@ check_blocks(void)
page_bad(current_page);
current_page++;
}
- if (badpages == 1)
- printf(_("one bad page\n"));
- else if (badpages > 1)
- printf(_("%lu bad pages\n"), badpages);
+ printf(P_("%lu bad page\n", "%lu bad pages\n", badpages), badpages);
free(buffer);
}
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-textual-tiny-tweaks-of-some-error-messages.patch --]
[-- Type: text/x-patch; name="0003-textual-tiny-tweaks-of-some-error-messages.patch", Size: 1337 bytes --]
From 9e7ae6335a11edffeea4b4f935b6f27157c90059 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Tue, 22 Jan 2013 10:08:03 +0100
Subject: [PATCH 03/10] textual: tiny tweaks of some error messages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
disk-utils/mkswap.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c
index 47865b2..064f5b9 100644
--- a/disk-utils/mkswap.c
+++ b/disk-utils/mkswap.c
@@ -494,7 +494,7 @@ main(int argc, char **argv) {
#ifdef HAVE_LIBUUID
opt_uuid = optarg;
#else
- warnx(_("warning: ignore -U (UUIDs are unsupported by %s)"),
+ warnx(_("warning: ignoring -U (UUIDs are unsupported by %s)"),
program_invocation_short_name);
#endif
break;
@@ -518,7 +518,7 @@ main(int argc, char **argv) {
if (version != 1)
errx(EXIT_FAILURE,
- _("does not support swapspace version %d."), version);
+ _("swapspace version %d is not supported"), version);
#ifdef HAVE_LIBUUID
if(opt_uuid) {
@@ -574,7 +574,7 @@ main(int argc, char **argv) {
if (is_mounted(device_name))
errx(EXIT_FAILURE, _("error: "
- "%s is mounted; will not make swapspace."),
+ "%s is mounted; will not make swapspace"),
device_name);
if (stat(device_name, &statbuf) < 0) {
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-fsck-mark-file-descriptor-for-C-as-optional-in-help-.patch --]
[-- Type: text/x-patch; name="0004-fsck-mark-file-descriptor-for-C-as-optional-in-help-.patch", Size: 3577 bytes --]
From d5540cc38ac85d4231c02fa9e8738f4466692f83 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Tue, 22 Jan 2013 10:26:31 +0100
Subject: [PATCH 04/10] fsck: mark file descriptor for -C as optional in help text
Also slightly improve the man page.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
disk-utils/fsck.8 | 15 ++++++++-------
disk-utils/fsck.c | 4 ++--
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/disk-utils/fsck.8 b/disk-utils/fsck.8
index 344a06f..3bb54d5 100644
--- a/disk-utils/fsck.8
+++ b/disk-utils/fsck.8
@@ -12,7 +12,7 @@ fsck \- check and repair a Linux filesystem
.RI [ fd ]]
.RB [ \-t
.IR fstype ]
-.RI [ filesys ...]
+.RI [ filesystem ...]
.RB [ \-\- ]
.RI [ fs-specific-options ]
.SH DESCRIPTION
@@ -66,7 +66,7 @@ Operational error
Usage or syntax error
.TP
.B 32
-Fsck canceled by user request
+Checking canceled by user request
.TP
.B 128
Shared-library error
@@ -225,7 +225,8 @@ with filesystems with the lowest
.I fs_passno
number being checked first.
If there are multiple filesystems with the same pass number,
-fsck will attempt to check them in parallel, although it will avoid running
+.B fsck
+will attempt to check them in parallel, although it will avoid running
multiple filesystem checks on the same physical disk.
.sp
.B fsck
@@ -264,9 +265,9 @@ skip non-existing devices.
also skips non-existing devices that have the special filesystem type
.BR auto .
.TP
-.B \-C\fR [ \fI "fd" \fR ]
+.BR \-C \ [ \fIfd\fR ]
Display completion/progress bars for those filesystem checkers (currently
-only for ext2 and ext3) which support them. Fsck will manage the
+only for ext2 and ext3) which support them. \fBfsck\fR will manage the
filesystem checkers so that only one of them will display
a progress bar at a time. GUI front-ends may specify a file descriptor
.IR fd ,
@@ -306,7 +307,7 @@ that are executed.
.B fs-specific-options
Options which are not understood by
.B fsck
-are passed to the filesystem-specific checker. These arguments
+are passed to the filesystem-specific checker. These options
.B must
not take arguments, as there is no
way for
@@ -319,7 +320,7 @@ Options and arguments which follow the
are treated as filesystem-specific options to be passed to the
filesystem-specific checker.
.IP
-Please note that fsck is not
+Please note that \fBfsck\fR is not
designed to pass arbitrarily complicated options to filesystem-specific
checkers. If you're doing something complicated, please just
execute the filesystem-specific checker directly. If you pass
diff --git a/disk-utils/fsck.c b/disk-utils/fsck.c
index 28a1d70..6d50218 100644
--- a/disk-utils/fsck.c
+++ b/disk-utils/fsck.c
@@ -1296,7 +1296,7 @@ static int check_all(void)
static void __attribute__((__noreturn__)) usage(void)
{
printf(_("\nUsage:\n"
- " %s [fsck-options] [fs-options] [filesys ...]\n"),
+ " %s [options] [fs-options] [<filesystem>...]\n"),
program_invocation_short_name);
puts(_( "\nOptions:\n"
@@ -1311,7 +1311,7 @@ static void __attribute__((__noreturn__)) usage(void)
" -l lock the device using flock()\n"
" -N do not execute, just show what would be done\n"
" -T do not show the title on startup\n"
- " -C <fd> display progress bar; file descriptor is for GUIs\n"
+ " -C [<fd>] display progress bar; file descriptor is for GUIs\n"
" -V explain what is being done\n"
" -? display this help and exit\n\n"
"See fsck.* commands for fs-options."));
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: 0005-lscpu-correct-the-description-of-sysroot-in-help-tex.patch --]
[-- Type: text/x-patch; name="0005-lscpu-correct-the-description-of-sysroot-in-help-tex.patch", Size: 1389 bytes --]
From 80e1eb62e61c083d4e8348a85c37a86325277b5b Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Tue, 22 Jan 2013 10:57:52 +0100
Subject: [PATCH 05/10] lscpu: correct the description of --sysroot in help text
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
sys-utils/lscpu.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index 7cdc9f9..4de3186 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -1254,10 +1254,10 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
" -b, --online print online CPUs only (default for -p)\n"
" -c, --offline print offline CPUs only\n"
" -e, --extended[=<list>] print out an extended readable format\n"
- " -h, --help print this help\n"
+ " -h, --help display this help text and exit\n"
" -p, --parse[=<list>] print out a parsable format\n"
- " -s, --sysroot <dir> use directory DIR as system root\n"
- " -V, --version print version information and exit\n"
+ " -s, --sysroot <dir> use specified directory as system root\n"
+ " -V, --version display version information and exit\n"
" -x, --hex print hexadecimal masks rather than lists of CPUs\n"), out);
fprintf(out, _("\nAvailable columns:\n"));
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #7: 0006-doc-remove-incorrect-spaces-from-lscpu-synopsis-in-m.patch --]
[-- Type: text/x-patch; name="0006-doc-remove-incorrect-spaces-from-lscpu-synopsis-in-m.patch", Size: 7679 bytes --]
From ba3aa25f986ea8bacba59bdccdf9905ded825e7b Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Tue, 22 Jan 2013 11:13:07 +0100
Subject: [PATCH 06/10] doc: remove incorrect spaces from lscpu synopsis in manpage
Also normalize text spacing and add some formatting.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
sys-utils/lscpu.1 | 59 ++++++++++++++++++++++++++---------------------------
1 files changed, 29 insertions(+), 30 deletions(-)
diff --git a/sys-utils/lscpu.1 b/sys-utils/lscpu.1
index f7e34b9..f747a35 100644
--- a/sys-utils/lscpu.1
+++ b/sys-utils/lscpu.1
@@ -1,32 +1,31 @@
.\" Process this file with
.\" groff -man -Tascii lscpu.1
.\"
-.TH LSCPU 1 "February 2011" "util-linux" "User Commands"
+.TH LSCPU 1 "January 2013" "util-linux" "User Commands"
.SH NAME
lscpu \- display information about the CPU architecture
.SH SYNOPSIS
.B lscpu
-.RB [ \-a | \-b | \-c "] [" \-x "] [" \-s " \fIdirectory\fP] [" \-e " [\fI=list\fP]|" \-p " [\fI=list\fP]]"
+.RB [ \-a | \-b | \-c "] [" \-x "] [" \-s " \fIdirectory\fP] [" \-e [=\fIlist\fP]| \-p [=\fIlist\fP]]
.br
.B lscpu
.BR \-h | \-V
.SH DESCRIPTION
.B lscpu
-gathers CPU architecture information from sysfs and /proc/cpuinfo. The
+gathers CPU architecture information from sysfs and /proc/cpuinfo. The
command output can be optimized for parsing or for easy readability by humans.
-.br
The information includes, for example, the number of CPUs, threads, cores,
-sockets, and Non-Uniform Memory Access (NUMA) nodes. There is also information
+sockets, and Non-Uniform Memory Access (NUMA) nodes. There is also information
about the CPU caches and cache sharing, family, model, bogoMIPS, byte order,
and stepping.
-Options that result in an output table have a \fIlist\fP argument. Use this
-argument to customize the command output. Specify a comma-separated list of
+Options that result in an output table have a \fIlist\fP argument. Use this
+argument to customize the command output. Specify a comma-separated list of
column labels to limit the output table to only the specified columns, arranged
-in the specified order. See \fBCOLUMNS\fP for a list of valid column labels. The
+in the specified order. See \fBCOLUMNS\fP for a list of valid column labels. The
column labels are not case sensitive.
-Not all columns are supported on all architectures. If an unsupported column is
+Not all columns are supported on all architectures. If an unsupported column is
specified, \fBlscpu\fP prints the column but does not provide any data for it.
.SS COLUMNS
@@ -35,16 +34,16 @@ specified, \fBlscpu\fP prints the column but does not provide any data for it.
The logical CPU number of a CPU as used by the Linux kernel.
.TP
.B CORE
-The logical core number. A core can contain several CPUs.
+The logical core number. A core can contain several CPUs.
.TP
.B SOCKET
-The logical socket number. A socket can contain several cores.
+The logical socket number. A socket can contain several cores.
.TP
.B BOOK
-The logical book number. A book can contain several sockets.
+The logical book number. A book can contain several sockets.
.TP
.B NODE
-The logical NUMA node number. A node may contain several books.
+The logical NUMA node number. A node may contain several books.
.TP
.B CACHE
Information about how caches are shared between CPUs.
@@ -57,14 +56,14 @@ Indicator that shows whether the Linux instance currently makes use of the CPU.
.TP
.B CONFIGURED
Indicator that shows if the hypervisor has allocated the CPU to the virtual
-hardware on which the Linux instance runs. CPUs that are configured can be set
+hardware on which the Linux instance runs. CPUs that are configured can be set
online by the Linux instance.
This column contains data only if your hardware system and hypervisor support
dynamic CPU resource allocation.
.TP
.B POLARIZATION
This column contains data for Linux instances that run on virtual hardware with
-a hypervisor that can switch the CPU dispatching mode (polarization). The
+a hypervisor that can switch the CPU dispatching mode (polarization). The
polarization can be:
.RS
.TP 12
@@ -75,52 +74,52 @@ The workload is spread across all available CPUs.
The workload is concentrated on few CPUs.
.P
For vertical polarization, the column also shows the degree of concentration,
-high, medium, or low. This column contains data only if your hardware system
+high, medium, or low. This column contains data only if your hardware system
and hypervisor support CPU polarization.
.RE
.SH OPTIONS
.TP
.BR \-a , " \-\-all"
-Include lines for online and offline CPUs in the output (default for -e). This
-option may only specified together with option -e or -p.
+Include lines for online and offline CPUs in the output (default for \fB-e\fR).
+This option may only be specified together with option \fB-e\fR or \fB-p\fR.
.TP
.BR \-b , " \-\-online"
-Limit the output to online CPUs (default for -p). This option may only
-be specified together with option -e or -p.
+Limit the output to online CPUs (default for \fB-p\fR).
+This option may only be specified together with option \fB-e\fR or \fB-p\fR.
.TP
.BR \-c , " \-\-offline"
-Limit the output to offline CPUs. This option may only be specified together
-with option -e or -p.
+Limit the output to offline CPUs.
+This option may only be specified together with option \fB-e\fR or \fB-p\fR.
.TP
-.BR \-e , " \-\-extended " \fI[=list]\fP
+.BR \-e , " \-\-extended" [=\fIlist\fP]
Display the CPU information in human readable format.
If the \fIlist\fP argument is omitted, all columns for which data is available
are included in the command output.
When specifying the \fIlist\fP argument, the string of option, equal sign (=), and
-\fIlist\fP must not contain any blanks or other white space.
+\fIlist\fP must not contain any blanks or other whitespace.
Examples: '\fB-e=cpu,node\fP' or '\fB--extended=cpu,node\fP'.
.TP
.BR \-h , " \-\-help"
Display help information and exit.
.TP
-.BR \-p , " \-\-parse " \fI[=list]\fP
+.BR \-p , " \-\-parse" [=\fIlist\fP]
Optimize the command output for easy parsing.
If the \fIlist\fP argument is omitted, the command output is compatible with earlier
-versions of \fBlscpu\fP. In this compatible format, two commas are used to separate
-CPU cache columns. If no CPU caches are identified the cache column is omitted.
+versions of \fBlscpu\fP. In this compatible format, two commas are used to separate
+CPU cache columns. If no CPU caches are identified the cache column is omitted.
.br
If the \fIlist\fP argument is used, cache columns are separated with a colon (:).
When specifying the \fIlist\fP argument, the string of option, equal sign (=), and
-\fIlist\fP must not contain any blanks or other white space.
+\fIlist\fP must not contain any blanks or other whitespace.
Examples: '\fB-p=cpu,node\fP' or '\fB--parse=cpu,node\fP'.
.TP
.BR \-s , " \-\-sysroot " \fIdirectory\fP
Gather CPU data for a Linux instance other than the instance from which the
-\fBlscpu\fP command is issued. The specified \fIdirectory\fP is the system root
+\fBlscpu\fP command is issued. The specified \fIdirectory\fP is the system root
of the Linux instance to be inspected.
.TP
.BR \-x , " \-\-hex"
@@ -130,7 +129,7 @@ the sets in list format (for example 0,1).
.BR \-V , " \-\-version"
Display version information and exit.
.SH BUGS
-The basic overview about CPU family, model, etc. is always based on the first
+The basic overview of CPU family, model, etc. is always based on the first
CPU only.
Sometimes in Xen Dom0 the kernel reports wrong data.
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #8: 0007-mkfs-indicate-that-specifying-fs-type-and-fs-options.patch --]
[-- Type: text/x-patch; name="0007-mkfs-indicate-that-specifying-fs-type-and-fs-options.patch", Size: 3441 bytes --]
From 27f83b88543791516af02fb11a676f996c739330 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Tue, 22 Jan 2013 11:56:58 +0100
Subject: [PATCH 07/10] mkfs: indicate that specifying fs-type and fs-options are independent
Also standardize and improve the help text, and slice it into strips
for ease of later translation maintenance.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
disk-utils/mkfs.8 | 2 +-
disk-utils/mkfs.c | 33 ++++++++++++++++-----------------
2 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/disk-utils/mkfs.8 b/disk-utils/mkfs.8
index af9304b..a4cdf71 100644
--- a/disk-utils/mkfs.8
+++ b/disk-utils/mkfs.8
@@ -7,7 +7,7 @@ mkfs \- build a Linux filesystem
.B mkfs
.RI [ options ]
.RB [ \-t
-.IR "type fs-options" ] " device " [ size ]
+.IR type "] [" fs-options ] " device " [ size ]
.SH DESCRIPTION
.B mkfs
is used to build a Linux filesystem on a device, usually
diff --git a/disk-utils/mkfs.c b/disk-utils/mkfs.c
index dc2d2fd..c34f9f6 100644
--- a/disk-utils/mkfs.c
+++ b/disk-utils/mkfs.c
@@ -35,20 +35,20 @@
static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
- fprintf(out,
- _("Usage: %s [options] [-t type fs-options] device [size]\n"),
- program_invocation_short_name);
-
- fprintf(out, _("\nOptions:\n"
- " -t, --type=TYPE file system type, when undefined ext2 is used\n"
- " fs-options parameters to real file system builder\n"
- " device path to a device\n"
- " size number of blocks on the device\n"
- " -V, --verbose explain what is done\n"
- " defining -V more than once will cause a dry-run\n"
- " -V, --version output version information and exit\n"
- " -V as version must be only option\n"
- " -h, --help display this help and exit\n"));
+ fprintf(out, _("Usage:\n"));
+ fprintf(out, _(" %s [options] [-t <type>] [fs-options] <device> [<size>]\n"),
+ program_invocation_short_name);
+
+ fprintf(out, _("\nOptions:\n"));
+ fprintf(out, _(" -t, --type=<type> filesystem type; when unspecified, ext2 is used\n"));
+ fprintf(out, _(" fs-options parameters for the real filesystem builder\n"));
+ fprintf(out, _(" <device> path to the device to be used\n"));
+ fprintf(out, _(" <size> number of blocks to be used on the device\n"));
+ fprintf(out, _(" -V, --verbose explain what is being done;\n"
+ " specifying -V more than once will cause a dry-run\n"));
+ fprintf(out, _(" -V, --version display version information and exit;\n"
+ " -V as --version must be the only option\n"));
+ fprintf(out, _(" -h, --help display this help text and exit\n"));
fprintf(out, _("\nFor more information see mkfs(8).\n"));
@@ -57,8 +57,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
static void __attribute__ ((__noreturn__)) print_version(void)
{
- printf(_("%s (%s)\n"),
- program_invocation_short_name, PACKAGE_STRING);
+ printf(UTIL_LINUX_VERSION);
exit(EXIT_SUCCESS);
}
@@ -128,7 +127,7 @@ int main(int argc, char **argv)
argv[--optind] = progname;
if (verbose) {
- printf(_("mkfs (%s)\n"), PACKAGE_STRING);
+ printf(UTIL_LINUX_VERSION);
i = optind;
while (argv[i])
printf("%s ", argv[i++]);
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #9: 0008-textual-standardize-the-reporting-of-program-name-pl.patch --]
[-- Type: text/x-patch; name="0008-textual-standardize-the-reporting-of-program-name-pl.patch", Size: 3056 bytes --]
From f6a271ee138847dd8c8446ee9859d0c56b71b336 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 23 Jan 2013 13:48:50 +0100
Subject: [PATCH 08/10] textual: standardize the reporting of program name plus package version
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
disk-utils/blockdev.c | 3 +--
disk-utils/elvtune.c | 2 +-
disk-utils/fsck.minix.c | 2 +-
disk-utils/mkfs.c | 2 +-
sys-utils/flock.c | 2 +-
text-utils/more.c | 2 +-
6 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/disk-utils/blockdev.c b/disk-utils/blockdev.c
index a9e8833..4543818 100644
--- a/disk-utils/blockdev.c
+++ b/disk-utils/blockdev.c
@@ -229,8 +229,7 @@ int main(int argc, char **argv)
/* -V not together with commands */
if (!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version")) {
- printf(_("%s (%s)\n"), program_invocation_short_name,
- PACKAGE_STRING);
+ printf(UTIL_LINUX_VERSION);
return EXIT_SUCCESS;
}
if (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help"))
diff --git a/disk-utils/elvtune.c b/disk-utils/elvtune.c
index 9f7fbf3..aa13c06 100644
--- a/disk-utils/elvtune.c
+++ b/disk-utils/elvtune.c
@@ -64,7 +64,7 @@ usage(void) {
static void
version(void) {
- fprintf(stderr, "elvtune (%s)\n", PACKAGE_STRING);
+ fprintf(stderr, UTIL_LINUX_VERSION);
}
int
diff --git a/disk-utils/fsck.minix.c b/disk-utils/fsck.minix.c
index 54e5918..fe92085 100644
--- a/disk-utils/fsck.minix.c
+++ b/disk-utils/fsck.minix.c
@@ -213,7 +213,7 @@ static void
die(const char *fmt, ...) {
va_list ap;
- fprintf(stderr, "%s: ", program_invocation_short_name);
+ fprintf(stderr, UTIL_LINUX_VERSION);
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
diff --git a/disk-utils/mkfs.c b/disk-utils/mkfs.c
index c34f9f6..8f7cde3 100644
--- a/disk-utils/mkfs.c
+++ b/disk-utils/mkfs.c
@@ -37,7 +37,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
fprintf(out, _("Usage:\n"));
fprintf(out, _(" %s [options] [-t <type>] [fs-options] <device> [<size>]\n"),
- program_invocation_short_name);
+ program_invocation_short_name);
fprintf(out, _("\nOptions:\n"));
fprintf(out, _(" -t, --type=<type> filesystem type; when unspecified, ext2 is used\n"));
diff --git a/sys-utils/flock.c b/sys-utils/flock.c
index 50435e0..6147e97 100644
--- a/sys-utils/flock.c
+++ b/sys-utils/flock.c
@@ -206,7 +206,7 @@ int main(int argc, char *argv[])
_("invalid exit code"));
break;
case 'V':
- printf("flock (%s)\n", PACKAGE_STRING);
+ printf(UTIL_LINUX_VERSION);
exit(EX_OK);
default:
/* optopt will be set if this was an unrecognized
diff --git a/text-utils/more.c b/text-utils/more.c
index 41caeb1..611bb82 100644
--- a/text-utils/more.c
+++ b/text-utils/more.c
@@ -564,7 +564,7 @@ void argscan(char *s)
case '\t':
break;
case 'V':
- printf(_("more (%s)\n"), PACKAGE_STRING);
+ printf(UTIL_LINUX_VERSION);
exit(EXIT_SUCCESS);
break;
default:
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #10: 0009-textual-slice-the-help-text-of-fsck-into-strips-for-.patch --]
[-- Type: text/x-patch; name="0009-textual-slice-the-help-text-of-fsck-into-strips-for-.patch", Size: 2902 bytes --]
From e43b5a06be595e48a5e883e673c98181c5477be3 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 23 Jan 2013 14:16:18 +0100
Subject: [PATCH 09/10] textual: slice the help text of fsck into strips, for translators
Also improve the descriptions a bit and alphabetize the options.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
disk-utils/fsck.c | 40 ++++++++++++++++++++--------------------
1 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/disk-utils/fsck.c b/disk-utils/fsck.c
index 6d50218..75971f8 100644
--- a/disk-utils/fsck.c
+++ b/disk-utils/fsck.c
@@ -1295,26 +1295,26 @@ static int check_all(void)
static void __attribute__((__noreturn__)) usage(void)
{
- printf(_("\nUsage:\n"
- " %s [options] [fs-options] [<filesystem>...]\n"),
- program_invocation_short_name);
-
- puts(_( "\nOptions:\n"
- " -A check all filesystems\n"
- " -R skip root filesystem; useful only with `-A'\n"
- " -M do not check mounted filesystems\n"
- " -t <type> specify filesystem types to be checked;\n"
- " type is allowed to be comma-separated list\n"
- " -P check filesystems in parallel, including root\n"
- " -r report statistics for each device fsck\n"
- " -s serialize fsck operations\n"
- " -l lock the device using flock()\n"
- " -N do not execute, just show what would be done\n"
- " -T do not show the title on startup\n"
- " -C [<fd>] display progress bar; file descriptor is for GUIs\n"
- " -V explain what is being done\n"
- " -? display this help and exit\n\n"
- "See fsck.* commands for fs-options."));
+ printf(_("\nUsage:\n"));
+ printf(_(" %s [options] [fs-options] [<filesystem>...]\n"),
+ program_invocation_short_name);
+
+ puts(_( "\nOptions:\n"));
+ puts(_( " -A check all filesystems\n"));
+ puts(_( " -C [<fd>] display progress bar; file descriptor is for GUIs\n"));
+ puts(_( " -l lock the device to guarantee exclusive access\n"));
+ puts(_( " -M do not check mounted filesystems\n"));
+ puts(_( " -N do not execute, just show what would be done\n"));
+ puts(_( " -P check filesystems in parallel, including root\n"));
+ puts(_( " -R skip root filesystem; useful only with '-A'\n"));
+ puts(_( " -r report statistics for each device checked\n"));
+ puts(_( " -s serialize the checking operations\n"));
+ puts(_( " -T do not show the title on startup\n"));
+ puts(_( " -t <type> specify filesystem types to be checked;\n"
+ " <type> is allowed to be a comma-separated list\n"));
+ puts(_( " -V explain what is being done\n"));
+ puts(_( " -? display this help and exit\n\n"));
+ puts(_( "See the specific fsck.* commands for available fs-options."));
exit(FSCK_EX_USAGE);
}
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #11: 0010-textual-slice-the-help-text-of-lscpu-into-strips-for.patch --]
[-- Type: text/x-patch; name="0010-textual-slice-the-help-text-of-lscpu-into-strips-for.patch", Size: 2230 bytes --]
From 4efc21a947626fa2c792f1db9daa70feb875b130 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 23 Jan 2013 14:50:02 +0100
Subject: [PATCH 10/10] textual: slice the help text of lscpu into strips, for translators
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
sys-utils/lscpu.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index 4de3186..824c8b7 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -1246,19 +1246,19 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
size_t i;
fputs(USAGE_HEADER, out);
- fprintf(out,
- _(" %s [options]\n"), program_invocation_short_name);
+ fprintf(out, _(" %s [options]\n"), program_invocation_short_name);
fputs(USAGE_OPTIONS, out);
- fputs(_(" -a, --all print online and offline CPUs (default for -e)\n"
- " -b, --online print online CPUs only (default for -p)\n"
- " -c, --offline print offline CPUs only\n"
- " -e, --extended[=<list>] print out an extended readable format\n"
- " -h, --help display this help text and exit\n"
- " -p, --parse[=<list>] print out a parsable format\n"
- " -s, --sysroot <dir> use specified directory as system root\n"
- " -V, --version display version information and exit\n"
- " -x, --hex print hexadecimal masks rather than lists of CPUs\n"), out);
+ fputs(_(" -a, --all print both online and offline CPUs (default for -e)\n"), out);
+ fputs(_(" -b, --online print online CPUs only (default for -p)\n"), out);
+ fputs(_(" -c, --offline print offline CPUs only\n"), out);
+ fputs(_(" -e, --extended[=<list>] print out an extended readable format\n"), out);
+ fputs(_(" -p, --parse[=<list>] print out a parsable format\n"), out);
+ fputs(_(" -s, --sysroot <dir> use specified directory as system root\n"), out);
+ fputs(_(" -x, --hex print hexadecimal masks rather than lists of CPUs\n"), out);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(USAGE_HELP, out);
+ fputs(USAGE_VERSION, out);
fprintf(out, _("\nAvailable columns:\n"));
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patches] some proper pluralization, and a bunch of textual fixes
2013-01-23 16:02 [patches] some proper pluralization, and a bunch of textual fixes Benno Schulenberg
@ 2013-01-25 16:36 ` Karel Zak
2013-01-25 17:17 ` Benno Schulenberg
2013-01-30 14:38 ` Karel Zak
1 sibling, 1 reply; 4+ messages in thread
From: Karel Zak @ 2013-01-25 16:36 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: Util-Linux
On Wed, Jan 23, 2013 at 05:02:30PM +0100, Benno Schulenberg wrote:
> The first two patches properly pluralize two error messages. The third
> patch makes some tiny grammar, style and punctuation tweaks to a few
> error messages. The fourth marks the filedescriptor as optional for the
> -C option of fsck, and adds some missing markup to the man page, corrects
> a word there, and expands an abbreviation for clarity. The ninth patch
> then slices the help text of fsck into single options, for ease of
> translation maintenance. (I hadn't seen Sami's survey request nor its
> results until today -- his request had landed in my spam folder. :|
> But I fully agree with the outcome.)
>
> The fifth patch corrects the description of the --sysroot option of lscpu,
> and the tenth patch then slices the text into single options.
>
> The sixth patch removes the incorrect spaces from "-e [=list]" and
> "-p [=list]" in the lscpu manpage, normalizes the spacing of the text,
> and corrects a word here and there. The seventh patch normalizes
> the help text of mkfs (using <type> instead of TYPE, for example),
> marks that -t and fs-options are independent (a distinction that has
> gone missing in a commit a year and a half ago), and slices it into
> strips. The eighth patch standardizes the version reporting to:
> "program from util-linux-x.xx.x".
It seems that Sami, you and I did the same changes. Please, can you
pull from upstream repo and rebase this set of the patches?
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patches] some proper pluralization, and a bunch of textual fixes
2013-01-25 16:36 ` Karel Zak
@ 2013-01-25 17:17 ` Benno Schulenberg
0 siblings, 0 replies; 4+ messages in thread
From: Benno Schulenberg @ 2013-01-25 17:17 UTC (permalink / raw)
To: Karel Zak; +Cc: Util-Linux
[-- Attachment #1: Type: text/plain, Size: 541 bytes --]
On Fri, Jan 25, 2013, at 17:36, Karel Zak wrote:
> On Wed, Jan 23, 2013 at 05:02:30PM +0100, Benno Schulenberg wrote:
> > The eighth patch standardizes the version reporting to:
> > "program from util-linux-x.xx.x".
>
> It seems that Sami, you and I did the same changes. Please, can you
> pull from upstream repo and rebase this set of the patches?
Yes, done.
Just patch 7 and 8 changed, the content of the others stayed the same,
so I attached just those two.
Benno
--
http://www.fastmail.fm - A fast, anti-spam email service.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0007-mkfs-indicate-that-specifying-fs-type-and-fs-options.patch --]
[-- Type: text/x-patch; name="0007-mkfs-indicate-that-specifying-fs-type-and-fs-options.patch", Size: 2909 bytes --]
From 16977c850251678707c39799d1cdb25b1c1af549 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Tue, 22 Jan 2013 11:56:58 +0100
Subject: [PATCH 07/10] mkfs: indicate that specifying fs-type and fs-options are independent
Also standardize and improve the help text, and slice it into strips
for ease of later translation maintenance.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
disk-utils/mkfs.8 | 2 +-
disk-utils/mkfs.c | 28 ++++++++++++++--------------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/disk-utils/mkfs.8 b/disk-utils/mkfs.8
index af9304b..a4cdf71 100644
--- a/disk-utils/mkfs.8
+++ b/disk-utils/mkfs.8
@@ -7,7 +7,7 @@ mkfs \- build a Linux filesystem
.B mkfs
.RI [ options ]
.RB [ \-t
-.IR "type fs-options" ] " device " [ size ]
+.IR type "] [" fs-options ] " device " [ size ]
.SH DESCRIPTION
.B mkfs
is used to build a Linux filesystem on a device, usually
diff --git a/disk-utils/mkfs.c b/disk-utils/mkfs.c
index 55506c0..c34f9f6 100644
--- a/disk-utils/mkfs.c
+++ b/disk-utils/mkfs.c
@@ -35,20 +35,20 @@
static void __attribute__ ((__noreturn__)) usage(FILE * out)
{
- fprintf(out,
- _("Usage: %s [options] [-t type fs-options] device [size]\n"),
- program_invocation_short_name);
-
- fprintf(out, _("\nOptions:\n"
- " -t, --type=TYPE file system type, when undefined ext2 is used\n"
- " fs-options parameters to real file system builder\n"
- " device path to a device\n"
- " size number of blocks on the device\n"
- " -V, --verbose explain what is done\n"
- " defining -V more than once will cause a dry-run\n"
- " -V, --version output version information and exit\n"
- " -V as version must be only option\n"
- " -h, --help display this help and exit\n"));
+ fprintf(out, _("Usage:\n"));
+ fprintf(out, _(" %s [options] [-t <type>] [fs-options] <device> [<size>]\n"),
+ program_invocation_short_name);
+
+ fprintf(out, _("\nOptions:\n"));
+ fprintf(out, _(" -t, --type=<type> filesystem type; when unspecified, ext2 is used\n"));
+ fprintf(out, _(" fs-options parameters for the real filesystem builder\n"));
+ fprintf(out, _(" <device> path to the device to be used\n"));
+ fprintf(out, _(" <size> number of blocks to be used on the device\n"));
+ fprintf(out, _(" -V, --verbose explain what is being done;\n"
+ " specifying -V more than once will cause a dry-run\n"));
+ fprintf(out, _(" -V, --version display version information and exit;\n"
+ " -V as --version must be the only option\n"));
+ fprintf(out, _(" -h, --help display this help text and exit\n"));
fprintf(out, _("\nFor more information see mkfs(8).\n"));
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0008-textual-standardize-the-reporting-of-program-name-pl.patch --]
[-- Type: text/x-patch; name="0008-textual-standardize-the-reporting-of-program-name-pl.patch", Size: 1737 bytes --]
From 60f4d0e365fa503d11496e37f3793ec6c8055365 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 23 Jan 2013 13:48:50 +0100
Subject: [PATCH 08/10] textual: standardize the reporting of program name plus package version
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
disk-utils/fsck.minix.c | 2 +-
sys-utils/flock.c | 3 +--
text-utils/more.c | 3 +--
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/disk-utils/fsck.minix.c b/disk-utils/fsck.minix.c
index 54e5918..fe92085 100644
--- a/disk-utils/fsck.minix.c
+++ b/disk-utils/fsck.minix.c
@@ -213,7 +213,7 @@ static void
die(const char *fmt, ...) {
va_list ap;
- fprintf(stderr, "%s: ", program_invocation_short_name);
+ fprintf(stderr, UTIL_LINUX_VERSION);
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
diff --git a/sys-utils/flock.c b/sys-utils/flock.c
index 11c44b6..6147e97 100644
--- a/sys-utils/flock.c
+++ b/sys-utils/flock.c
@@ -206,8 +206,7 @@ int main(int argc, char *argv[])
_("invalid exit code"));
break;
case 'V':
- printf(_("%s from %s\n"),
- program_invocation_short_name, PACKAGE_STRING);
+ printf(UTIL_LINUX_VERSION);
exit(EX_OK);
default:
/* optopt will be set if this was an unrecognized
diff --git a/text-utils/more.c b/text-utils/more.c
index 2c97950..b94ae49 100644
--- a/text-utils/more.c
+++ b/text-utils/more.c
@@ -568,8 +568,7 @@ void argscan(char *s)
case '\t':
break;
case 'V':
- printf(_("%s from %s\n"),
- program_invocation_short_name, PACKAGE_STRING);
+ printf(UTIL_LINUX_VERSION);
exit(EXIT_SUCCESS);
break;
default:
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patches] some proper pluralization, and a bunch of textual fixes
2013-01-23 16:02 [patches] some proper pluralization, and a bunch of textual fixes Benno Schulenberg
2013-01-25 16:36 ` Karel Zak
@ 2013-01-30 14:38 ` Karel Zak
1 sibling, 0 replies; 4+ messages in thread
From: Karel Zak @ 2013-01-30 14:38 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: Util-Linux
On Wed, Jan 23, 2013 at 05:02:30PM +0100, Benno Schulenberg wrote:
> The first two patches properly pluralize two error messages. The third
> patch makes some tiny grammar, style and punctuation tweaks to a few
> error messages. The fourth marks the filedescriptor as optional for the
> -C option of fsck, and adds some missing markup to the man page, corrects
> a word there, and expands an abbreviation for clarity. The ninth patch
> then slices the help text of fsck into single options, for ease of
> translation maintenance. (I hadn't seen Sami's survey request nor its
> results until today -- his request had landed in my spam folder. :|
> But I fully agree with the outcome.)
>
> The fifth patch corrects the description of the --sysroot option of lscpu,
> and the tenth patch then slices the text into single options.
>
> The sixth patch removes the incorrect spaces from "-e [=list]" and
> "-p [=list]" in the lscpu manpage, normalizes the spacing of the text,
> and corrects a word here and there. The seventh patch normalizes
> the help text of mkfs (using <type> instead of TYPE, for example),
> marks that -t and fs-options are independent (a distinction that has
> gone missing in a commit a year and a half ago), and slices it into
> strips. The eighth patch standardizes the version reporting to:
> "program from util-linux-x.xx.x".
Applied, thanks.
Note that
fputc(USAGE_SEPARATOR, out);
is incorrect, the separator is string, must be fputs().
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-30 14:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-23 16:02 [patches] some proper pluralization, and a bunch of textual fixes Benno Schulenberg
2013-01-25 16:36 ` Karel Zak
2013-01-25 17:17 ` Benno Schulenberg
2013-01-30 14:38 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox