From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MIQkh-0004Vy-I8 for mharc-grub-devel@gnu.org; Sun, 21 Jun 2009 13:22:47 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MIQkf-0004UF-HH for grub-devel@gnu.org; Sun, 21 Jun 2009 13:22:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MIQkc-0004QM-0l for grub-devel@gnu.org; Sun, 21 Jun 2009 13:22:45 -0400 Received: from [199.232.76.173] (port=47469 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIQkb-0004QG-MP for grub-devel@gnu.org; Sun, 21 Jun 2009 13:22:41 -0400 Received: from 197.red-80-32-81.staticip.rima-tde.net ([80.32.81.197]:37935 helo=mail.pina.cat) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MIQkb-0003PW-6u for grub-devel@gnu.org; Sun, 21 Jun 2009 13:22:41 -0400 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 4AA9E28904CA1 for ; Sun, 21 Jun 2009 19:22:38 +0200 (CEST) Received: by pinux (Postfix, from userid 1000) id E910024894; Sun, 21 Jun 2009 18:22:36 +0100 (BST) Date: Sun, 21 Jun 2009 18:22:36 +0100 From: Carles Pina i Estany To: The development of GRUB 2 Message-ID: <20090621172236.GA23270@pina.cat> References: <20090616214709.GA31314@pina.cat> <20090618205607.GA20132@pina.cat> <20090619103747.GC19777@thorin> <20090621110757.GB27710@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090621110757.GB27710@thorin> User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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: Sun, 21 Jun 2009 17:22:46 -0000 Hello, On Jun/21/2009, Robert Millan wrote: > On Fri, Jun 19, 2009 at 12:42:26PM +0200, Vladimir 'phcoder' Serbinenko wrote: > > On Fri, Jun 19, 2009 at 12:37 PM, Robert Millan wrote: > > > > > On Thu, Jun 18, 2009 at 09:56:07PM +0100, Carles Pina i Estany wrote: > > > > > > -Copy ca.mo to /usr/share/locale/ca/LC_MESSAGES/grub.mo > > > > > > > > > > Languages files should go to a subdir of $PREFIX. E.g. to > > > > > $PREFIX/langs/$LANG.mo linux directories may be inaccessible > > > > > > > > Now the gettext module will search in $prefix/locale/lang.mo, where lang > > > > is the variable that the user will setup in grub.cfg (e.g. ca for > > > > catalan) and $prefix is usually /boot/grub > > > > > > Uhm I'm not sure I agree on this one. Sure, they may be inaccessible, but > > > only in very rare setups. On the other hand, we _still_ need a .mo in the > > > standard directory, because some strings in grub-mkconfig are critical > > > (they generate text that populates menu entry titles). So that would mean > > > installing two .mo files. Is it really worth the hassle? > > > > > It's not a problem. We need two locations anyway: one where make install > > copies them and the other one where ./grub-install copies them. Would it be > > possible to use /usr/share/grub/locale/$LANG.mo rather than > > /usr/share/locale/$LANG/LC_MESSAGES/grub.mo? It would make grub-install > > easier > > No, for system locales we need to use standard locations, or the userland > gettext won't find them. No, for example: carles@pinux:~/grubprova$ cat test.sh #!/bin/bash export TEXTDOMAIN="testscript" export TEXTDOMAINDIR="./locale" echo $(gettext "hello world") carles@pinux:~/grubprova$ carles@pinux:~/grubprova$ tree . |-- locale | |-- ca | | `-- LC_MESSAGES | | `-- testscript.mo | |-- ca_ES@euro.po | `-- test.pot `-- test.sh 3 directories, 4 files I mean, the script needs to tell where the locale directory is located. As far as I know even if it's in the standard locations. -- Carles Pina i Estany http://pinux.info