Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NskZL-0000mk-HU for mharc-grub-devel@gnu.org; Fri, 19 Mar 2010 18:21:27 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NskZJ-0000lM-Us for grub-devel@gnu.org; Fri, 19 Mar 2010 18:21:25 -0400 Received: from [140.186.70.92] (port=41266 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NskZI-0000k6-Ft for grub-devel@gnu.org; Fri, 19 Mar 2010 18:21:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NskZH-0004Lf-1j for grub-devel@gnu.org; Fri, 19 Mar 2010 18:21:24 -0400 Received: from smarthost02.mail.zen.net.uk ([212.23.3.141]:34577) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NskZG-0004Lb-Sd for grub-devel@gnu.org; Fri, 19 Mar 2010 18:21:22 -0400 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost02.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1NskZF-00083g-J7 for grub-devel@gnu.org; Fri, 19 Mar 2010 22:21:21 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1NskZE-0005sg-00; Fri, 19 Mar 2010 22:21:20 +0000 Date: Fri, 19 Mar 2010 22:21:20 +0000 From: Colin Watson To: grub-devel@gnu.org Message-ID: <20100319222120.GA20777@riva.ucam.org> References: <20100319115008.GV20777@riva.ucam.org> <20100319203523.GA7679@pina.cat> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100319203523.GA7679@pina.cat> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost02-IP: [82.69.40.219] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] Fix locale installation X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 22:21:26 -0000 On Fri, Mar 19, 2010 at 08:35:23PM +0000, Carles Pina i Estany wrote: > On Mar/19/2010, Colin Watson wrote: > > # Copy gettext files > > mkdir -p ${grubdir}/locale/ > > -for file in ${grubdir}/locale/*.mo ${pkglibdir}/locale/*.mo; do > > - if test -f "$file"; then > > - cp -f "$file" ${grubdir}/locale/ > > +for dir in ${localedir}/*; do > > + if test -f "$dir/LC_MESSAGES/grub.mo"; then > > + cp -f "$dir/LC_MESSAGES/grub.mo" "${grubdir}/locale/${dir##*/}.mo" > > fi > > done > > (I'll use shell variables in a bit "on my own way") > > AFAIK the files are in po/$lang.{po,mo}, right? (at least in > my system without using another directory for the building, I need to > look in the other issue soon) In the source, they live in po/$lang.po and po/$lang.mo. However, when you run 'make install', they end up in $datadir/locale/$lang/LC_MESSAGES/grub.mo. grub-install should be looking at the paths used by 'make install', rather than the paths in the source tree which generally won't be accessible. > I thought that make install was copying from po/$lang.mo to > /usr/share/locale/$lang/LC_MESSAGES/grub.mo, but you are copying already > from some structure in $localedir/LC_MESSAGES/grub.mo. What am I missing? You just misread my code slightly, I think. I'm actually copying from $localedir/*/LC_MESSAGES/grub.mo. My code will copy (e.g.) /usr/share/locale/es/LC_MESSAGES/grub.mo to /boot/grub/locale/es.mo. This seems better than creating lots of subdirectories of /boot/grub/locale/. Thanks, -- Colin Watson [cjwatson@ubuntu.com]