5 Usage: 'make-mo <LANG>'
6 Eg: 'make-mo fr' to compile the French translation, fr.po, ready for use.
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