[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix locale installation
From: |
Colin Watson |
Subject: |
Re: [PATCH] Fix locale installation |
Date: |
Fri, 19 Mar 2010 22:21:20 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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 address@hidden