]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
po: remove possibility to translate static option arguments
authorSami Kerola <kerolasa@iki.fi>
Wed, 21 Aug 2019 19:25:31 +0000 (20:25 +0100)
committerSami Kerola <kerolasa@iki.fi>
Sat, 24 Aug 2019 08:29:52 +0000 (09:29 +0100)
These strings are expected to be wrote exactly as they are parsed, so make
translating them impossible.  Since mkfs.cramfs -N option arguments need
this treatment use opportunity to slice usage() output to multiple lines.

Addresses: https://bugs.debian.org/907568
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
disk-utils/cfdisk.c
disk-utils/fdisk.c
disk-utils/mkfs.cramfs.c
disk-utils/sfdisk.c
misc-utils/cal.c
sys-utils/dmesg.c

index 61f3258b3ceb0889294f105e49cb672200e2301c..b219b2c62199d07ec22bf6e29cc17e7184b14a1f 100644 (file)
@@ -2635,7 +2635,8 @@ static void __attribute__((__noreturn__)) usage(void)
        fputs(_("Display or manipulate a disk partition table.\n"), out);
 
        fputs(USAGE_OPTIONS, out);
-       fputs(_(" -L, --color[=<when>]     colorize output (auto, always or never)\n"), out);
+       fprintf(out,
+             _(" -L, --color[=<when>]     colorize output (%s, %s or %s)\n"), "auto", "always", "never");
        fprintf(out,
                "                            %s\n", USAGE_COLORS_DEFAULT);
        fputs(_(" -z, --zero               start with zeroed partition table\n"), out);
index 380f3f445a2c931d21f65da1a4df2aec886c838e..95eac8feee68658cd533853289d7ff061487d704 100644 (file)
@@ -825,7 +825,8 @@ static void __attribute__((__noreturn__)) usage(void)
        fputs(_(" -b, --sector-size <size>      physical and logical sector size\n"), out);
        fputs(_(" -B, --protect-boot            don't erase bootbits when creating a new label\n"), out);
        fputs(_(" -c, --compatibility[=<mode>]  mode is 'dos' or 'nondos' (default)\n"), out);
-       fputs(_(" -L, --color[=<when>]          colorize output (auto, always or never)\n"), out);
+       fprintf(out,
+             _(" -L, --color[=<when>]          colorize output (%s, %s or %s)\n"), "auto", "always", "never");
        fprintf(out,
                "                                 %s\n", USAGE_COLORS_DEFAULT);
        fputs(_(" -l, --list                    display partitions and exit\n"), out);
@@ -834,8 +835,10 @@ static void __attribute__((__noreturn__)) usage(void)
        fputs(_(" -u, --units[=<unit>]          display units: 'cylinders' or 'sectors' (default)\n"), out);
        fputs(_(" -s, --getsz                   display device size in 512-byte sectors [DEPRECATED]\n"), out);
        fputs(_("     --bytes                   print SIZE in bytes rather than in human readable format\n"), out);
-       fputs(_(" -w, --wipe <mode>             wipe signatures (auto, always or never)\n"), out);
-       fputs(_(" -W, --wipe-partitions <mode>  wipe signatures from new partitions (auto, always or never)\n"), out);
+       fprintf(out,
+             _(" -w, --wipe <mode>             wipe signatures (%s, %s or %s)\n"), "auto", "always", "never");
+       fprintf(out,
+             _(" -W, --wipe-partitions <mode>  wipe signatures from new partitions (%s, %s or %s)\n"), "auto", "always", "never");
 
        fputs(USAGE_SEPARATOR, out);
        fputs(_(" -C, --cylinders <number>      specify the number of cylinders\n"), out);
index 71320a0a9e63c816aa32ecde02c25182acfde670..e6afd2df0f73678d4e89dc76627477ae1f4a9b18 100644 (file)
@@ -124,24 +124,24 @@ struct entry {
 
 static void __attribute__((__noreturn__)) usage(void)
 {
-       printf(
-               _("usage: %s [-h] [-v] [-b blksize] [-e edition] [-N endian] [-i file] "
-                 "[-n name] dirname outfile\n"
-                 " -v         be verbose\n"
-                 " -E         make all warnings errors "
-                   "(non-zero exit status)\n"
-                 " -b blksize use this blocksize, must equal page size\n"
-                 " -e edition set edition number (part of fsid)\n"
-                 " -N endian  set cramfs endianness (big|little|host), default host\n"
-                 " -i file    insert a file image into the filesystem\n"
-                 " -n name    set name of cramfs filesystem\n"
-                 " -p         pad by %d bytes for boot code\n"
-                 " -s         sort directory entries (old option, ignored)\n"
-                 " -z         make explicit holes\n"
-                 " dirname    root of the filesystem to be compressed\n"
-                 " outfile    output file\n"),
-               program_invocation_short_name, PAD_SIZE);
-
+       fputs(USAGE_HEADER, stdout);
+       printf(_(" %s [-h] [-v] [-b blksize] [-e edition] [-N endian] [-i file] [-n name] dirname outfile\n"),
+               program_invocation_short_name);
+       fputs(USAGE_SEPARATOR, stdout);
+       puts(_("Make compressed ROM file system."));
+       fputs(USAGE_OPTIONS, stdout);
+       puts(_(  " -v             be verbose"));
+       puts(_(  " -E             make all warnings errors (non-zero exit status)"));
+       puts(_(  " -b blksize     use this blocksize, must equal page size"));
+       puts(_(  " -e edition     set edition number (part of fsid)"));
+       printf(_(" -N endian      set cramfs endianness (%s|%s|%s), default %s\n"), "big", "little", "host", "host");
+       puts(_(  " -i file        insert a file image into the filesystem"));
+       puts(_(  " -n name        set name of cramfs filesystem"));
+       printf(_(" -p             pad by %d bytes for boot code\n"), PAD_SIZE);
+       puts(_(  " -s             sort directory entries (old option, ignored)"));
+       puts(_(  " -z             make explicit holes"));
+       puts(_(  " dirname        root of the filesystem to be compressed"));
+       puts(_(  " outfile        output file"));
        fputs(USAGE_SEPARATOR, stdout);
        printf(USAGE_HELP_OPTIONS(16));
        printf(USAGE_MAN_TAIL("mkfs.cramfs(8)"));
index 5e2d9adf7646e3a53dfaed15ee540f17729ecd56..7386147a82c45bd09303d32d23fda00f12304fc5 100644 (file)
@@ -1877,7 +1877,8 @@ static void __attribute__((__noreturn__)) usage(void)
        fputs(_("     --bytes               print SIZE in bytes rather than in human readable format\n"), out);
        fputs(_("     --move-data[=<typescript>] move partition data after relocation (requires -N)\n"), out);
        fputs(_(" -f, --force               disable all consistency checking\n"), out);
-       fputs(_("     --color[=<when>]      colorize output (auto, always or never)\n"), out);
+       fprintf(out,
+             _("     --color[=<when>]      colorize output (%s, %s or %s)\n"), "auto", "always", "never");
        fprintf(out,
                "                             %s\n", USAGE_COLORS_DEFAULT);
        fputs(_(" -N, --partno <num>        specify partition number\n"), out);
@@ -1887,8 +1888,10 @@ static void __attribute__((__noreturn__)) usage(void)
        fputs(_(" -O, --backup-file <path>  override default backup file name\n"), out);
        fputs(_(" -o, --output <list>       output columns\n"), out);
        fputs(_(" -q, --quiet               suppress extra info messages\n"), out);
-       fputs(_(" -w, --wipe <mode>         wipe signatures (auto, always or never)\n"), out);
-       fputs(_(" -W, --wipe-partitions <mode>  wipe signatures from new partitions (auto, always or never)\n"), out);
+       fprintf(out,
+             _(" -w, --wipe <mode>         wipe signatures (%s, %s or %s)\n"), "auto", "always", "never");
+       fprintf(out,
+             _(" -W, --wipe-partitions <mode>  wipe signatures from new partitions (%s, %s or %s)\n"), "auto", "always", "never");
        fputs(_(" -X, --label <name>        specify label type (dos, gpt, ...)\n"), out);
        fputs(_(" -Y, --label-nested <name> specify nested label type (dos, bsd)\n"), out);
        fputs(USAGE_SEPARATOR, out);
index 1d4d241345659969f1b5df4e377befe5125dd07b..ca8e42e504626e9203afcb7cbe64f62dbf9b152c 100644 (file)
@@ -1133,7 +1133,8 @@ static void __attribute__((__noreturn__)) usage(void)
        fputs(_(" -y, --year            show the whole year\n"), out);
        fputs(_(" -Y, --twelve          show the next twelve months\n"), out);
        fputs(_(" -w, --week[=<num>]    show US or ISO-8601 week numbers\n"), out);
-       fputs(_("     --color[=<when>]  colorize messages (auto, always or never)\n"), out);
+       fprintf(out,
+             _("     --color[=<when>]  colorize messages (%s, %s or %s)\n"), "auto", "always", "never");
        fprintf(out,
                "                         %s\n", USAGE_COLORS_DEFAULT);
 
index 9f2e5b8042a842e828f0e29f6311e8afc15921cf..d12ca8025a9d6cc5d966fa1bb50d7c2f6bd2ac92 100644 (file)
@@ -277,7 +277,8 @@ static void __attribute__((__noreturn__)) usage(void)
        fputs(_(" -f, --facility <list>       restrict output to defined facilities\n"), out);
        fputs(_(" -H, --human                 human readable output\n"), out);
        fputs(_(" -k, --kernel                display kernel messages\n"), out);
-       fputs(_(" -L, --color[=<when>]        colorize messages (auto, always or never)\n"), out);
+       fprintf(out,
+             _(" -L, --color[=<when>]        colorize messages (%s, %s or %s)\n"), "auto", "always", "never");
        fprintf(out,
                "                               %s\n", USAGE_COLORS_DEFAULT);
        fputs(_(" -l, --level <list>          restrict output to defined levels\n"), out);