Add training-guides translation jobs and scripts
Change-Id: I129197fa9a711d2d1ee6b6b24889331b96af1514
This commit is contained in:
parent
b95d37ef23
commit
cc392a5a8f
@ -2781,6 +2781,7 @@
|
|||||||
description: Community created, open source training guides for OpenStack.
|
description: Community created, open source training guides for OpenStack.
|
||||||
options:
|
options:
|
||||||
- direct-release
|
- direct-release
|
||||||
|
- translate
|
||||||
- project: openstack/training-labs
|
- project: openstack/training-labs
|
||||||
description: Deploy multi node OpenStack on Virtual Machines.
|
description: Deploy multi node OpenStack on Virtual Machines.
|
||||||
- project: openstack/transparency-policy
|
- project: openstack/transparency-policy
|
||||||
|
@ -6887,6 +6887,7 @@
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-doc-jobs
|
- openstack-doc-jobs
|
||||||
|
- translation-jobs
|
||||||
- gate-{name}-tox-{envlist}:
|
- gate-{name}-tox-{envlist}:
|
||||||
envlist: slides
|
envlist: slides
|
||||||
|
|
||||||
|
@ -129,6 +129,23 @@ function setup_manuals {
|
|||||||
-f zanata.xml
|
-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
|
# Setup project so that git review works, sets global variable
|
||||||
# COMMIT_MSG.
|
# COMMIT_MSG.
|
||||||
function setup_review {
|
function setup_review {
|
||||||
|
@ -59,6 +59,19 @@ function propose_manuals {
|
|||||||
done
|
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 {
|
function update_po_files {
|
||||||
|
|
||||||
DIRECTORY=$1
|
DIRECTORY=$1
|
||||||
@ -183,6 +196,10 @@ case "$PROJECT" in
|
|||||||
setup_manuals "$PROJECT" "$ZANATA_VERSION"
|
setup_manuals "$PROJECT" "$ZANATA_VERSION"
|
||||||
propose_manuals
|
propose_manuals
|
||||||
;;
|
;;
|
||||||
|
training-guides)
|
||||||
|
setup_training_guides "$ZANATA_VERSION"
|
||||||
|
propose_training_guides
|
||||||
|
;;
|
||||||
django_openstack_auth)
|
django_openstack_auth)
|
||||||
setup_django_openstack_auth "$ZANATA_VERSION"
|
setup_django_openstack_auth "$ZANATA_VERSION"
|
||||||
propose_django_openstack_auth
|
propose_django_openstack_auth
|
||||||
|
@ -37,6 +37,9 @@ case "$PROJECT" in
|
|||||||
# POT file extraction is done in setup_manuals.
|
# POT file extraction is done in setup_manuals.
|
||||||
setup_manuals "$PROJECT" "$ZANATA_VERSION"
|
setup_manuals "$PROJECT" "$ZANATA_VERSION"
|
||||||
;;
|
;;
|
||||||
|
training-guides)
|
||||||
|
setup_training_guides "$ZANATA_VERSION"
|
||||||
|
;;
|
||||||
django_openstack_auth)
|
django_openstack_auth)
|
||||||
setup_django_openstack_auth "$ZANATA_VERSION"
|
setup_django_openstack_auth "$ZANATA_VERSION"
|
||||||
extract_messages
|
extract_messages
|
||||||
|
@ -9263,6 +9263,7 @@ projects:
|
|||||||
- name: openstack/training-guides
|
- name: openstack/training-guides
|
||||||
template:
|
template:
|
||||||
- name: merge-check
|
- name: merge-check
|
||||||
|
- name: translation-jobs
|
||||||
check:
|
check:
|
||||||
- gate-training-guides-tox-doc-publish-checkbuild
|
- gate-training-guides-tox-doc-publish-checkbuild
|
||||||
- gate-training-guides-tox-slides
|
- gate-training-guides-tox-slides
|
||||||
|
Loading…
Reference in New Issue
Block a user