X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=po%2Fpull-from-transifex.sh;h=bd513e6aef5b068789cc69b8b5e7adaf4c75c680;hb=57ec86fb8047e3b5b539bbdb9c833e7cd5f95f31;hp=e5dd6b19f6959b1b7831eadb914d2d698a069657;hpb=37112539ef48c17968eb2d55fb8fc76b20329040;p=quassel.git diff --git a/po/pull-from-transifex.sh b/po/pull-from-transifex.sh index e5dd6b19..bd513e6a 100755 --- a/po/pull-from-transifex.sh +++ b/po/pull-from-transifex.sh @@ -3,7 +3,16 @@ tx pull $* && git add po/*.po && ( translators=$(while read mode pofile; do - translator=$(git diff --cached -- ${pofile} | perl -le 'while (<>) { if (/^\+(?:#|.*?:) *(.*?)(<[^@>]+@[^>]+>)/p) { $xltrs{$2} = $1 unless $xltrs{$2}; } last if /^\+"Last-Translator: /; }; push(@out, $n.$e) while (($e, $n) = each %xltrs); print(join(", ", @out));') + translator=$(git diff --cached -- ${pofile} | perl -le ' + while (<>) { + if (/^(?:\+(?:#|.*?:)|[ +]"Last-Translator:) *(.*?)(<[^@>]+@[^>]+>)/p) { + $xltrs{$2} = $1 unless $xltrs{$2}; + last if $& =~ /Last-Translator:/; + } + } + push(@out, $n.$e) while (($e, $n) = each %xltrs); + print(join(", ", @out)); + ') lang=${pofile%.po} lang=${lang#po/} echo " - ${lang}: ${translator}"