grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gettext: commands/*


From: Carles Pina i Estany
Subject: Re: gettext: commands/*
Date: Mon, 7 Dec 2009 00:49:51 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

Hi,

On Dec/06/2009, Carles Pina i Estany wrote:

> -      grub_printf ("The files are identical.\n");
> +      grub_printf (_("The files are identical.\n"));

Vladimir suggested in IRC that instead of using:
grub_printf (grub_gettext (str))  // This is with _() expanded

I could use:
grub_printf_ (str);

To reduce the size in disk.

I suggest to implement something like:
grub_printf_ (N_("bla bla %s bla"), msg);

And then implement grub_printf_:
---------
int
grub_printf_ (const char *fmt, ...)
{
  va_list ap;
  int ret;

  va_start (ap, fmt);
  ret = grub_vprintf (_(fmt), ap);
  va_end (ap);

  return ret;
}
---------

AFAIK, xgettext keyword (-k) needs that the keyword wraps the
string, in order to extract it to the .pot file, so it's not
possible to do a very generic function like:

grub_printf_ ("bla bla %s bla", msg);

xgettext would not extract the string.

Maybe Jordi has something to say about this last part.

If we want this approach tell me: I would implement it soon and prepare
a patch with the implementation, then redo "gettext: normal/*" patch
with this new approach, adapt the old code and finally do the
commands/* "again" and move from here (still some more files and things
to do).

Thanks,

-- 
Carles Pina i Estany
        http://pinux.info




reply via email to

[Prev in Thread] Current Thread [Next in Thread]