projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3ff1ec5
)
pull-from-transifex.sh: support multiple translators
author
Daniel Albers
<daniel@lbe.rs>
Tue, 31 Jan 2012 00:34:26 +0000
(
01:34
+0100)
committer
Daniel Albers
<daniel@lbe.rs>
Tue, 14 Feb 2012 21:43:02 +0000
(22:43 +0100)
po/pull-from-transifex.sh
patch
|
blob
|
history
diff --git
a/po/pull-from-transifex.sh
b/po/pull-from-transifex.sh
index
cbefc82
..
e5dd6b1
100755
(executable)
--- a/
po/pull-from-transifex.sh
+++ b/
po/pull-from-transifex.sh
@@
-1,15
+1,15
@@
#!/bin/bash
#!/bin/bash
-tx pull &&
+tx pull
$*
&&
git add po/*.po && (
translators=$(while read mode pofile; do
git add po/*.po && (
translators=$(while read mode pofile; do
- translator=$(
perl -ne 's/^"Last-Translator: (.*?)(?:\\n)?"$/\1/ && print $1;' ${pofile}
)
+ 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));'
)
lang=${pofile%.po}
lang=${lang#po/}
echo " - ${lang}: ${translator}"
done < <(git status --porcelain po/*.po | egrep '^[AM] '))
lang=${pofile%.po}
lang=${lang#po/}
echo " - ${lang}: ${translator}"
done < <(git status --porcelain po/*.po | egrep '^[AM] '))
- git commit -m "Update translations from Transifex
+ git commit -
e
m "Update translations from Transifex
Many thanks to:
${translators}" po/*.po
Many thanks to:
${translators}" po/*.po