3 tx pull -a $* > /dev/null &&
6 done | sort > po/LINGUAS &&
7 git add po/*.po po/LINGUAS && (
8 translators=$(while read mode pofile; do
9 translator=$(git diff --cached -- ${pofile} | perl -le '
11 if (/^(?:\+(?:#|.*?:)|[ +]"Last-Translator:) *(.*?)(<[^@>]+@[^>]+>)/p) {
12 $xltrs{$2} = $1 unless $xltrs{$2};
13 last if $& =~ /Last-Translator:/;
16 push(@out, $n.$e) while (($e, $n) = each %xltrs);
17 print(join(", ", @out));
21 echo " - ${lang}: ${translator}"
22 done < <(git status --porcelain po/*.po | egrep '^[AM] '))
24 git commit -m "Update translations from Transifex
26 $(for i in po/*.po; do
27 msgfmt --statistics $i
29 perl -ne '/([0-9]+) translated/ and $translated+=$1;
30 END { printf("%d translated messages", $translated); }'