Merge "magnum-ui use generic django translation processing"

This commit is contained in:
Jenkins 2016-01-26 09:49:39 +00:00 committed by Gerrit Code Review
commit c1b98cd198
3 changed files with 14 additions and 37 deletions

View File

@ -339,17 +339,6 @@ function setup_django_openstack_auth {
'{locale_with_underscore}/LC_MESSAGES/django.po' -f zanata.xml
}
# Setup project magnum-ui for Zanata
function setup_magnum_ui {
local project=magnum-ui
local version=${1:-master}
/usr/local/jenkins/slave_scripts/create-zanata-xml.py \
-p $project -v $version --srcdir magnum_ui/locale \
--txdir magnum_ui/locale -r '**/*.pot' \
'{locale_with_underscore}/LC_MESSAGES/{filename}.po' -f zanata.xml
}
# Filter out files that we do not want to commit
function filter_commits {
# Don't add new empty files.

View File

@ -132,22 +132,6 @@ function propose_django_openstack_auth {
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/*
}
# This function can be used for all django projects
function propose_django {
local project=$1
@ -182,19 +166,21 @@ case "$PROJECT" in
propose_training_guides
;;
django_openstack_auth)
# NOTE: Once POT file and Zanata resource name are renamed
# from openstack_auth(.pot) to django(.pot), the below can be used.
# setup_django django_openstack_auth openstack_auth "$ZANATA_VERSION"
setup_django_openstack_auth "$ZANATA_VERSION"
# NOTE: Once django_openstack_auth repo has babel-django.cfg,
# the below can be used.
# propose_django django_openstack_auth openstack_auth
propose_django_openstack_auth
;;
horizon)
setup_horizon "$ZANATA_VERSION"
propose_horizon
;;
magnum-ui)
setup_magnum_ui "$ZANATA_VERSION"
propose_magnum_ui
;;
# Test of translation setup improvement
murano-dashboard)
murano-dashboard|magnum-ui)
# TODO(amotoki): Honor module name in propose_*
# MODULENAME=$(get_modulename $PROJECT python)
# if [ -n "$MODULENAME" ]; then

View File

@ -41,19 +41,21 @@ case "$PROJECT" in
setup_training_guides "$ZANATA_VERSION"
;;
django_openstack_auth)
# NOTE: Once POT file and Zanata resource name are renamed
# from openstack_auth(.pot) to django(.pot), the below can be used.
# setup_django django_openstack_auth openstack_auth "$ZANATA_VERSION"
setup_django_openstack_auth "$ZANATA_VERSION"
# NOTE: Once django_openstack_auth repo has babel-django.cfg,
# the below can be used.
# extract_messages_django openstack_auth
extract_messages openstack_auth
;;
horizon)
setup_horizon "$ZANATA_VERSION"
./run_tests.sh --makemessages -V
;;
magnum-ui)
setup_magnum_ui "$ZANATA_VERSION"
./run_tests.sh --makemessages -V
;;
# Test of translation setup improvement
murano-dashboard)
murano-dashboard|magnum-ui)
# TODO(amotoki): Honor module name in extract_*
# MODULENAME=$(get_modulename $PROJECT python)
# if [ -n "$MODULENAME" ]; then