summaryrefslogtreecommitdiff
path: root/po/complete.sh
blob: 57440af0bf8d15fcb60fa3a3a586c7e286a02fcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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