All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: gettext: help commands
Date: Fri, 25 Dec 2009 13:16:01 +0100	[thread overview]
Message-ID: <4B34AD01.9010908@gmail.com> (raw)
In-Reply-To: <20091225115031.GA14251@pina.cat>

[-- Attachment #1: Type: text/plain, Size: 1507 bytes --]

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
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]

  reply	other threads:[~2009-12-25 12:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-25 11:50 gettext: help commands Carles Pina i Estany
2009-12-25 12:16 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2009-12-25 12:29   ` Carles Pina i Estany
2009-12-25 12:33     ` Vladimir 'φ-coder/phcoder' Serbinenko
2009-12-25 12:40       ` Carles Pina i Estany
2009-12-25 12:27 ` Carles Pina i Estany

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B34AD01.9010908@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.