Add and enable translation jobs for i18n repo
I18n team wants to support translations for I18n contributor guide : https://docs.openstack.org/developer/i18n/ . This patch adds and enables translation jobs for I18n contributor guide with i18n as Zanata project name. Change-Id: I89e3fbcdf0683aa859ef56f4ac24f175351ee355 Implements: blueprint i18n-guide-translation
This commit is contained in:
parent
751d038094
commit
d55ecca1c4
@ -4617,6 +4617,8 @@
|
||||
- project: openstack/i18n
|
||||
groups:
|
||||
- openstack-i18n
|
||||
options:
|
||||
- translate
|
||||
description: Utilities, assets and configrations used by I18n team
|
||||
- project: openstack/i18n-specs
|
||||
groups:
|
||||
|
@ -5449,6 +5449,7 @@
|
||||
- gate-{name}-docs-{node}:
|
||||
node: ubuntu-xenial
|
||||
- gate-{name}-requirements
|
||||
- translation-jobs
|
||||
|
||||
- project:
|
||||
name: i18n-specs
|
||||
|
@ -247,6 +247,21 @@ function setup_training_guides {
|
||||
-f zanata.xml
|
||||
}
|
||||
|
||||
# Setup a i18n project for Zanata
|
||||
function setup_i18n {
|
||||
local project=i18n
|
||||
local version=${1:-master}
|
||||
|
||||
# Update the .pot file
|
||||
tox -e generatepot
|
||||
|
||||
/usr/local/jenkins/slave_scripts/create-zanata-xml.py \
|
||||
-p $project -v $version \
|
||||
--srcdir doc/source/locale \
|
||||
--txdir doc/source/locale \
|
||||
-f zanata.xml
|
||||
}
|
||||
|
||||
# Setup a ReactJS project for Zanata
|
||||
function setup_reactjs_project {
|
||||
local project=$1
|
||||
|
@ -106,6 +106,19 @@ function propose_training_guides {
|
||||
git_add_po_files doc/upstream-training/source/locale
|
||||
}
|
||||
|
||||
# Propose updates for i18n
|
||||
function propose_i18n {
|
||||
|
||||
# Pull updated translations from Zanata.
|
||||
pull_from_zanata "$PROJECT"
|
||||
|
||||
# Cleanup po and pot files
|
||||
cleanup_module "doc"
|
||||
|
||||
# Add all changed files to git
|
||||
git_add_po_files doc/source/locale
|
||||
}
|
||||
|
||||
|
||||
# Propose updates for python and django projects
|
||||
function propose_python_django {
|
||||
@ -264,6 +277,10 @@ case "$PROJECT" in
|
||||
setup_training_guides "$ZANATA_VERSION"
|
||||
propose_training_guides
|
||||
;;
|
||||
i18n)
|
||||
setup_i18n "$ZANATA_VERSION"
|
||||
propose_i18n
|
||||
;;
|
||||
tripleo-ui)
|
||||
setup_reactjs_project "$PROJECT" "$ZANATA_VERSION"
|
||||
propose_reactjs
|
||||
|
@ -68,6 +68,10 @@ case "$PROJECT" in
|
||||
setup_training_guides "$ZANATA_VERSION"
|
||||
ALL_MODULES="doc"
|
||||
;;
|
||||
i18n)
|
||||
setup_i18n "$ZANATA_VERSION"
|
||||
ALL_MODULES="doc"
|
||||
;;
|
||||
tripleo-ui)
|
||||
setup_reactjs_project "$PROJECT" "$ZANATA_VERSION"
|
||||
# The pot file is generated in the ./i18n directory
|
||||
|
@ -10757,6 +10757,7 @@ projects:
|
||||
- name: openstack/i18n
|
||||
template:
|
||||
- name: merge-check
|
||||
- name: translation-jobs
|
||||
- name: check-requirements
|
||||
- name: openstack-server-publish-jobs
|
||||
check:
|
||||
|
Loading…
x
Reference in New Issue
Block a user