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