From 66e39fd25f1fe8bc8ebad9b12c4393336cb3f08f Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 31 Oct 2015 09:27:24 +0100 Subject: [PATCH] Fix up magnum-ui setup Magnum-ui is setup similar to horizon with two django pot files. Invoke run_tests.sh here. Change-Id: I09350bfd384f84d132dc03d9bae2a5015acb6b0f --- jenkins/scripts/propose_translation_update.sh | 29 ++++++++++++++----- .../scripts/upstream_translation_update.sh | 2 +- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/jenkins/scripts/propose_translation_update.sh b/jenkins/scripts/propose_translation_update.sh index 206b9b80f5..618c6caa3f 100755 --- a/jenkins/scripts/propose_translation_update.sh +++ b/jenkins/scripts/propose_translation_update.sh @@ -138,8 +138,7 @@ function propose_horizon { git add horizon/locale/* openstack_dashboard/locale/* } -function propose_django { - local directory=$1 +function propose_django_openstack_auth { # Pull updated translations from Zanata. pull_from_zanata "$PROJECT" @@ -147,13 +146,29 @@ function propose_django { # Update the .pot file extract_messages - update_po_files "$directory" + update_po_files "openstack_auth" # Compress downloaded po files - compress_po_files "$directory" + compress_po_files "openstack_auth" # Add all changed files to git - git add $directory/locale/* + git add openstack_auth/locale/* +} + +function propose_magnum_ui { + + # Pull updated translations from Zanata. + pull_from_zanata "$PROJECT" + + # Invoke run_tests.sh to update the po files + # Or else, "../manage.py makemessages" can be used. + ./run_tests.sh --makemessages -V + + # Compress downloaded po files + compress_po_files "magnum_ui" + + # Add all changed files to git + git add magnum_ui/locale/* } # Setup git repository for git review. @@ -170,7 +185,7 @@ case "$PROJECT" in ;; django_openstack_auth) setup_django_openstack_auth "$ZANATA_VERSION" - propose_django "openstack_auth" + propose_django_openstack_auth ;; horizon) setup_horizon "$ZANATA_VERSION" @@ -178,7 +193,7 @@ case "$PROJECT" in ;; magnum-ui) setup_magnum_ui "$ZANATA_VERSION" - propose_django "magnum_ui" + propose_magnum_ui ;; *) # Project specific setup. diff --git a/jenkins/scripts/upstream_translation_update.sh b/jenkins/scripts/upstream_translation_update.sh index dd6fb888b9..0927d65128 100755 --- a/jenkins/scripts/upstream_translation_update.sh +++ b/jenkins/scripts/upstream_translation_update.sh @@ -47,7 +47,7 @@ case "$PROJECT" in ;; magnum-ui) setup_magnum_ui "$ZANATA_VERSION" - extract_messages + ./run_tests.sh --makemessages -V ;; *) setup_project "$PROJECT" "$ZANATA_VERSION"