Mercurial > geeqie.yaz
comparison po/gen_translations_stats.sh @ 294:9131ca4ad70b
Simple helper script to display translation statistics.
author | zas_ |
---|---|
date | Wed, 09 Apr 2008 22:33:06 +0000 |
parents | |
children | 48bfa03502d3 |
comparison
equal
deleted
inserted
replaced
293:faeda3c7c8f8 | 294:9131ca4ad70b |
---|---|
1 #!/bin/bash | |
2 | |
3 # This script prints translations statistics for .po files | |
4 # existing in the current directory | |
5 | |
6 echo "Translations statistics" | |
7 echo "Date: `date`" | |
8 echo | |
9 | |
10 for i in *.po; do | |
11 msgfmt --statistics -o /dev/null $i 2>&1 \ | |
12 | sed 's/^\([0-9]\+ \)[^0-9]*\([0-9]\+ \)\?[^0-9]*\([0-9]\+ \)\?[^0-9]*$/\1\2\3/g' \ | |
13 | awk '{ \ | |
14 tot = $1 + $2 + $3; \ | |
15 if (tot != 0) \ | |
16 printf "%8.0f %8s %6.02f%% (%3d/%3d untranslated)\n",\ | |
17 ($1*100/tot)*100, "'"$i"'", $1*100/tot, $2+$3, tot}' ; | |
18 done | sort -b -k1,1nr -k2,2 | sed 's/^ *[0-9]*//' | |
19 | |
20 echo | |
21 |