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
This commit is contained in:
Andrey Borzenkov 2013-12-22 22:51:54 +04:00
parent 30a9ab952f
commit 3bf2db8959
2 changed files with 21 additions and 9 deletions

View file

@ -1,3 +1,8 @@
2013-12-22 Andrey Borzenkov <arvidjaar@gmail.com>
* util/grub-mkrescue.c: Split single help message string in several
strings used in previous shell version.
2013-12-22 Leif Lindholm <leif.lindholm@linaro.org> 2013-12-22 Leif Lindholm <leif.lindholm@linaro.org>
Add arm64 Linux loader. Add arm64 Linux loader.

View file

@ -119,8 +119,22 @@ help_filter (int key, const char *text, void *input __attribute__ ((unused)))
{ {
switch (key) 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: 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 <bug-xorriso@gnu.org>."));
free (p1);
return out;
}
default: default:
return grub_install_help_filter (key, text, input); 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 = { struct argp argp = {
options, argp_parser, N_("[OPTION] SOURCE..."), options, argp_parser, N_("[OPTION] SOURCE..."),
/* TRANSLATORS: it generates one single image which is bootable through any method. */ NULL, NULL, help_filter, NULL
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 <bug-xorriso@gnu.org>."),
NULL, help_filter, NULL
}; };
static void static void