Make it possible to generate only single language

This commit is contained in:
Michal Čihař
2011-02-09 22:03:25 +01:00
parent 950b126cb7
commit b200ed0e18

View File

@@ -1,15 +1,25 @@
#!/bin/sh #!/bin/sh
if [ x$1 = x--quiet ] ; then if [ x$1 = x--quiet ] ; then
stats="" stats=""
shift
else else
stats="--statistics" stats="--statistics"
fi fi
for x in po/*.po ; do compile() {
lang=`echo $x | sed 's@po/\(.*\)\.po@\1@'` lang=`echo $1 | sed 's@po/\(.*\)\.po@\1@'`
if [ ! -z "$stats" ] ; then if [ ! -z "$stats" ] ; then
echo -n "$lang: " echo -n "$lang: "
fi fi
mkdir -p locale/$lang/LC_MESSAGES mkdir -p locale/$lang/LC_MESSAGES
msgfmt $stats --check -o locale/$lang/LC_MESSAGES/phpmyadmin.mo $x msgfmt $stats --check -o locale/$lang/LC_MESSAGES/phpmyadmin.mo $1
}
if [ ! -z "$1" ] ; then
compile po/$1.po
exit 0
fi
for x in po/*.po ; do
compile $x
done done