Make transifex the only source of translations
Prior to this change we attempted to push translations made direclty in the git tree to transifex allowing translations to be made via git directly or in transifex. Simplify the process to avoid cases where the transifex client will refuse to update local translations because they are newer than those in transifex. This makes transifex the only source of translation updates. In addition to simplifying the process force tx pull -a operations as a way to force the updates if we end up in this state. Change-Id: I171b3b1a29cbeaab0c4d9de3ab1bd3a6b933ea53
This commit is contained in:
parent
7efad89609
commit
a8c6385871
@ -47,7 +47,7 @@ fi
|
||||
tx set --auto-local -r ${PROJECT}.${PROJECT}-translations "${PROJECT}/locale/<lang>/LC_MESSAGES/${PROJECT}.po" --source-lang en --source-file ${PROJECT}/locale/${PROJECT}.pot -t PO --execute
|
||||
|
||||
# Pull all upstream translations
|
||||
tx pull -a
|
||||
tx pull -a -f
|
||||
# Update the .pot file
|
||||
python setup.py extract_messages
|
||||
PO_FILES=`find ${PROJECT}/locale -name '*.po'`
|
||||
@ -68,14 +68,4 @@ then
|
||||
$COMMIT_MSG
|
||||
EOF
|
||||
git review -t transifex/translations
|
||||
|
||||
# Push .pot changes to transifex
|
||||
tx --debug --traceback push -s
|
||||
# Push translation changes to transifex
|
||||
# Disable -e as we can live with failed translation pushes (failures
|
||||
# occur when a translation file has no translations in it not really
|
||||
# error worthy but they occur)
|
||||
set +e
|
||||
tx --debug --traceback push -t --skip
|
||||
set -e
|
||||
fi
|
||||
|
@ -82,14 +82,8 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! `git diff --cached --quiet HEAD --` ]
|
||||
then
|
||||
# Push .pot changes to transifex
|
||||
tx --debug --traceback push -s
|
||||
fi
|
||||
|
||||
# Pull all upstream translations
|
||||
tx pull -a
|
||||
tx pull -a -f
|
||||
|
||||
for FILE in ${DocFolder}/*
|
||||
do
|
||||
|
@ -28,8 +28,6 @@ if [ ! -d .tx ] ; then
|
||||
fi
|
||||
tx set --auto-local -r ${PROJECT}.${PROJECT}-translations "${PROJECT}/locale/<lang>/LC_MESSAGES/${PROJECT}.po" --source-lang en --source-file ${PROJECT}/locale/${PROJECT}.pot -t PO --execute
|
||||
|
||||
# Pull all upstream translations
|
||||
tx pull -a
|
||||
# Update the .pot file
|
||||
python setup.py extract_messages
|
||||
PO_FILES=`find ${PROJECT}/locale -name '*.po'`
|
||||
@ -45,11 +43,4 @@ if [ ! `git diff-index --quiet HEAD --` ]
|
||||
then
|
||||
# Push .pot changes to transifex
|
||||
tx --debug --traceback push -s
|
||||
# Push translation changes to transifex
|
||||
# Disable -e as we can live with failed translation pushes (failures
|
||||
# occur when a translation file has no translations in it not really
|
||||
# error worthy but they occur)
|
||||
set +e
|
||||
tx --debug --traceback push -t --skip
|
||||
set -e
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user