Permalink
Browse files

Make it possible to generate only single language

  • Loading branch information...
1 parent 950b126 commit b200ed0e181199bceeaa6298c44c77c1e36c9b28 @nijel nijel committed Feb 9, 2011
Showing with 13 additions and 3 deletions.
  1. +13 −3 scripts/generate-mo
View
@@ -1,15 +1,25 @@
#!/bin/sh
if [ x$1 = x--quiet ] ; then
stats=""
+ shift
else
stats="--statistics"
fi
-for x in po/*.po ; do
- lang=`echo $x | sed 's@po/\(.*\)\.po@\1@'`
+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 $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

0 comments on commit b200ed0

Please sign in to comment.