[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gettext: help commands
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
Re: gettext: help commands |
Date: |
Fri, 25 Dec 2009 13:16:01 +0100 |
User-agent: |
Mozilla-Thunderbird 2.0.0.22 (X11/20091109) |
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
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
signature.asc
Description: OpenPGP digital signature