# HG changeset patch # User Laurent Monin # Date 1207780386 0 # Node ID 4437407ce3e9cb52ea155e4ebd0b5de735987577 # Parent e0faa3f5a4d32a5bb2984db500347c6010c8e1f5 Simple helper script to display translation statistics. diff -r e0faa3f5a4d3 -r 4437407ce3e9 po/gen_translations_stats.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/po/gen_translations_stats.sh Wed Apr 09 22:33:06 2008 +0000 @@ -0,0 +1,21 @@ +#!/bin/bash + +# This script prints translations statistics for .po files +# existing in the current directory + +echo "Translations statistics" +echo "Date: `date`" +echo + +for i in *.po; do + msgfmt --statistics -o /dev/null $i 2>&1 \ + | sed 's/^\([0-9]\+ \)[^0-9]*\([0-9]\+ \)\?[^0-9]*\([0-9]\+ \)\?[^0-9]*$/\1\2\3/g' \ + | awk '{ \ + tot = $1 + $2 + $3; \ + if (tot != 0) \ + printf "%8.0f %8s %6.02f%% (%3d/%3d untranslated)\n",\ + ($1*100/tot)*100, "'"$i"'", $1*100/tot, $2+$3, tot}' ; +done | sort -b -k1,1nr -k2,2 | sed 's/^ *[0-9]*//' + +echo +