]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
getopt: do not bundle help text lines into a single unwieldy chunk
authorBenno Schulenberg <bensberg@justemail.net>
Sat, 13 Aug 2011 18:11:21 +0000 (20:11 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 16 Aug 2011 08:16:30 +0000 (10:16 +0200)
This undoes part of commit 283f8f0256655b73071290b92c58d998e883260a.
Help text lines are best gettextized separately, or in small chunks
of three to five lines, which are easily managed by translators.
Bundling text lines when nothing in those texts changed is discarding
translators' work unnecessarily.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
getopt/getopt.c

index a211bcb16d5275e40d7c0cebc64628592f6c7e7a..8da31787494503610be755d0f8ee57333b981689 100644 (file)
@@ -313,20 +313,20 @@ static void __attribute__ ((__noreturn__)) print_help(void)
 {
        fprintf(stderr, _("Usage: %1$s optstring parameters\n"
                          "       %1$s [options] [--] optstring parameters\n"
-                         "       %1$s [options] -o|--options optstring [options] [--] parameters\n"
-                         "\nOptions:\n"
-                         "  -a, --alternative            Allow long options starting with single -\n"
-                         "  -h, --help                   This small usage guide\n"
-                         "  -l, --longoptions=longopts   Long options to be recognized\n"
-                         "  -n, --name=progname          The name under which errors are reported\n"
-                         "  -o, --options=optstring      Short options to be recognized\n"
-                         "  -q, --quiet                  Disable error reporting by getopt(3)\n"
-                         "  -Q, --quiet-output           No normal output\n"
-                         "  -s, --shell=shell            Set shell quoting conventions\n"
-                         "  -T, --test                   Test for getopt(1) version\n"
-                         "  -u, --unquote                Do not quote the output\n"
-                         "  -V, --version                Output version information\n\n"),
+                         "       %1$s [options] -o|--options optstring [options] [--] parameters\n",
                program_invocation_short_name);
+       fputs(_("\nOptions:\n"),stderr);
+       fputs(_("  -a, --alternative            Allow long options starting with single -\n"),stderr);
+       fputs(_("  -h, --help                   This small usage guide\n"),stderr);
+       fputs(_("  -l, --longoptions=longopts   Long options to be recognized\n"),stderr);
+       fputs(_("  -n, --name=progname          The name under which errors are reported\n"),stderr);
+       fputs(_("  -o, --options=optstring      Short options to be recognized\n"),stderr);
+       fputs(_("  -q, --quiet                  Disable error reporting by getopt(3)\n"),stderr);
+       fputs(_("  -Q, --quiet-output           No normal output\n"),stderr);
+       fputs(_("  -s, --shell=shell            Set shell quoting conventions\n"),stderr);
+       fputs(_("  -T, --test                   Test for getopt(1) version\n"),stderr);
+       fputs(_("  -u, --unquote                Do not quote the output\n"),stderr);
+       fputs(_("  -V, --version                Output version information\n"),stderr);
 
        exit(PARAMETER_EXIT_CODE);
 }