pluralization, and some trifles along the way
PATCH 1/1 pluralization, and some trifles along the way
Hi,
Attached bunch of patches fix most of the issues reported by Petr Písař two days ago. It also fixes some small things I noticed along the way.
The patches are simple. The eighth and fifteenth patch are slightly special, as they don't consume all the arguments to fdisk_info() in the singular case; I haven't checked whether that actually works.
The help text of partx had a blank line after the three command options. Later the --update option was added, but *after* the blank line. The twelfth patch moves it to before the blank line, and even to before the --show option to harmonize better with the rest of the text. The patch also corrects the argument of the --output option, from <type> to <list>. Oh, and it tries to describe better what the TYPE column shows -- I'm not entirely sure about
this: I had to read the code to see what it was doing.
The thirteenth patch gettextizes an overlooked message, pluralizes it, and rewords it to avoid ambiguity (past tense/present tense).
Benno
Signature · 2 lines
http://www.fastmail.fm - One of many happy users: http://www.fastmail.fm/help/overview_quotes.html
From 707ca9f914048cb81ea49ee4c8a1bb19772ed638 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Fri, 4 Oct 2013 21:50:05 +0200
Subject: [PATCH 01/15] textual: end both the singular and the plural message with a period
--- libfdisk/src/gpt.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
libfdisk/src/gpt.c +1 -1
@@ -1530,7 +1530,7 @@ static int gpt_verify_disklabel(struct fdisk_context *cxt) free_sectors, nsegments, largest_segment); }else fdisk_warnx (cxt, -P_ ("%d error detected." ,"%s errors detected" , nerror), +P_ ("%d error detected." ,"%s errors detected." , nerror), nerror);return 0 ;
Signature · 1 line
1.7.0.4
From a730358750e0b60c7be3fe003caf2c2bd52df113 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Fri, 4 Oct 2013 21:59:02 +0200
Subject: [PATCH 02/15] hexsyntax: in help text, wrap argument of option -e in angular brackets
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
--- text-utils/hexsyntax.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
text-utils/hexsyntax.c +1 -1
@@ -147,7 +147,7 @@ void __attribute__((__noreturn__)) usage(FILE *out)fputs (_ (" -d, --two-bytes-decimal two-byte decimal display\n" ), out);fputs (_ (" -o, --two-bytes-octal two-byte octal display\n" ), out);fputs (_ (" -x, --two-bytes-hex two-byte hexadecimal display\n" ), out); -fputs (_ (" -e, --format format format string to be used for displaying data\n" ), out); +fputs (_ (" -e, --format <format> format string to be used for displaying data\n" ), out);fputs (_ (" -f, --format-file <file> file that contains format strings\n" ), out);fputs (_ (" -n, --length <length> interpret only length bytes of input\n" ), out);fputs (_ (" -s, --skip <offset> skip offset bytes from the beginning\n" ), out);
Signature · 1 line
1.7.0.4
From d3bbfbbadfd4eb0f2dd0b501902c8e1744b408e8 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Fri, 4 Oct 2013 22:03:58 +0200
Subject: [PATCH 03/15] textual: properly use uppercase in certain abbreviations
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
--- sys-utils/dmesg.c | 2 +- sys-utils/lscpu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
sys-utils/dmesg.c +1 -1
@@ -115,7 +115,7 @@ static const struct dmesg_name facility_names[] = [FAC_BASE(LOG_UUCP)] = { "uucp", N_("UUCP subsystem") }, [FAC_BASE(LOG_CRON)] = { "cron", N_("clock daemon") }, [FAC_BASE(LOG_AUTHPRIV)] = { "authpriv", N_("security/authorization messages (private)") }, - [FAC_BASE(LOG_FTP)] = { "ftp", N_("ftp daemon") }, + [FAC_BASE(LOG_FTP)] = { "ftp", N_("FTP daemon") }, };/* supported methods to read message buffer
sys-utils/lscpu.c +2 -2
@@ -257,8 +257,8 @@ static struct lscpu_coldesc coldescs[] = [COL_ADDRESS] = { "ADDRESS", N_("physical address of a CPU") }, [COL_CONFIGURED] = { "CONFIGURED", N_("shows if the hypervisor has allocated the CPU") }, [COL_ONLINE] = { "ONLINE", N_("shows if Linux currently makes use of the CPU") }, - [COL_MAXMHZ] = { "MAXMHZ", N_("shows the maximum mhz of the CPU") }, - [COL_MINMHZ ] = {"MINMHZ" ,N_ ("shows the minimum mhz of the CPU" ) } + [COL_MAXMHZ] = { "MAXMHZ", N_("shows the maximum MHz of the CPU") }, + [COL_MINMHZ ] = {"MINMHZ" ,N_ ("shows the minimum MHz of the CPU" ) } }; static int
Signature · 1 line
1.7.0.4
From a09d9ba107f5b3ed820cd7d2f0114cab807a453c Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Fri, 4 Oct 2013 22:15:15 +0200
Subject: [PATCH 04/15] mcookie: pluralize two messages
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
--- misc-utils/mcookie.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
misc-utils/mcookie.c +6 -4
@@ -147,8 +147,9 @@ int main(int argc, char **argv) count =hash_file (&ctx, fd);if (verbose)fprintf (stderr, -_ ("Got %d bytes from %s\n" ), count, - file); +P_ ("Got %d byte from %s\n" , +"Got %d bytes from %s\n" , count), + count, file);if (fd !=STDIN_FILENO )if (close (fd))
@@ -171,8 +172,9 @@ int main(int argc, char **argv)close (fd);if (verbose)fprintf (stderr, -_ ("Got %d bytes from %s\n" ), r, - rngs[i].path); +P_ ("Got %d byte from %s\n" , +"Got %d bytes from %s\n" , r), + r, rngs[i].path);if (rngs[i].minlength && r >= rngs[i].minlength)break ; }else if (verbose)
Signature · 1 line
1.7.0.4
From cd59d915d5a0377aa1de63f3915083ea5f393e43 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Fri, 4 Oct 2013 22:27:51 +0200
Subject: [PATCH 05/15] su-common: pluralize one message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
--- login-utils/su-common.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
login-utils/su-common.c +3 -1
@@ -807,7 +807,9 @@ su_main (int argc, char **argv, int mode) num_supp_groups++;if (num_supp_groups >=NGROUPS_MAX )errx (EXIT_FAILURE , -_ ("can't specify more than %d supplemental groups" ), +P_ ("specifying more than %d supplemental group is not possible" , +"specifying more than %d supplemental groups is not possible" , +NGROUPS_MAX -1 ),NGROUPS_MAX -1 ); gr =getgrnam (optarg);if (!gr)
Signature · 1 line
1.7.0.4
From b71b9bdadfb9efb7a2b9851aabf46f071c8b8d62 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Fri, 4 Oct 2013 22:32:56 +0200
Subject: [PATCH 06/15] wipefs: pluralize one message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
--- misc-utils/wipefs.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
misc-utils/wipefs.c +4 -2
@@ -308,8 +308,10 @@ static void do_wipe_real(blkid_probe pr, const char *devname,if (flags &WP_FL_QUIET )return ; -printf (_ ("%s: %zd bytes were erased at offset 0x%08jx (%s): " ), - devname, w->len, w->offset, w->type); +printf (P_ ("%s: %zd byte was erased at offset 0x%08jx (%s): " , +"%s: %zd bytes were erased at offset 0x%08jx (%s): " , + w->len), + devname, w->len, w->offset, w->type);for (i =0 ; i < w->len; i++) {printf ("%02x" , w->magic[i]);
Signature · 1 line
1.7.0.4
From 72e2a8084cb30750a3ec81b8e54418697481054b Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Fri, 4 Oct 2013 22:44:28 +0200
Subject: [PATCH 07/15] mkfs.minix: properly pluralize four messages
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
--- disk-utils/mkfs.minix.c | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-)
disk-utils/mkfs.minix.c +6 -10
@@ -541,8 +541,8 @@ static void setup_tables(void) {err (MKFS_EX_ERROR ,_ ("%s: unable to allocate buffer for inodes" ), device_name);memset (inode_buffer,0 ,get_inode_buffer_size ()); -printf (_ ("%lu inodes\n" ), inodes); -printf (_ ("%lu blocks\n" ), zones); +printf (P_ ("%lu inode\n" ,"%lu inodes\n" , inodes), inodes); +printf (P_ ("%lu block\n" ,"%lu blocks\n" , zones), zones);printf (_ ("Firstdatazone=%jd (%jd)\n" ),get_first_zone (),first_zone_data ());printf (_ ("Zonesize=%zu\n" ), (size_t )MINIX_BLOCK_SIZE <<get_zone_size ());printf (_ ("Maxsize=%zu\n\n" ),get_max_size ());
@@ -614,10 +614,8 @@ static void check_blocks(void) { badblocks++; currently_testing++; } -if (badblocks >1 ) -printf (_ ("%d bad blocks\n" ), badblocks); -else if (badblocks ==1 ) -printf (_ ("one bad block\n" )); +if (badblocks >0 ) +printf (P_ ("%d bad block\n" ,"%d bad blocks\n" , badblocks), badblocks); }static void get_list_blocks (char *filename) {
@@ -640,10 +638,8 @@ static void get_list_blocks(char *filename) { }fclose (listfile); -if (badblocks >1 ) -printf (_ ("%d bad blocks\n" ), badblocks); -else if (badblocks ==1 ) -printf (_ ("one bad block\n" )); +if (badblocks >0 ) +printf (P_ ("%d bad block\n" ,"%d bad blocks\n" , badblocks), badblocks); }int main (int argc,char ** argv) {
Signature · 1 line
1.7.0.4
From 2b19ac57c12fe7bb80fccdb7fceceac445ceef63 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 5 Oct 2013 10:43:40 +0200
Subject: [PATCH 08/15] libfdisk/sgi: properly pluralize three messages
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
--- libfdisk/src/sgi.c | 32 ++++++++++++++++++++------------ 1 files changed, 20 insertions(+), 12 deletions(-)
libfdisk/src/sgi.c +20 -12
@@ -417,8 +417,10 @@ static int sgi_check_bootfile(struct fdisk_context *cxt, const char *name)return -EINVAL ; }else if (sz >sizeof (sgilabel->boot_file)) { -fdisk_warnx (cxt,_ ("Name of Bootfile too long: %zu bytes maximum." ), -sizeof (sgilabel->boot_file)); +fdisk_warnx (cxt,P_ ("Name of bootfile is too long: %zu byte maximum." , +"Name of bootfile is too long: %zu bytes maximum." , +sizeof (sgilabel->boot_file)), +sizeof (sgilabel->boot_file));return -EINVAL ; }else if (*name !='/' ) {
@@ -656,19 +658,23 @@ static int verify_disklabel(struct fdisk_context *cxt, int verbose)continue ;if (start >sgi_get_start_sector (cxt, Index[i])) {if (verbose) -fdisk_info (cxt,_ ("The Partition %d and %d overlap " -"by %d sectors." ), - Index[i-1 ]+1 , Index[i]+1 , - start -sgi_get_start_sector (cxt, Index[i])); +fdisk_info (cxt, +P_ ("Partitions %d and %d overlap by %d sector." , +"Partitions %d and %d overlap by %d sectors." , + start -sgi_get_start_sector (cxt, Index[i])), + Index[i-1 ]+1 , Index[i]+1 , + start -sgi_get_start_sector (cxt, Index[i]));if (gap >0 ) gap = -gap;if (gap ==0 ) gap =-1 ; }if (start <sgi_get_start_sector (cxt, Index[i])) {if (verbose) -fdisk_info (cxt,_ ("Unused gap of %8u sectors " -"- sectors %8u-%u" ), -sgi_get_start_sector (cxt, Index[i]) - start, - start,sgi_get_start_sector (cxt, Index[i])-1 ); +fdisk_info (cxt, +P_ ("Unused gap of %8u sector: sector %8u" , +"Unused gap of %8u sectors: sectors %8u-%u" , +sgi_get_start_sector (cxt, Index[i]) - start), +sgi_get_start_sector (cxt, Index[i]) - start, + start,sgi_get_start_sector (cxt, Index[i])-1 ); gap +=sgi_get_start_sector (cxt, Index[i]) - start;add_to_freelist (cxt, start,sgi_get_start_sector (cxt, Index[i]));
@@ -686,8 +692,10 @@ static int verify_disklabel(struct fdisk_context *cxt, int verbose) }if (start < lastblock) {if (verbose) -fdisk_info (cxt,_ ("Unused gap of %8u sectors - sectors %8u-%u" ), - lastblock - start, start, lastblock-1 ); +fdisk_info (cxt,P_ ("Unused gap of %8u sector: sector %8u" , +"Unused gap of %8u sectors: sectors %8u-%u" , + lastblock - start), + lastblock - start, start, lastblock-1 ); gap += lastblock - start;add_to_freelist (cxt, start, lastblock); }
Signature · 1 line
1.7.0.4
From df27843a2efb5a53664896778d40778c2f9d3376 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 5 Oct 2013 11:01:28 +0200
Subject: [PATCH 09/15] libfdisk/sgi: tweak and harmonize some comments
--- libfdisk/src/sgi.c | 40 +++++++++++++++++----------------------- 1 files changed, 17 insertions(+), 23 deletions(-)
libfdisk/src/sgi.c +17 -23
@@ -3,12 +3,12 @@* Copyright (C) 2012 Davidlohr Bueso <[email protected]> * 2013 Karel Zak <[email protected]> * -* This is re-written version for libfdisk, the original was fdisksgilabel.c +* This is a re-written version for libfdisk, the original was fdisksgilabel.c * from util-linux fdisk, by: * -* Andreas Neuper, Sep 1998. -* Arnaldo Carvalho de Melo <[email protected]>, Mar 1999 -* Phillip Kesling <[email protected]>, Mar 2003 +* Andreas Neuper, Sep 1998, +* Arnaldo Carvalho de Melo <[email protected]>, Mar 1999, +* Phillip Kesling <[email protected]>, Mar 2003. */ #include "c.h" #include "nls.h"
@@ -62,7 +62,7 @@ static unsigned int sgi_get_num_sectors(struct fdisk_context *cxt, int i );static int sgi_get_bootpartition (struct fdisk_context *cxt);static int sgi_get_swappartition (struct fdisk_context *cxt); -/* return poiter buffer with on-disk data */ +/* Returns a pointer buffer with on-disk data. */ static inline struct sgi_disklabel *self_disklabel (struct fdisk_context *cxt) {assert (cxt);
@@ -72,7 +72,7 @@ static inline struct sgi_disklabel *self_disklabel(struct fdisk_context *cxt)return ((struct fdisk_sgi_label *) cxt->label)->header; } -/* return in-memory fdisk data */ +/* Returns in-memory fdisk data. */ static inline struct fdisk_sgi_label *self_label (struct fdisk_context *cxt) {assert (cxt);
@@ -433,8 +433,7 @@ static int sgi_check_bootfile(struct fdisk_context *cxt, const char *name)fdisk_warnx (cxt,_ ("Be aware, that the bootfile is not checked " "for existence. SGI's default is \"/unix\" and for " "backup \"/unix.save\"." )); -/* filename is correct and did change */ -return 0 ; +return 0 ;/* filename is correct and did change */ }return 1 ;/* filename did not change */
@@ -493,8 +492,8 @@ static int sgi_write_disklabel(struct fdisk_context *cxt) goto err;if (!strncmp ((char *) sgilabel->volume[0 ].name,"sgilabel" ,8 )) {/* -* keep this habit of first writing the "sgilabel". -* I never tested whether it works without (AN 981002). +* Keep this habit of first writing the "sgilabel". +* I never tested whether it works without. (AN 1998-10-02) */ int infostartblock =be32_to_cpu (sgilabel->volume[0 ].block_num);
@@ -520,8 +519,8 @@ static int compare_start(struct fdisk_context *cxt, const void *x, const void *y) {/* -* sort according to start sectors and prefers largest partition: entry -* zero is entire disk entry +* Sort according to start sectors and prefer the largest partition: +* entry zero is the entire-disk entry. */ unsigned int i = *(int *) x;unsigned int j = *(int *) y;
@@ -656,6 +655,7 @@ static int verify_disklabel(struct fdisk_context *cxt, int verbose)/* We cannot handle several "entire disk" entries. */ if (sgi_get_sysid (cxt, Index[i]) ==SGI_TYPE_ENTIRE_DISK )continue ; +if (start >sgi_get_start_sector (cxt, Index[i])) {if (verbose) fdisk_info(cxt,
@@ -681,7 +681,7 @@ static int verify_disklabel(struct fdisk_context *cxt, int verbose) } start =sgi_get_start_sector (cxt, Index[i]) +sgi_get_num_sectors (cxt, Index[i]); -/* Align free space on cylinder boundary */ +/* Align free space on cylinder boundary. */ if (cylsize && start % cylsize) start += cylsize - (start % cylsize);
@@ -700,7 +700,7 @@ static int verify_disklabel(struct fdisk_context *cxt, int verbose)add_to_freelist (cxt, start, lastblock); }/* -* Done with arithmetics. Go for details now +* Done with arithmetics. Go for details now. */ if (verbose) { if (sgi_get_bootpartition(cxt) < 0
@@ -739,7 +739,7 @@ static int sgi_gaps(struct fdisk_context *cxt)return verify_disklabel (cxt,0 ); } -/* returns partition index of first entry marked as entire disk */ +/* Returns partition index of first entry marked as entire disk. */ static int sgi_entire (struct fdisk_context *cxt) {size_t i;
@@ -794,10 +794,7 @@ static void sgi_set_volhdr(struct fdisk_context *cxt)for (n =8 ; n < cxt->label->nparts_max; n++) {if (!sgi_get_num_sectors (cxt, n)) { -/* -* Choose same default volume header size -* as IRIX fx uses. -*/ +/* Choose same default volume header size as IRIX fx uses. */ if (4096 <sgi_get_lastblock (cxt))sgi_set_partition (cxt, n,0 ,4096 ,SGI_TYPE_VOLHDR );break ;
@@ -1103,7 +1100,6 @@ static int sgi_get_partition_status(size_t i, int *status) { -assert (cxt );assert (fdisk_is_disklabel (cxt,SGI ));
@@ -1166,9 +1162,7 @@ static const struct fdisk_label_operations sgi_operations = .part_toggle_flag = sgi_toggle_partition_flag }; -/* -* allocates SGI label driver -*/ +/* Allocates an SGI label driver. */ struct fdisk_label *fdisk_new_sgi_label (struct fdisk_context *cxt) {struct fdisk_label *lb;
Signature · 1 line
1.7.0.4
From 3fda7d86d4e4c2689da14ed64528cd8a1ac177d3 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 5 Oct 2013 11:22:53 +0200
Subject: [PATCH 10/15] libfdisk/sgi: tweak and harmonize some message strings
Using consistent capitals and lowercase, adding missing periods and a missing space, repositioning commas for clarity, improving grammar, and aligning substrings for esthetics.
--- libfdisk/src/sgi.c | 51 +++++++++++++++++++++++++-------------------------- 1 files changed, 25 insertions(+), 26 deletions(-)
libfdisk/src/sgi.c +25 -26
133 lines not on this page · raw message
Signature · 1 line
1.7.0.4
From d9a4c2348ab9efbb513cf6e6771e414061bedd41 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 5 Oct 2013 11:37:48 +0200
Subject: [PATCH 11/15] partx: pluralize one message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
--- disk-utils/partx.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
disk-utils/partx.c +3 -1
@@ -523,7 +523,9 @@ static int list_parts(blkid_partlist ls, int lower, int upper) start =blkid_partition_get_start (par); size =blkid_partition_get_size (par); -printf (_ ("#%2d: %9ju-%9ju (%9ju sectors, %6ju MB)\n" ), +printf (P_ ("#%2d: %9ju-%9ju (%9ju sector, %6ju MB)\n" , +"#%2d: %9ju-%9ju (%9ju sectors, %6ju MB)\n" , + size), n, start, start + size -1 , size, (size <<9 ) /1000000 ); }
Signature · 1 line
1.7.0.4
From 3c698d18239088b0fc565f433094ad293fd82e98 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 5 Oct 2013 12:01:32 +0200
Subject: [PATCH 12/15] partx: correct three messages
Properly describing the partition type, using a verb instead of a noun, putting the blank line after the command options, and using the correct argument for --output.
--- disk-utils/partx.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
disk-utils/partx.c +4 -4
@@ -86,7 +86,7 @@ struct colinfo infos[] = { [COL_UUID] = { "UUID", 36, 0, N_("partition UUID")}, [COL_SCHEME] = { "SCHEME", 0.1, TT_FL_TRUNC, N_("partition table type (dos, gpt, ...)")}, [COL_FLAGS] = { "FLAGS", 0.1, TT_FL_TRUNC, N_("partition flags")}, - [COL_TYPE] = { "TYPE", 1, TT_FL_RIGHT, N_("partition type hex or uuid")}, + [COL_TYPE] = { "TYPE", 1, TT_FL_RIGHT, N_("partition type (a string, a UUID, or hex)")}, };#define NCOLS ARRAY_SIZE(infos)
@@ -121,7 +121,7 @@ static void assoc_loopdev(const char *fname) rc =loopcxt_setup_device (&lc);if (rc == -EBUSY ) -err (EXIT_FAILURE ,_ ("%s: failed to setup loop device" ), fname); +err (EXIT_FAILURE ,_ ("%s: failed to set up loop device" ), fname); loopdev =1 ; }
@@ -700,12 +700,12 @@ static void __attribute__((__noreturn__)) usage(FILE *out)fputs (USAGE_OPTIONS , out);fputs (_ (" -a, --add add specified partitions or all of them\n" ), out);fputs (_ (" -d, --delete delete specified partitions or all of them\n" ), out); -fputs (_ (" -s, --show list partitions\n\n" ), out);fputs (_ (" -u, --update update specified partitions or all of them\n" ), out); +fputs (_ (" -s, --show list partitions\n\n" ), out);fputs (_ (" -b, --bytes print SIZE in bytes rather than in human readable format\n" ), out);fputs (_ (" -g, --noheadings don't print headings for --show\n" ), out);fputs (_ (" -n, --nr <n:m> specify the range of partitions (e.g. --nr 2:4)\n" ), out); -fputs (_ (" -o, --output <type> define which output columns to use\n" ), out); +fputs (_ (" -o, --output <list> define which output columns to use\n" ), out);fputs (_ (" -P, --pairs use key=\"value\" output format\n" ), out);fputs (_ (" -r, --raw use raw output format\n" ), out);fputs (_ (" -t, --type <type> specify the partition type (dos, bsd, solaris, etc.)\n" ), out);
Signature · 1 line
1.7.0.4
From 87ff1ca482602f8d4a6dc837f6527d53ed6989e2 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 5 Oct 2013 23:12:23 +0200
Subject: [PATCH 13/15] wdctl: gettextize and pluralize one forgotten message
--- sys-utils/wdctl.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
sys-utils/wdctl.c +2 -1
@@ -334,7 +334,8 @@ static int set_watchdog(struct wdinfo *wd, int timeout)if (close_fd (fd))warn (_ ("write failed" ));sigprocmask (SIG_SETMASK , &oldsigs,NULL ); -printf ("Set timeout to %d seconds\n" , timeout); +printf (P_ ("Timeout has been set to %d second.\n" , +"Timeout has been set to %d seconds.\n" , timeout), timeout);return rc; }
Signature · 1 line
1.7.0.4
From 376ca54fa3e658d24b945687edad08a00fecf79d Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 5 Oct 2013 23:19:55 +0200
Subject: [PATCH 14/15] wdctl: pluralize one thrice-repeated message
Also put in one hard space, to keep text and number separated when the translated string should be too long.
--- sys-utils/wdctl.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
sys-utils/wdctl.c +6 -3
@@ -450,11 +450,14 @@ static void print_oneline(struct wdinfo *wd, uint32_t wanted,static void show_timeouts (struct wdinfo *wd) {if (wd->has_timeout) -printf (_ ("%-15s%2i seconds\n" ),_ ("Timeout:" ), wd->timeout); +printf (P_ ("%-14s %2i second\n" ,"%-14s %2i seconds\n" , wd->timeout), +_ ("Timeout:" ), wd->timeout);if (wd->has_pretimeout) -printf (_ ("%-15s%2i seconds\n" ),_ ("Pre-timeout:" ), wd->pretimeout); +printf (P_ ("%-14s %2i second\n" ,"%-14s %2i seconds\n" , wd->pretimeout), +_ ("Pre-timeout:" ), wd->pretimeout);if (wd->has_timeleft) -printf (_ ("%-15s%2i seconds\n" ),_ ("Timeleft:" ), wd->timeleft); +printf (P_ ("%-14s %2i second\n" ,"%-14s %2i seconds\n" , wd->timeleft), +_ ("Timeleft:" ), wd->timeleft); }int main (int argc,char *argv[])
Signature · 1 line
1.7.0.4
From 65697521041228328260dafea8e0037c17c45485 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sun, 6 Oct 2013 11:49:54 +0200
Subject: [PATCH 15/15] libfdisk/gpt: partly pluralize one message
And don't mention the largest when there is only one segment.
--- libfdisk/src/gpt.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
libfdisk/src/gpt.c +5 -3
@@ -1525,9 +1525,11 @@ static int gpt_verify_disklabel(struct fdisk_context *cxt) free_sectors =get_free_sectors (cxt, gpt->pheader, gpt->ents, &nsegments, &largest_segment); -fdisk_info (cxt,_ ("A total of %ld free sectors available in %d segment(s) " -"(largest %ld)." ), - free_sectors, nsegments, largest_segment); +fdisk_info (cxt, +P_ ("A total of %ld free sectors is available in %d segment." , +"A total of %ld free sectors is available in %d segments " +"(the largest is %ld)." , nsegments), + free_sectors, nsegments, largest_segment); } elsefdisk_warnx (cxt , P_("%d error detected.", "%s errors detected.", nerror),
Signature · 1 line
1.7.0.4
Quoted 2 lines · Benno Schulenberg
Attached bunch of patches fix most of the issues reported by Petr Písař two days ago. It also fixes some small things I noticed along the way.
Applied, thanks.
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com