Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MGhHm-0002tA-3s for mharc-grub-devel@gnu.org; Tue, 16 Jun 2009 18:37:46 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGhHk-0002sO-Kv for grub-devel@gnu.org; Tue, 16 Jun 2009 18:37:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGhHf-0002pc-Vz for grub-devel@gnu.org; Tue, 16 Jun 2009 18:37:44 -0400 Received: from [199.232.76.173] (port=41681 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGhHf-0002pT-Ny for grub-devel@gnu.org; Tue, 16 Jun 2009 18:37:39 -0400 Received: from mail-bw0-f219.google.com ([209.85.218.219]:37659) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MGhHf-00046X-2x for grub-devel@gnu.org; Tue, 16 Jun 2009 18:37:39 -0400 Received: by bwz19 with SMTP id 19so81004bwz.42 for ; Tue, 16 Jun 2009 15:37:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=XTZFIRxkbI/OLb+JbDz8yU17uay1bjnrZYo6jDY9rus=; b=seZyO1p1Eb68n1/BKpXb+NW0RgFj8awcDGuan9Ki70M2TknMBHDhl9VBz0jsp2kBLR RJChc0v8l3NsiaZgYJ1Uk/+ko+4HOxF4iWvpJgM6Inxp3Y6nVyhPrftmV2H2N0HX9M4m 6j5iWm4PWCsoiabRz9A11/ToQuJQFaNpaOWtg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=U7X1wWIH6eLrGWeGfei1RpqmqZM/Xz+aWRI+5lvrQ7cOlaGUMnTC0O/93volYfMhi5 mvU3UNkx+XjZbZxgJ6jAIc5KOTeuC+nKPz6svfc+pxYRmSg4oWrJRD1OkjvhnWI4JRkk +iLIwrc74Zjug8PrbnPVDVLxBJBjMJJPQiE7A= MIME-Version: 1.0 Received: by 10.204.97.140 with SMTP id l12mr8660772bkn.133.1245191857761; Tue, 16 Jun 2009 15:37:37 -0700 (PDT) In-Reply-To: <20090616214709.GA31314@pina.cat> References: <20090616214709.GA31314@pina.cat> Date: Wed, 17 Jun 2009 00:37:37 +0200 Message-ID: From: "Vladimir 'phcoder' Serbinenko" To: The development of GRUB 2 Content-Type: multipart/alternative; boundary=0016363b99225bed7a046c7ed25e X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: Fw: gettext support X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2009 22:37:44 -0000 --0016363b99225bed7a046c7ed25e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello. Welcome back and your work is appreciated. I will look at the patch later (In couple minutes I go to sleep) On Tue, Jun 16, 2009 at 11:47 PM, Carles Pina i Estany wrote: > > Hello, > > Last January I sent a patch to add gettext support. When I had time, the > list was not very, and afterwards I didn't have time. > > Hopefully from now on and during next weeks I will have some time to > follow up the discussion, make changes, etc. (not exactly everyday but I > will be able to do, I hope). > > Find attached the patch that you can apply with the last version. > Surprisingly, after resolving a couple of conflicts, it works like last > January. > > General design: > a) I did a new module called gettext. It uses locale_prefix and lang > variables to locate the .mo file > > b) Some strings in Grub (currently only one) uses _("") function to > translate the text. This is a hook function that returns the same text > when the gettext module is not loaded or the translation when it's > loaded > > gettext module parses the .mo file without using hash and using > bisection for the searching (if I remember correctly). > > The scripts that generates menu.lst also supports (at least some) > gettext support from Bash/Shell itself. > > Here you can read the ChangeLog: > http://lists.gnu.org/archive/html/grub-devel/2009-01/msg00118.html and > more instructions > > In that thread we talked about some encoding problem. As Niels (I think) > suggested, after setting up the Charset in the .po file it's working > fine. > > Right now you would need to "compile" the .po file to .mo file by hand > (directory grub2/po) and then copy to the correct place in your > /usr/share directory, like: > /usr/share/locale/ca/LC_MESSAGES/grub.mo > > (you can use this location with this menu.lst: > set locale_prefix=/usr/share/locale > set lang=ca > insmod gettext > ) > > Comments for next steps to commit the patch are welcomed. > (maybe I need to setup the "path" to access to /usr/share/locale in the > Grub installation script in grub.cfg -e.g. search --fs-uuid ...- or we > can do it afterwards?) > I already commented on this issue: simply don't use /usr. It may be inacessible (e.g. encrypted). Just make grub-install to copy locale files to $prefix or to $prefix/locale and then you don't need a separate variable for locale prefix (just use $prefix or $prefix/locale) > > Thanks, > > PS: any Grub developer living/working in London? > > -- > Carles Pina i Estany > http://pinux.info > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > > -- Regards Vladimir 'phcoder' Serbinenko --0016363b99225bed7a046c7ed25e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello. Welcome back and your work is appreciated. I will look at the patch = later (In couple minutes I go to sleep)

O= n Tue, Jun 16, 2009 at 11:47 PM, Carles Pina i Estany <= ;carles@pina.cat> wrote:

Hello,

Last January I sent a patch to add gettext support. When I had time, the list was not very, and afterwards I didn't have time.

Hopefully from now on and during next weeks I will have some time to
follow up the discussion, make changes, etc. (not exactly everyday but I will be able to do, I hope).

Find attached the patch that you can apply with the last version.
Surprisingly, after resolving a couple of conflicts, it works like last
January.

General design:
a) I did a new module called gettext. It uses locale_prefix and lang
variables to locate the .mo file

b) Some strings in Grub (currently only one) uses _("") function = to
translate the text. This is a hook function that returns the same text
when the gettext module is not loaded or the translation when it's
loaded

gettext module parses the .mo file without using hash and using
bisection for the searching (if I remember correctly).

The scripts that generates menu.lst also supports (at least some)
gettext support from Bash/Shell itself.

Here you can read the ChangeLog:
http://lists.gnu.org/archive/html/grub-devel/2009-01/= msg00118.html and
more instructions

In that thread we talked about some encoding problem. As Niels (I think) suggested, after setting up the Charset in the .po file it's working fine.

Right now you would need to "compile" the .po file to .mo file by= hand
(directory grub2/po) and then copy to the correct place in your
/usr/share directory, like:
/usr/share/locale/ca/LC_MESSAGES/grub.mo

(you can use this location with this menu.lst:
set locale_prefix=3D/usr/share/locale
set lang=3Dca
insmod gettext
)

Comments for next steps to commit the patch are welcomed.
(maybe I need to setup the "path" to access to /usr/share/locale = in the
Grub installation script in grub.cfg -e.g. search --fs-uuid ...- or we
can do it afterwards?)
=A0I already commented on this issue: simply don't us= e /usr. It may be inacessible (e.g. encrypted). Just make grub-install to c= opy locale files to $prefix or to $prefix/locale and then you don't nee= d a separate variable for locale prefix (just use $prefix or $prefix/locale= )

Thanks,

PS: any Grub developer living/working in London?

--
Carles Pina i Estany
=A0 =A0 =A0 =A0http://pinu= x.info

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel




--
Regards
Vladimir= 'phcoder' Serbinenko
--0016363b99225bed7a046c7ed25e--