From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1N4hHD-0003da-7D for mharc-grub-devel@gnu.org; Sun, 01 Nov 2009 15:43:51 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N4hHA-0003a0-ME for grub-devel@gnu.org; Sun, 01 Nov 2009 15:43:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N4hH5-0003XT-IX for grub-devel@gnu.org; Sun, 01 Nov 2009 15:43:48 -0500 Received: from [199.232.76.173] (port=44950 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4hH5-0003XQ-Cp for grub-devel@gnu.org; Sun, 01 Nov 2009 15:43:43 -0500 Received: from 197.red-80-32-81.staticip.rima-tde.net ([80.32.81.197]:36692 helo=mail.pina.cat) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N4hH4-0004fB-Rz for grub-devel@gnu.org; Sun, 01 Nov 2009 15:43:43 -0500 Received: from pinux (82-45-164-87.cable.ubr06.hari.blueyonder.co.uk [82.45.164.87]) by mail.pina.cat (Postfix) with ESMTP id 04EB0288F3098 for ; Sun, 1 Nov 2009 21:43:39 +0100 (CET) Received: by pinux (Postfix, from userid 1000) id 5DF1915812; Sun, 1 Nov 2009 20:43:33 +0000 (GMT) Date: Sun, 1 Nov 2009 20:43:33 +0000 From: Carles Pina i Estany To: grub-devel@gnu.org Message-ID: <20091101204333.GA28343@pina.cat> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: gettext branch 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: Sun, 01 Nov 2009 20:43:49 -0000 Hello, After some time of non-activity I'm back, and I think that during the next weeks with enough time to finish the gettext topic. The branch is here: bzr.savannah.gnu.org/grub/people/cpina/gettext2 (notice the 2 at the end!) We have talked about the gettext two times, last time was last June: http://lists.gnu.org/archive/html/grub-devel/2009-06/msg00256.html Or the full discussion (search for gettext support) http://lists.gnu.org/archive/html/grub-devel/2009-06/threads.html I've integrated the last patch in trunk: http://lists.gnu.org/archive/html/grub-devel/2009-06/msg00279.html General approach: gettext implementation in a gettext module inside Grub. A simple function (_) that returns the same string, unless gettext module is loaded where then this function is replaced by another one that opens the .mo file following some variables and then gets the text from the .mo file. Right now it's getting the .mo file from /usr/share/locale/LANGUAGE/LC_MESSAGE There is some other part where I implemented gettext support in the Bash scrips that Grub is using (grub-mkconfig_lib.in and get_locale_lang) Ask for help (like last time :-) ): Work to be done and where I asked help and I think that phcoder wanted to help but he had holidays and after that I had some extra-busy season): a) make should compile the po/*.po to po/*.mo using something like: for pofile in *.po do msgfmt "$pofile" -o $(basename "$pofile" .po).mo done (the equivalent in Make) b) make install should install the .mo files to /usr/share/locale/$LANGUAGE/LC_MESSAGE, something like: for mofile in *.mo do LANGUAGE=$(basename $i .mo) echo cp $LANGUAGE /usr/share/locale/$LANGUAGE/LC_MESSAGE done If someone give me a hand with this I will integrate in people/cpina/gettext2 . I don't know if this should go to experimental or trunk. When all integration will be done (above things, other things that will appear) I will add the "_" function to more strings and also me and some friends of a Catalan LUG (Catux) will translate the .po to Catalan. -- Carles Pina i Estany http://pinux.info