e po: add completeness lister script into po dir

./complete *.po

:)
This commit is contained in:
Carsten Haitzler 2016-02-15 11:41:05 +09:00
parent e8b8fe8310
commit 97525a44d1
1 changed files with 15 additions and 0 deletions

15
po/complete.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
while [ 1 ]; do
FILE="$1"
shift
if test -z "$FILE"; then
break
else
TOTAL=`grep '^msgid ' $FILE | wc -l`
MISSING=`grep '^msgstr ""' $FILE | wc -l`
DONE=`expr $TOTAL - $MISSING`
COMPLETE=`expr $DONE \\* 100 / $TOTAL`
echo "$FILE: $DONE/$TOTAL = $COMPLETE%"
fi
done