All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carles Pina i Estany <carles@pina.cat>
To: grub-devel@gnu.org
Subject: gettext: install the *.mo files
Date: Sun, 29 Nov 2009 11:28:02 +0000	[thread overview]
Message-ID: <20091129112802.GA3272@pina.cat> (raw)

[-- 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


             reply	other threads:[~2009-11-29 11:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-29 11:28 Carles Pina i Estany [this message]
2009-12-04 20:45 ` gettext: install the *.mo files Robert Millan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091129112802.GA3272@pina.cat \
    --to=carles@pina.cat \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.