Updated update-po to use the new GtkBuilder .ui file
[rox-filer.git] / ROX-Filer / src / po / make-mo
blobe616f48e49d51ab9fd0f1cf8c80cadfbda35d22a
1 #!/bin/sh
3 if [ "$#" != 1 ]; then
4 cat << HERE
5 Usage: 'make-mo <LANG>'
6 Eg: 'make-mo fr' to compile the French translation, fr.po, ready for use.
7 HERE
8 exit 1
9 fi
11 OUT_DIR=../../Messages
12 LOCALE_DIR="$OUT_DIR/$1/LC_MESSAGES"
13 OUT="$LOCALE_DIR/ROX-Filer.mo"
14 mkdir -p "$LOCALE_DIR"
16 # This code converts to UTF-8 format. Needed by Gtk+-2.0 at
17 # least, and may help with other versions.
18 charset=`grep "charset=" $1.po | head -1 | sed 's/^.*charset=\(.*\)\\\n.*/\1/'`
19 echo Using charset \'$charset\'
20 iconv -f $charset -t utf-8 $1.po | \
21 sed 's/; charset=\(.*\)\\n"/; charset=utf-8\\n"/' | \
22 msgfmt --statistics - -o $OUT && echo Created file $OUT OK