diff --git a/modules/openstack_project/files/slave_scripts/common_translation_update.sh b/modules/openstack_project/files/slave_scripts/common_translation_update.sh index cadb3ed0a1..7509c7d8d6 100644 --- a/modules/openstack_project/files/slave_scripts/common_translation_update.sh +++ b/modules/openstack_project/files/slave_scripts/common_translation_update.sh @@ -27,7 +27,7 @@ function setup_translation () # Setup a project for transifex function setup_project () { - project=$1 + local project=$1 tx set --auto-local -r ${project}.${project}-translations \ "${project}/locale//LC_MESSAGES/${project}.po" \ @@ -36,6 +36,33 @@ function setup_project () --execute } +# Setup project horizon for transifex +function setup_horizon () +{ + local project=horizon + + # Horizon JavaScript Translations + tx set --auto-local -r ${project}.${project}-js-translations \ + "${project}/locale//LC_MESSAGES/djangojs.po" \ + --source-lang en \ + --source-file ${project}/locale/en/LC_MESSAGES/djangojs.po \ + -t PO --execute + + # Horizon Translations + tx set --auto-local -r ${project}.${project}-translations \ + "${project}/locale//LC_MESSAGES/django.po" \ + --source-lang en \ + --source-file ${project}/locale/en/LC_MESSAGES/django.po \ + -t PO --execute + + # OpenStack Dashboard Translations + 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 +} + # Setup git so that git review works function setup_git () { @@ -48,8 +75,8 @@ function setup_git () # COMMIT_MSG. function setup_review () { - ORG="$1" - PROJECT="$2" + local ORG="$1" + local PROJECT="$2" COMMIT_MSG="Imported Translations from Transifex" diff --git a/modules/openstack_project/files/slave_scripts/propose_translation_update.sh b/modules/openstack_project/files/slave_scripts/propose_translation_update.sh index dc61d94d83..a739cea75c 100755 --- a/modules/openstack_project/files/slave_scripts/propose_translation_update.sh +++ b/modules/openstack_project/files/slave_scripts/propose_translation_update.sh @@ -14,7 +14,6 @@ ORG=$1 PROJECT=$2 -COMMIT_MSG="Imported Translations from Transifex" source /usr/local/jenkins/slave_scripts/common_translation_update.sh diff --git a/modules/openstack_project/files/slave_scripts/propose_translation_update_horizon.sh b/modules/openstack_project/files/slave_scripts/propose_translation_update_horizon.sh index 923e0acd7d..74477b381e 100755 --- a/modules/openstack_project/files/slave_scripts/propose_translation_update_horizon.sh +++ b/modules/openstack_project/files/slave_scripts/propose_translation_update_horizon.sh @@ -14,7 +14,6 @@ ORG=openstack PROJECT=horizon -COMMIT_MSG="Imported Translations from Transifex" source /usr/local/jenkins/slave_scripts/common_translation_update.sh @@ -22,19 +21,7 @@ setup_git setup_review "$ORG" "$PROJECT" setup_translation - -# Horizon JavaScript Translations -tx set --auto-local -r ${PROJECT}.${PROJECT}-js-translations \ -"${PROJECT}/locale//LC_MESSAGES/djangojs.po" --source-lang en \ ---source-file ${PROJECT}/locale/en/LC_MESSAGES/djangojs.po -t PO --execute -# Horizon Translations -tx set --auto-local -r ${PROJECT}.${PROJECT}-translations \ -"${PROJECT}/locale//LC_MESSAGES/django.po" --source-lang en \ ---source-file ${PROJECT}/locale/en/LC_MESSAGES/django.po -t PO --execute -# OpenStack Dashboard Translations -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 +setup_horizon # Pull upstream translations of files that are at least 75 % # translated diff --git a/modules/openstack_project/files/slave_scripts/propose_translation_update_manuals.sh b/modules/openstack_project/files/slave_scripts/propose_translation_update_manuals.sh index 6d1b3ca064..b903544dd2 100755 --- a/modules/openstack_project/files/slave_scripts/propose_translation_update_manuals.sh +++ b/modules/openstack_project/files/slave_scripts/propose_translation_update_manuals.sh @@ -25,8 +25,6 @@ if [ $PROJECT = "api-site" ] ; then DocFolder="./" fi -COMMIT_MSG="Imported Translations from Transifex" - source /usr/local/jenkins/slave_scripts/common_translation_update.sh setup_git diff --git a/modules/openstack_project/files/slave_scripts/upstream_translation_horizon.sh b/modules/openstack_project/files/slave_scripts/upstream_translation_horizon.sh index 2131c78bc9..b144f10c28 100755 --- a/modules/openstack_project/files/slave_scripts/upstream_translation_horizon.sh +++ b/modules/openstack_project/files/slave_scripts/upstream_translation_horizon.sh @@ -28,18 +28,7 @@ source /usr/local/jenkins/slave_scripts/common_translation_update.sh setup_git setup_translation -# Horizon JavaScript Translations -tx set --auto-local -r ${PROJECT}.${PROJECT}-js-translations \ -"${PROJECT}/locale//LC_MESSAGES/djangojs.po" --source-lang en \ ---source-file ${PROJECT}/locale/en/LC_MESSAGES/djangojs.po -t PO --execute -# Horizon Translations -tx set --auto-local -r ${PROJECT}.${PROJECT}-translations \ -"${PROJECT}/locale//LC_MESSAGES/django.po" --source-lang en \ ---source-file ${PROJECT}/locale/en/LC_MESSAGES/django.po -t PO --execute -# OpenStack Dashboard Translations -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 +setup_horizon # Invoke run_tests.sh to update the po files # Or else, "../manage.py makemessages" can be used. @@ -54,4 +43,3 @@ then # Push source file changes to transifex tx --debug --traceback push -s fi -