diff --git a/modules/jenkins/files/slave_scripts/propose_translation_update.sh b/modules/jenkins/files/slave_scripts/propose_translation_update.sh index c06772396f..78e0d325c3 100755 --- a/modules/jenkins/files/slave_scripts/propose_translation_update.sh +++ b/modules/jenkins/files/slave_scripts/propose_translation_update.sh @@ -46,8 +46,10 @@ if [ ! -d .tx ] ; then fi tx set --auto-local -r ${PROJECT}.${PROJECT}-translations "${PROJECT}/locale//LC_MESSAGES/${PROJECT}.po" --source-lang en --source-file ${PROJECT}/locale/${PROJECT}.pot -t PO --execute -# Pull all upstream translations -tx pull -a -f +# Pull upstream translations of files that are at least 75 % +# translated +tx pull -a -f --minimum-perc=75 + # Update the .pot file python setup.py extract_messages PO_FILES=`find ${PROJECT}/locale -name '*.po'` diff --git a/modules/jenkins/files/slave_scripts/propose_translation_update_horizon.sh b/modules/jenkins/files/slave_scripts/propose_translation_update_horizon.sh index 1e9e246f9e..62259b8557 100755 --- a/modules/jenkins/files/slave_scripts/propose_translation_update_horizon.sh +++ b/modules/jenkins/files/slave_scripts/propose_translation_update_horizon.sh @@ -58,8 +58,9 @@ tx set --auto-local -r ${PROJECT}.openstack-dashboard-translations \ "openstack_dashboard/locale//LC_MESSAGES/django.po" --source-lang en \ --source-file openstack_dashboard/locale/en/LC_MESSAGES/django.po -t PO --execute -# Pull all upstream translations -tx pull -a -f +# Pull upstream translations of files that are at least 75 % +# translated +tx pull -a -f --minimum-perc=75 # Invoke run_tests.sh to update the po files # Or else, "../manage.py makemessages" can be used. 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 30ae6fe390..14d077c2a2 100755 --- a/modules/jenkins/files/slave_scripts/propose_translation_update_manuals.sh +++ b/modules/jenkins/files/slave_scripts/propose_translation_update_manuals.sh @@ -82,8 +82,18 @@ do fi done -# Pull all upstream translations -tx pull -a -f +# Pull upstream translations of files that are at least 75 % +# translated +tx pull -a -f --minimum-perc=75 + +# The common directory is used by the other guides, let's be more +# liberal here since teams might only translate the files used by a +# single guide. We use 8 % since that downloads the currently +# translated files. +if [ $PROJECT = "openstack-manuals" ] ; then + tx pull -f --minimum-perc=8 -r openstack-manuals-i18n.common +fi + for FILE in ${DocFolder}/* do