diff --git a/modules/jenkins/files/slave_scripts/propose_translation_update.sh b/modules/jenkins/files/slave_scripts/propose_translation_update.sh index 91ffa7250c..da567cc09d 100755 --- a/modules/jenkins/files/slave_scripts/propose_translation_update.sh +++ b/modules/jenkins/files/slave_scripts/propose_translation_update.sh @@ -40,8 +40,10 @@ EOF set -e fi -# initialize transifex client -tx init --host=https://www.transifex.com +# Initialize the transifex client, if there's no .tx directory +if [ ! -d .tx ] ; then + tx init --host=https://www.transifex.com +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 diff --git a/modules/jenkins/files/slave_scripts/propose_translation_update_manuals.sh b/modules/jenkins/files/slave_scripts/propose_translation_update_manuals.sh index 81203ef5f1..cf5e16f4a9 100755 --- a/modules/jenkins/files/slave_scripts/propose_translation_update_manuals.sh +++ b/modules/jenkins/files/slave_scripts/propose_translation_update_manuals.sh @@ -50,8 +50,10 @@ EOF set -e fi -# Initialize transifex client -tx init --host=https://www.transifex.com +# Initialize the transifex client, if there's no .tx directory +if [ ! -d .tx ] ; then + tx init --host=https://www.transifex.com +fi # Generate pot one by one for FILE in ${DocFolder}/* diff --git a/modules/jenkins/files/slave_scripts/upstream_translation_update.sh b/modules/jenkins/files/slave_scripts/upstream_translation_update.sh index dd35216629..59e5928ac3 100755 --- a/modules/jenkins/files/slave_scripts/upstream_translation_update.sh +++ b/modules/jenkins/files/slave_scripts/upstream_translation_update.sh @@ -22,8 +22,10 @@ fi git config user.name "OpenStack Jenkins" git config user.email "jenkins@openstack.org" -# initialize transifex client -tx init --host=https://www.transifex.com +# Initialize the transifex client, if there's no .tx directory +if [ ! -d .tx ] ; then + tx init --host=https://www.transifex.com +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 diff --git a/modules/jenkins/files/slave_scripts/upstream_translation_update_manuals.sh b/modules/jenkins/files/slave_scripts/upstream_translation_update_manuals.sh index dc533ec4f6..d3d5735bc4 100755 --- a/modules/jenkins/files/slave_scripts/upstream_translation_update_manuals.sh +++ b/modules/jenkins/files/slave_scripts/upstream_translation_update_manuals.sh @@ -31,8 +31,10 @@ fi git config user.name "OpenStack Jenkins" git config user.email "jenkins@openstack.org" -# Initialize transifex client -tx init --host=https://www.transifex.com +# Initialize the transifex client, if there's no .tx directory +if [ ! -d .tx ] ; then + tx init --host=https://www.transifex.com +fi # Generate pot one by one for FILE in ${DocFolder}/*