pushd ~/scm/trac/trac-0.12dev
svn up
python setup.py extract_messages
python setup.py update_catalog -l pt_BR
make check compile locale=pt_BR

make stats-pt_BR 1>x 2>&1
make stats-pot 1>y 2>&1
TRAD=`cat x | cut -f 2 -d ' '`
ORIG=`cat y | grep stats | cut -f 5 -d ' '`
PORC=`echo "scale=2; ($TRAD / $ORIG) * 100" | bc | sed 's/\.\([0-9]*\)//'`
echo "Commit Message:"
read MSG
if ! [ "$MSG"x == ""x ]; then
	#echo "l10n/pt_BR: $MSG ($PORC%)"
	echo "Execute:"
	echo "svn commit -m \"l10n/pt_BR: $MSG ($PORC%)\" trac/locale/pt_BR/LC_MESSAGES/messages.po"
else
	echo "Re-execute e digite uma mensagem de commit"
fi

