(cpina, if you're reading, I'd particularly appreciate your review.)

As far as I can see, locale installation is just wrong right now.
${pkglibdir}/locale/*.mo never exists, and copying files from
${grubdir}/locale/ to ${grubdir}/locale/ is pretty odd too ...

I think this patch matches reality rather better.

2010-03-19  Colin Watson  <cjwat...@ubuntu.com>

        * util/grub-install.in: Copy .mo files from @datadir@/locale, to
        match where 'make install' puts them.
        * util/i386/efi/grub-install.in: Likewise.

=== modified file 'util/grub-install.in'
--- util/grub-install.in        2010-02-03 00:24:07 +0000
+++ util/grub-install.in        2010-03-19 01:04:39 +0000
@@ -32,6 +32,7 @@ platfo...@platform@
 host_...@host_os@
 fo...@datadir@/@PACKAGE_TARNAME@/ascii.pf2
 pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed 
${transform}`
+localed...@datadir@/locale
 
 grub_setup=${sbindir}/`echo grub-setup | sed ${transform}`
 if [ "${target_cpu}-${platform}" = "i386-pc" ] || [ 
"${target_cpu}-${platform}" = "sparc64-ieee1275" ] || [ 
"${target_cpu}-${platform}" = "mips-yeeloong" ] ; then
@@ -263,9 +264,9 @@ fi
 
 # 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
 

=== modified file 'util/i386/efi/grub-install.in'
--- util/i386/efi/grub-install.in       2010-03-04 14:12:34 +0000
+++ util/i386/efi/grub-install.in       2010-03-19 01:04:36 +0000
@@ -31,6 +31,7 @@ target_c...@target_cpu@
 platfo...@platform@
 host_...@host_os@
 pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed 
${transform}`
+localed...@datadir@/locale
 
 grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}`
 grub_mkdevicemap=${sbindir}/`echo grub-mkdevicemap | sed ${transform}`
@@ -182,9 +183,9 @@ done
 
 # 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
 

Thanks,

-- 
Colin Watson                                       [cjwat...@ubuntu.com]


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to