blob: 3dc88f6199125bccba4ce168ed894112de82b12c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#!/bin/sh
# Do not run as CGI
if [ -n "$GATEWAY_INTERFACE" ] ; then
echo 'Can not invoke as CGI!'
exit 1
fi
if [ x$1 = x--quiet ] ; then
stats=""
shift
else
stats="--statistics"
fi
compile() {
lang=`echo $1 | sed 's@po/\(.*\)\.po@\1@'`
if [ ! -z "$stats" ] ; then
echo -n "$lang: "
fi
mkdir -p locale/$lang/LC_MESSAGES
msgfmt $stats --check -o locale/$lang/LC_MESSAGES/phpmyadmin.mo $1
return $?
}
if [ ! -z "$1" ] ; then
compile po/$1.po
exit $?
fi
result=0
for x in po/*.po ; do
compile $x
ret=$?
if [ $ret != 0 ] ; then
tput setf 4 >&2
echo Error when compiling $x >&2
tput sgr0 >&2
result=$ret
fi
done
exit $result
|