Add training-guides translation jobs and scripts

Change-Id: I129197fa9a711d2d1ee6b6b24889331b96af1514
This commit is contained in:
KATO Tomoyuki 2015-11-16 10:43:42 +09:00
parent b95d37ef23
commit cc392a5a8f
6 changed files with 40 additions and 0 deletions

View File

@ -2781,6 +2781,7 @@
description: Community created, open source training guides for OpenStack.
options:
- direct-release
- translate
- project: openstack/training-labs
description: Deploy multi node OpenStack on Virtual Machines.
- project: openstack/transparency-policy

View File

@ -6887,6 +6887,7 @@
jobs:
- openstack-doc-jobs
- translation-jobs
- gate-{name}-tox-{envlist}:
envlist: slides

View File

@ -129,6 +129,23 @@ function setup_manuals {
-f zanata.xml
}
# Setup a training-guides project for Zanata
function setup_training_guides {
local project=$1
local version=${2:-master}
# Minimum amount of translation done, 75 % by default.
PERC=75
# Update the .pot file
tox -e generatepot-training
/usr/local/jenkins/slave_scripts/create-zanata-xml.py -p $project \
-v $version --srcdir doc/upstream-training/locale \
--txdir doc/upstream-training/locale \
-f zanata.xml
}
# Setup project so that git review works, sets global variable
# COMMIT_MSG.
function setup_review {

View File

@ -59,6 +59,19 @@ function propose_manuals {
done
}
# Propose updates for training-guides
function propose_training_guides {
# Pull updated translations from Zanata.
pull_from_zanata "$PROJECT"
# Compress downloaded po files
compress_po_files "doc/upstream-training"
# Add all changed files to git
git add doc/upstream-training/locale/*
}
function update_po_files {
DIRECTORY=$1
@ -183,6 +196,10 @@ case "$PROJECT" in
setup_manuals "$PROJECT" "$ZANATA_VERSION"
propose_manuals
;;
training-guides)
setup_training_guides "$ZANATA_VERSION"
propose_training_guides
;;
django_openstack_auth)
setup_django_openstack_auth "$ZANATA_VERSION"
propose_django_openstack_auth

View File

@ -37,6 +37,9 @@ case "$PROJECT" in
# POT file extraction is done in setup_manuals.
setup_manuals "$PROJECT" "$ZANATA_VERSION"
;;
training-guides)
setup_training_guides "$ZANATA_VERSION"
;;
django_openstack_auth)
setup_django_openstack_auth "$ZANATA_VERSION"
extract_messages

View File

@ -9263,6 +9263,7 @@ projects:
- name: openstack/training-guides
template:
- name: merge-check
- name: translation-jobs
check:
- gate-training-guides-tox-doc-publish-checkbuild
- gate-training-guides-tox-slides