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
15 # This code converts to UTF-8 format. Needed by Gtk+-2.0 at
16 # least, and may help with other versions.
17 charset
=`grep "charset=" $1.po | head -1 | sed 's/^.*charset=\(.*\)\\\n.*/\1/'`
18 echo Using charset
\'$charset\'
19 iconv -f $charset -t utf-8
$1.po | \
20 sed 's/; charset=\(.*\)\\n"/; charset=utf-8\\n"/' | \
21 msgfmt
--statistics - -o $OUT && echo Created
file $OUT OK
23 # Create the $APP_DIR/Messages/<LANG>/LC_MESSAGES/ROX-Filer.mo link
24 # (or remove it when the translation (.gmo) is not available)
25 if [ -f "$OUT" ]; then
26 mkdir
-p "$LOCALE_DIR"
27 ln -sf "../../$1.gmo" "$LOCALE_DIR/ROX-Filer.mo"
29 rm -f "$LOCALE_DIR/ROX-Filer.mo"