r4527: Updated Russian translation (Nikita E. Shalaev).
[rox-filer/translations.git] / ROX-Filer / src / po / make-mo
blobffa5afbae3ddf8f39e5ba5073af8298c19f329c6
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=../../Messages/$1.gmo
13 # This code converts to UTF-8 format. Needed by Gtk+-2.0 at
14 # least, and may help with other versions.
15 charset=`grep "charset=" $1.po | head -1 | sed 's/^.*charset=\(.*\)\\\n.*/\1/'`
16 echo Using charset \'$charset\'
17 iconv -f $charset -t utf-8 $1.po | \
18 sed 's/; charset=\(.*\)\\n"/; charset=utf-8\\n"/' | \
19 msgfmt --statistics - -o $OUT && echo Created file $OUT OK