3 # This script prints translations statistics for .po files
4 # existing in the current directory
7 echo "Translations statistics"
8 echo "Date: "$(date -R)
11 echo "Note: completion % in the chart below may not be quite correct"
12 echo " when fuzzy translations exist but do not appear in the source."
13 echo " For exact results, run make update-po with up to date POTFILES.in."
14 echo " comp % = trans / (trans + fuzzy + untrans)"
17 (echo "Language Comp(%) Trans Fuzzy Untrans Total"; \
19 msgfmt --statistics -o /dev/null $i 2>&1 \
20 | sed 's/^\([0-9]\+ \)[^0-9]*\([0-9]\+ \)\?[^0-9]*\([0-9]\+ \)\?[^0-9]*$/\1\2\3/g' \
24 printf "%8.0f|%s|%7.2f|%5d|%5d|%7d|%5d\n",\
25 ($1*100/tot)*100, "'"${i%%.po}"'", $1*100/tot, tot-($2+$3), $2, $3, tot}' ;
26 done | sort -t '|' -b -k1,1nr -k2,2 | sed 's/^ *[0-9]*//' | tr ' |' '| '
27 ) | column -t -c 80 | tr '|' ' '