3 # Removes mo files for incomplete translations
7 # How many percent needs to be translated
12 lang
=`echo $1 | sed 's@po/\(.*\)\.po@\1@'`
13 STATS
=`LANG=C msgfmt --statistics -o /dev/null $1 2>&1`
14 if echo $STATS |
grep -q ' translated ' ; then
15 TRANSLATED
=`echo $STATS | sed 's/\(^\|.* \)\([0-9]*\) translated.*/\2/'`
19 if echo $STATS |
grep -q ' fuzzy ' ; then
20 FUZZY
=`echo $STATS | sed 's/\(^\|.* \)\([0-9]*\) fuzzy.*/\2/'`
24 if echo $STATS |
grep -q ' untranslated ' ; then
25 UNTRANSLATED
=`echo $STATS | sed 's/\(^\|.* \)\([0-9]*\) untranslated.*/\2/'`
29 PERCENT
=`expr 100 \* $TRANSLATED / \( $TRANSLATED + $FUZZY + $UNTRANSLATED \)`
31 if [ $PERCENT -lt $THRESHOLD ] ; then
32 echo "Removing $lang, only $PERCENT%"
33 rm -f locale
/$lang/LC_MESSAGES
/phpmyadmin.mo
37 if [ ! -z "$1" ] ; then