On 22.12.2013 14:24, Andrey Borzenkov wrote: > В Вс, 22/12/2013 в 12:31 +0100, Vladimir 'φ-coder/phcoder' Serbinenko > пишет: >> N_ is not a function, it only marks string for translation for gettext. >> argp will see the whole string with no indication how N_ was used. It >> will resplit the string at \v and pass both halves to gettext which will >> fail to find the second half in the catalog >> > > OK, I see. In this case verbatim replacement using separately > translatable strings would be patch below (I actually tested it using > old catalog, which works with exception of sentence in question, which > changed too much). Is there any reason "xorriso ..." is not part of > string? It would make it even more simple. > It's bad idea to have commands as part of translatable strings. Suppose command changes, then the string will become fuzzy. If unfuzzying is done too quickly we may end up with a wrong command altogether. Patch is good for me. @Benne: does it address your concern? > From: Andrey Borzenkov > Subject: [PATCH] split grub-mkresecue help text to facilitate translations > > Reported by Benno Schulenberg > > --- > util/grub-mkrescue.c | 25 ++++++++++++++++--------- > 1 file changed, 16 insertions(+), 9 deletions(-) > > diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c > index ad45f9c..ad132ef 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 >