]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
split grub-mkresecue help text to facilitate translations
authorAndrey Borzenkov <arvidjaar@gmail.com>
Sun, 22 Dec 2013 18:51:54 +0000 (22:51 +0400)
committerAndrey Borzenkov <arvidjaar@gmail.com>
Sun, 22 Dec 2013 18:51:54 +0000 (22:51 +0400)
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
util/grub-mkrescue.c

index 20238bcc64fdeeb65e9bcb159b28ed3695cea333..d24ec4cfb80c369d55189673d91d2a222d3bf6fc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        Add arm64 Linux loader.
index ad45f9c544174fa8b8ca169aa9f5d855c812771c..ad132eff3917e788bb0589426c9424a3fdccff27 100644 (file)
@@ -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 <bug-xorriso@gnu.org>."));
+       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 <bug-xorriso@gnu.org>."), 
-  NULL, help_filter, NULL
+  NULL, NULL, help_filter, NULL
 };
 
 static void