Skip to contentSkip to conversation

gettext: install the *.mo files

PATCH Carles Pina i Estany 2 participants 2 messages Nov 29, 2009 – Dec 4, 2009

lore
Share & tools
lore
#0 lore raw

Hello,

Find attached a patch to install the *.mo files.

I've tested grub-mkrescue.in but not grub-install.in (yet)

Using for + if + cp and not cp with wildcards to really check that the files exists and so on (like other parts of the file).

Comments?

Thanks,

Signature · 2 lines
Carles Pina i Estany
	http://pinux.info

2009-11-29 Carles Pina i Estany <[email protected]>

* util/grub-install.in: Install the gettext .mo files.
* util/grub-mkrescue.in (process_input_dir): Copy the gettext .mo files

=== modified file 'util/grub-install.in'

grub-install.in +8 -0
@@ -247,6 +247,14 @@ if [ "${target_cpu}-${platform}" = "i386
     done
 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/
+    fi
+done
+
 # Write device to a variable so we don't have to traverse /dev every time.
 grub_device=`$grub_probe --target=device ${grubdir}`
 

=== modified file 'util/grub-mkrescue.in'

grub-mkrescue.in +7 -0
@@ -100,6 +100,13 @@ process_input_dir ()
             cp -f "$file" ${iso9660_dir}/boot/grub/${target_cpu}-${platform}/
         fi
     done
+
+    mkdir -p ${iso9660_dir}/boot/grub/locale
+    for file in ${input_dir}/po/*.mo; do
+        if test -f "$file"; then
+	    cp -f "$file" ${iso9660_dir}/boot/grub/locale/
+	fi
+    done
 }
 
 if [ "${override_dir}" = "" ] ; then
#1 lore raw
Quoted 11 lines · Carles Pina i Estany

Hello,

Find attached a patch to install the *.mo files.

I've tested grub-mkrescue.in but not grub-install.in (yet)

Using for + if + cp and not cp with wildcards to really check that the files exists and so on (like other parts of the file).

Comments?

Looks fine, please go ahead.

Signature · 5 lines
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."