From: Daniel Albers Date: Mon, 6 Feb 2012 16:23:25 +0000 (+0100) Subject: pull-from-transifex.sh: always attribute Last-Translator X-Git-Tag: 0.8-beta1~3 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=982bfbf8081be22ce7ce08adcf3ba92361ee7ca5 pull-from-transifex.sh: always attribute Last-Translator --- 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}"