blob: f9dca7403ea2df6230162c4fee73b7e2a5392fa0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/bash
# syntax:
# compile-mo.sh locale-dir/
function usage() {
echo "syntax:"
echo "compile.sh locale-dir/"
exit 1
}
# check if file and dir are there
if [[ ($# -ne 1) || (! -d "$1") ]]; then usage; fi
for lang in `find $1 -type f -name "messages.po"`; do
dir=`dirname $lang`
stem=`basename $lang .po`
msgfmt -o ${dir}/${stem}.mo $lang
done
|