Carles Pina i Estany wrote: > Hello, > > Find attached a patch that gettextizze the output of: > help play > help search > search --help > > So, implements gettext in commands/help.c, lib/arg.c, I also did in > normal/dyncmd.c (for the module not found). > > This is only the basic implementation, when this is agreed I will > prepare another patch to gettextizze the help of all commands. > > I would commit it in this way when someone reviews it. It's quite > straightforward. > >
>=== modified file 'commands/help.c'
>--- commands/help.c 2009-06-10 21:04:23 +0000
>+++ commands/help.c 2009-12-25 11:34:16 +0000
> grub_cmd_help (grub_extcmd_t ext __attribute__ ((unused)), int argc,
>@@ -48,7 +49,7 @@ grub_cmd_help (grub_extcmd_t ext __attri
> (desclen < GRUB_TERM_WIDTH / 2 - 1
> ? desclen : GRUB_TERM_WIDTH / 2 - 1));
>
>- grub_printf ("%s%s", description, (cnt++) % 2 ? "\n" : " ");
>+ grub_printf ("%s%s", _(description), (cnt++) % 2 ? "\n" : " ");
At this point description is already cut at half of terminal width. You have to
first translate and then cut the message and not the other way round
> }
> return 0;
> }
> Thanks,
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Grub-devel mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/grub-devel
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Grub-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/grub-devel
