Merge "[translation] doc generatepot jobs for 3 projects"
This commit is contained in:
@@ -5121,6 +5121,8 @@
|
|||||||
description: Repository containing OpenStack repositories
|
description: Repository containing OpenStack repositories
|
||||||
- project: openstack/openstack-ansible
|
- project: openstack/openstack-ansible
|
||||||
description: Ansible playbooks for deploying OpenStack.
|
description: Ansible playbooks for deploying OpenStack.
|
||||||
|
options:
|
||||||
|
- translate
|
||||||
- project: openstack/openstack-ansible-apt_package_pinning
|
- project: openstack/openstack-ansible-apt_package_pinning
|
||||||
description: Role apt_package_pinning for OpenStack-Ansible
|
description: Role apt_package_pinning for OpenStack-Ansible
|
||||||
groups:
|
groups:
|
||||||
@@ -5480,6 +5482,8 @@
|
|||||||
- openstack-helm
|
- openstack-helm
|
||||||
description: Helm charts for deploying OpenStack on Kubernetes
|
description: Helm charts for deploying OpenStack on Kubernetes
|
||||||
use-storyboard: true
|
use-storyboard: true
|
||||||
|
options:
|
||||||
|
- translate
|
||||||
- project: openstack/openstack-helm-addons
|
- project: openstack/openstack-helm-addons
|
||||||
use-storyboard: true
|
use-storyboard: true
|
||||||
groups:
|
groups:
|
||||||
|
@@ -417,6 +417,51 @@ function extract_messages_django {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Extract doc messages
|
||||||
|
function extract_messages_doc {
|
||||||
|
# Temporary build folder for gettext
|
||||||
|
mkdir -p doc/build/gettext
|
||||||
|
|
||||||
|
# Extract messages
|
||||||
|
sphinx-build -b gettext doc/source \
|
||||||
|
doc/build/gettext/
|
||||||
|
# Manipulates pot translation sources if needed
|
||||||
|
if [[ -f tools/doc-pot-filter.sh ]]; then
|
||||||
|
tools/doc-pot-filter.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
# New translation target projects may not have locale folder
|
||||||
|
mkdir -p doc/source/locale
|
||||||
|
|
||||||
|
# Sphinx builds a pot file for each directory and for each file
|
||||||
|
# in the top-level directory.
|
||||||
|
# We keep the directory files and concatenate all top-level files.
|
||||||
|
local has_other=0
|
||||||
|
for f in doc/build/gettext/*.pot; do
|
||||||
|
local fn=$(basename $f .pot)
|
||||||
|
# If a pot file corresponds to a directory, we use the pot file as-is.
|
||||||
|
if [ -d doc/source/$fn ]; then
|
||||||
|
# Remove UUIDs, those are not necessary and change too often
|
||||||
|
msgcat --use-first --sort-by-file $f | \
|
||||||
|
awk '$0 !~ /^\# [a-z0-9]+$/' > doc/source/locale/doc-$fn.pot
|
||||||
|
rm $f
|
||||||
|
else
|
||||||
|
has_other=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# We concatenate remaining into a single pot file so that
|
||||||
|
# "git add ${DIRECTORY}/source/locale" will only add a
|
||||||
|
# single pot file for all top-level files.
|
||||||
|
if [ "$has_other" = "1" ]; then
|
||||||
|
# Remove UUIDs, those are not necessary and change too often
|
||||||
|
msgcat --use-first --sort-by-file doc/build/gettext/*.pot | \
|
||||||
|
awk '$0 !~ /^\# [a-z0-9]+$/' > doc/source/locale/doc.pot
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf doc/build/gettext/
|
||||||
|
}
|
||||||
|
|
||||||
# Extract releasenotes messages
|
# Extract releasenotes messages
|
||||||
function extract_messages_releasenotes {
|
function extract_messages_releasenotes {
|
||||||
local keep_workdir=$1
|
local keep_workdir=$1
|
||||||
|
@@ -114,6 +114,15 @@ case "$PROJECT" in
|
|||||||
ALL_MODULES="$modulename $ALL_MODULES"
|
ALL_MODULES="$modulename $ALL_MODULES"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
# ---- Documentation ----
|
||||||
|
# Let's test this with some repos :)
|
||||||
|
DOC_TARGETS=('horizon' 'openstack-ansible' 'openstack-helm')
|
||||||
|
if [[ -f doc/source/conf.py ]]; then
|
||||||
|
if [[ ${DOC_TARGETS[*]} =~ "$PROJECT" ]]; then
|
||||||
|
extract_messages_doc
|
||||||
|
ALL_MODULES="doc $ALL_MODULES"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@@ -11047,6 +11047,7 @@
|
|||||||
- publish-openstack-sphinx-docs
|
- publish-openstack-sphinx-docs
|
||||||
- deploy-guide-jobs
|
- deploy-guide-jobs
|
||||||
- release-notes-jobs
|
- release-notes-jobs
|
||||||
|
- translation-jobs
|
||||||
release:
|
release:
|
||||||
jobs:
|
jobs:
|
||||||
- announce-release
|
- announce-release
|
||||||
@@ -11660,6 +11661,7 @@
|
|||||||
templates:
|
templates:
|
||||||
- system-required
|
- system-required
|
||||||
- publish-openstack-sphinx-docs
|
- publish-openstack-sphinx-docs
|
||||||
|
- translation-jobs
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
name: openstack/openstack-helm-addons
|
name: openstack/openstack-helm-addons
|
||||||
|
Reference in New Issue
Block a user