From 221b0a8e10afc3f2c9148caf3cb727760a205eb8 Mon Sep 17 00:00:00 2001 From: Daniel Albers Date: Tue, 10 Apr 2012 21:21:17 +0200 Subject: [PATCH] pull-from-transifex.sh: pull newly added languages as well new file: scripts/tx-sync.sh --- po/pull-from-transifex.sh | 9 ++++++--- scripts/tx-sync.sh | 11 +++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100755 scripts/tx-sync.sh diff --git a/po/pull-from-transifex.sh b/po/pull-from-transifex.sh index 8c976927..44b97666 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 (<>) { @@ -21,5 +24,5 @@ git add po/*.po && ( git commit -em "Update translations from Transifex Many thanks to: -${translators}" po/*.po +${translators}" ) diff --git a/scripts/tx-sync.sh b/scripts/tx-sync.sh new file mode 100755 index 00000000..c60d6af0 --- /dev/null +++ b/scripts/tx-sync.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +quasselsrc=/usr/src/quassel +localpobranch=i18n-tx-sync + +pushd "$quasselsrc" && ( + currb=$(git name-rev --name-only HEAD) + git checkout -q $localpobranch && ( + EDITOR=/bin/true VISUAL=/usr/bin/editor "$quasselsrc"/po/pull-from-transifex.sh -f && + git push -q + ); git checkout -q "$currb" +); popd -- 2.20.1