grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Fix locale installation


From: Colin Watson
Subject: [PATCH] Fix locale installation
Date: Fri, 19 Mar 2010 11:50:09 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

(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  <address@hidden>

        * 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 @@ address@hidden@
 address@hidden@
 address@hidden@/@PACKAGE_TARNAME@/ascii.pf2
 pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed 
${transform}`
address@hidden@/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 @@ address@hidden@
 address@hidden@
 address@hidden@
 pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed 
${transform}`
address@hidden@/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                                       address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]