From 5d3ba981e213f5d83ab57df9e06c87a9513f19d9 Mon Sep 17 00:00:00 2001 From: Daniel Albers Date: Thu, 11 Feb 2016 01:17:08 +0100 Subject: [PATCH] Add catalog update to tx-sync.sh. Transifex now offers automatic fetching of source files. Let tx-sync.sh regenerate and commit quassel.pot automatically to make use of that. --- po/README.Translations | 11 +++++++++-- scripts/tx-sync.sh | 13 ++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/po/README.Translations b/po/README.Translations index 29a6d9c0..d495525a 100644 --- a/po/README.Translations +++ b/po/README.Translations @@ -32,5 +32,12 @@ NOTE: You'll need lupdate, lconvert, lrelease installed with your Qt in order to generate translation files. Some distributions don't package that tool; in that case you won't get translations. - -The .pot file can be regenerated with `./update-pot.sh` +The .pot file is regenerated using `./update-pot.sh` and can be pushed +to Transifex via `tx push -s`. +Note that as of Feb 2016 this is done automatically by nightly runs of +scripts/tx-sync.sh which pushes an updated quassel.pot to a location +that is fetched by Transifex on regular intervals. This location is +currently configured as + and +can be updated at https://www.transifex.com/ald/quassel/content/ → "Auto +update resources". diff --git a/scripts/tx-sync.sh b/scripts/tx-sync.sh index 47b931cc..33289ab7 100755 --- a/scripts/tx-sync.sh +++ b/scripts/tx-sync.sh @@ -1,12 +1,19 @@ #!/usr/bin/env bash +set -u quasselsrc=/usr/src/quassel localpobranch=i18n-tx-sync +remote=origin +branch=master pushd "$quasselsrc" && ( currb=$(git name-rev --name-only HEAD) git checkout -q $localpobranch && ( - git pull -q - EDITOR=/bin/true VISUAL=/usr/bin/editor "$quasselsrc"/po/pull-from-transifex.sh -f && - git push -q + git pull -q --no-edit $remote $branch && + pushd po/ && + ./update-pot.sh && + git commit -qm 'Update quassel.pot' ${quasselsrc}/po/quassel.pot + popd && + "$quasselsrc"/po/pull-from-transifex.sh -f && + git push -q ); git checkout -q "$currb" ); popd -- 2.20.1