From 3bf2db8959fcd98eb4a1a765e369c505d2ae626f Mon Sep 17 00:00:00 2001 From: Andrey Borzenkov Date: Sun, 22 Dec 2013 22:51:54 +0400 Subject: [PATCH] split grub-mkresecue help text to facilitate translations Split single string in help message into several strings used before in shell grub-mkrescue to minimize changes to existing translations. Reported by Benno Schulenberg --- ChangeLog | 5 +++++ util/grub-mkrescue.c | 25 ++++++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20238bcc6..d24ec4cfb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-12-22 Andrey Borzenkov + + * util/grub-mkrescue.c: Split single help message string in several + strings used in previous shell version. + 2013-12-22 Leif Lindholm Add arm64 Linux loader. diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c index ad45f9c54..ad132eff3 100644 --- a/util/grub-mkrescue.c +++ b/util/grub-mkrescue.c @@ -119,8 +119,22 @@ help_filter (int key, const char *text, void *input __attribute__ ((unused))) { switch (key) { + case ARGP_KEY_HELP_PRE_DOC: + /* TRANSLATORS: it generates one single image which is bootable through any method. */ + return strdup (_("Make GRUB CD-ROM, disk, pendrive and floppy bootable image.")); case ARGP_KEY_HELP_POST_DOC: - return xasprintf (text, "xorriso -as mkisofs -help"); + { + char *p1, *out; + + p1 = xasprintf (_("Generates a bootable CD/USB/floppy image. Arguments other than options to this program" + " are passed to xorriso, and indicate source files, source directories, or any of the " + "mkisofs options listed by the output of `%s'."), "xorriso -as mkisofs -help"); + out = xasprintf ("%s\n\n%s\n\n%s", p1, + _("Option -- switches to native xorriso command mode."), + _("Mail xorriso support requests to .")); + free (p1); + return out; + } default: return grub_install_help_filter (key, text, input); } @@ -214,14 +228,7 @@ argp_parser (int key, char *arg, struct argp_state *state) struct argp argp = { options, argp_parser, N_("[OPTION] SOURCE..."), - /* TRANSLATORS: it generates one single image which is bootable through any method. */ - N_("Make GRUB CD-ROM, disk, pendrive and floppy bootable image.")"\v" - N_("Generates a bootable CD/USB/floppy image. Arguments other than options to this program" - " are passed to xorriso, and indicate source files, source directories, or any of the " - "mkisofs options listed by the output of `%s'.\n\n" - "Option -- switches to native xorriso command mode.\n\n" - "Mail xorriso support requests to ."), - NULL, help_filter, NULL + NULL, NULL, help_filter, NULL }; static void