X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=po%2Fpull-from-transifex.sh;h=a0fc017ed44ad063ddabe1443239ce06dfc81567;hp=8c976927c05e7ececad983b7352a5976faac6d61;hb=96845023c5b4dc1402138b47a88b3dcdf07f40a8;hpb=9fe2be5f18da69d68451e51160a8dda609e82c9f diff --git a/po/pull-from-transifex.sh b/po/pull-from-transifex.sh index 8c976927..a0fc017e 100755 --- a/po/pull-from-transifex.sh +++ b/po/pull-from-transifex.sh @@ -1,7 +1,10 @@ #!/bin/bash -tx pull $* > /dev/null && -git add po/*.po && ( +tx pull -a $* > /dev/null && +for po in po/*.po; do + basename "${po%.po}" +done | sort > po/LINGUAS && +git add po/*.po po/LINGUAS && ( translators=$(while read mode pofile; do translator=$(git diff --cached -- ${pofile} | perl -le ' while (<>) { @@ -20,6 +23,13 @@ git add po/*.po && ( git commit -em "Update translations from Transifex + $(for i in po/*.po; do + msgfmt --statistics $i + done |& + perl -ne '/([0-9]+) translated/ and $translated+=$1; + END { printf("%d translated messages", $translated); }' + ) + Many thanks to: -${translators}" po/*.po +${translators}" )