[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gettext patch (beta)
From: |
Carles Pina i Estany |
Subject: |
gettext patch (beta) |
Date: |
Wed, 21 Jan 2009 22:17:06 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello,
I have been working with the gettext patch (and Robert gave me a hand,
thanks)
Take this version as a RFC and call for help (see at the bottom, it
includes beer invitation in Fosdem).
ChangeLog:
-------------------
YYYY-MM-DD Carles Pina i Estany <address@hidden>
* Makefile.in: Add uptrans target to help to update .pot file
* conf/common.rmk: Add grub-gettext_lib target, dependency and
SOURCES, CFLAGS, LDFLAGS
* kern/misc.c: Define grub_gettext symbol and add implement
grub_gettext_dummy function
* po/TODO: Temporary file with instructions of what Makefile.in
will do
* po/ca.po: Catalan translation stub
* include/grub/misc.h: Define macro _(char *s). Declare
grub_gettext_dummy and grub_gettext
* gettext/gettext.c: New file with gettext implementation
* normal/menu.c (print_message): add _( ) to some strings
* util/grub.d/10_linux.in: include grub-gettext_lib file.
For the Linux menuentry, call eval_gettext
* util/grub.d/00_header.in: add locale_prefix and gettext
locale detection and setting up the access to the mo directory
* util/grub-mkconfig_lib.in: add get_locale_lang
* util/grub-gettext_lib.in: new file
-------------------
How to test and see something:
-Apply the patch
-In po/ execute msgfmt ca.po -o ca.mo
-Copy ca.mo to /usr/share/locale/ca/LC_MESSAGES/grub.mo
-Compile and install the patched Grub
-Maybe the new 00_header will detect your language and add the
configuration (this has not been tested)
-In Grub2 console you should:
set lang=ca
set locale_prefix=/usr/share/locale
insmod gettext
(ESC)
Then the lines under the menu box will appear in Catalan.
The gettext module has a hook to the lang variable, if you change lang to
a new value, it will reload the file. Ops! And I didn't do any hook for
locale_prefix, I will do it but by the moment you can rmmod gettext
and insmod again
CALL FOR HELP:
I need to write the Makefile.in (see po/TODO :-( ). I'm not used or
familiar to write Makefiles :-( if someone wants to help it would
speed up the process quite much. It needs only to merge the files with
the new .pot, compile (msgfmt), and install to the correct directory.
I exactly know what has to do, so if someone knows about
installation/Makefiles and doesn't know about gettext it's not a
problem, contact me. Else I will try to implement soon.
I would even invite to a couple of beers in Fosdem if someone does
this part :-)
TODO:
-the Makefile.in
-and more testing about 00_header with gettext detection.
-Add _("") for mainly all strings (I would do in a separate patch)
-I have seen that Grub2 is not printing correctly the accents,
could be a problem in gettext or in some other layer
--
Carles Pina i Estany GPG id: 0x17756391
http://pinux.info
gettext01.patch
Description: Text Data
- gettext patch (beta),
Carles Pina i Estany <=
Re: gettext patch (beta), Carles Pina i Estany, 2009/01/24