]> git.sur5r.net Git - minitube/blob - locale/calculate_completion.sh
Upload 3.9.3-2 to unstable
[minitube] / locale / calculate_completion.sh
1 #!/bin/bash
2 #
3 # This script was written to get some data on how far the various translations are
4 # compared to each other
5 #
6 # This script is donated to the public domain
7 #
8 # Klaas van Gend, 2008
9
10 printf "\n   translation file  %%ready   (unfinished/(total-obsolete))\n"
11 printf '=============================================================\n'
12 for I in `ls -1 *.ts`;
13 do
14         UNFINISHED=`grep 'type="unfinished"' $I | wc -l`;
15         OBSOLETE=`grep 'obsolete' $I | wc -l`;
16         MSGLINES=`grep '</message>' $I | wc -l`;
17         let "REALLINES=$MSGLINES-$OBSOLETE";
18         let "PERCENT=(100*$UNFINISHED)/$REALLINES";
19         let "FINISHED=100-$PERCENT";
20         printf "% 18s : % 4d%%    %d/(%d-%d)\n" $I $FINISHED $UNFINISHED $MSGLINES $OBSOLETE ;
21 done
22 printf "\n"
23