All of lore.kernel.org
 help / color / mirror / Atom feed
* gettext: install the *.mo files
@ 2009-11-29 11:28 Carles Pina i Estany
  2009-12-04 20:45 ` Robert Millan
  0 siblings, 1 reply; 2+ messages in thread
From: Carles Pina i Estany @ 2009-11-29 11:28 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 310 bytes --]


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,

-- 
Carles Pina i Estany
	http://pinux.info

[-- Attachment #2: ChangeLog.copy_mo --]
[-- Type: text/plain, Size: 182 bytes --]

2009-11-29  Carles Pina i Estany <carles@pina.cat>

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

[-- Attachment #3: copy_mo.patch --]
[-- Type: text/x-diff, Size: 1083 bytes --]

=== modified file 'util/grub-install.in'
--- util/grub-install.in	2009-11-12 12:23:11 +0000
+++ util/grub-install.in	2009-11-29 11:21:46 +0000
@@ -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'
--- util/grub-mkrescue.in	2009-11-21 16:40:55 +0000
+++ util/grub-mkrescue.in	2009-11-29 11:17:46 +0000
@@ -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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gettext: install the *.mo files
  2009-11-29 11:28 gettext: install the *.mo files Carles Pina i Estany
@ 2009-12-04 20:45 ` Robert Millan
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Millan @ 2009-12-04 20:45 UTC (permalink / raw)
  To: The development of GNU GRUB

On Sun, Nov 29, 2009 at 11:28:02AM +0000, Carles Pina i Estany wrote:
> 
> 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.

-- 
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."



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-12-04 20:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-29 11:28 gettext: install the *.mo files Carles Pina i Estany
2009-12-04 20:45 ` Robert Millan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.