From: Benno Schulenberg Date: Sat, 13 Aug 2011 18:11:21 +0000 (+0200) Subject: getopt: do not bundle help text lines into a single unwieldy chunk X-Git-Tag: v2.20-rc2~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7069d65329a1b680d437ab0798b18ba841834c91;p=thirdparty%2Futil-linux.git getopt: do not bundle help text lines into a single unwieldy chunk 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 --- diff --git a/getopt/getopt.c b/getopt/getopt.c index a211bcb16d..8da3178749 100644 --- a/getopt/getopt.c +++ b/getopt/getopt.c @@ -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); }