Edgewall Software

Ticket #5476: updates-and-verify-trac-messages.sh

File updates-and-verify-trac-messages.sh, 610 bytes (added by lwatter, 2 years ago)

Script that updates from svn and verify translation messages and calculates % of translations

Line 
1pushd ~/scm/trac/trac-0.12dev
2svn up
3python setup.py extract_messages
4python setup.py update_catalog -l pt_BR
5make check compile locale=pt_BR
6
7make stats-pt_BR 1>x 2>&1
8make stats-pot 1>y 2>&1
9TRAD=`cat x | cut -f 2 -d ' '`
10ORIG=`cat y | grep stats | cut -f 5 -d ' '`
11PORC=`echo "scale=2; ($TRAD / $ORIG) * 100" | bc | sed 's/\.\([0-9]*\)//'`
12echo "Commit Message:"
13read MSG
14if ! [ "$MSG"x == ""x ]; then
15        #echo "l10n/pt_BR: $MSG ($PORC%)"
16        echo "Execute:"
17        echo "svn commit -m \"l10n/pt_BR: $MSG ($PORC%)\" trac/locale/pt_BR/LC_MESSAGES/messages.po"
18else
19        echo "Re-execute e digite uma mensagem de commit"
20fi