Skip to content

Commit a0085f5

Browse files
committed
Add GitHub Actions workflow for ko_KR doc
- Add automated build and deployment workflow for Korean translated docs - Include Korean locale (ko_KR) with 25 skeleton .po files - Add build script for generating translated documentation - Deploy to GitHub Pages at openstack-kr.github.io/zuul-study
1 parent e2570c0 commit a0085f5

27 files changed

Lines changed: 13800 additions & 0 deletions

.github/workflows/deploy-docs.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Build and Deploy Korean Translated Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout zuul-study repository
23+
uses: actions/checkout@v4
24+
25+
- name: Clone Zuul repository
26+
run: |
27+
git clone https://opendev.org/zuul/zuul/ zuul-repo
28+
29+
- name: Copy build script to zuul/doc
30+
run: |
31+
cp l10n-artifact/build-translated-lang.sh zuul-repo/doc/
32+
33+
- name: Copy Korean locale to zuul/doc/source/locale
34+
run: |
35+
mkdir -p zuul-repo/doc/source/locale
36+
cp -r l10n-artifact/ko_KR zuul-repo/doc/source/locale/
37+
38+
- name: Set up Python
39+
uses: actions/setup-python@v5
40+
with:
41+
python-version: '3.11'
42+
43+
- name: Install gettext tools
44+
run: |
45+
sudo apt-get update
46+
sudo apt-get install -y gettext
47+
48+
- name: Build translated documentation
49+
run: |
50+
cd zuul-repo/doc
51+
chmod +x build-translated-lang.sh
52+
./build-translated-lang.sh ko_KR
53+
54+
- name: Copy built documentation to deployment directory
55+
run: |
56+
mkdir -p _site
57+
cp -r zuul-repo/doc/build/html/ko_KR/* _site/
58+
59+
- name: Upload artifact for GitHub Pages
60+
uses: actions/upload-pages-artifact@v3
61+
with:
62+
path: '_site'
63+
64+
deploy:
65+
environment:
66+
name: github-pages
67+
url: ${{ steps.deployment.outputs.page_url }}
68+
runs-on: ubuntu-latest
69+
needs: build
70+
steps:
71+
- name: Deploy to GitHub Pages
72+
id: deployment
73+
uses: actions/deploy-pages@v4
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
#!/bin/bash
2+
# Script to build translated documentation for Zuul
3+
# This script should be run from the doc directory
4+
# Usage: ./build-translated-lang.sh <language_code>
5+
# Example: ./build-translated-lang.sh ko_KR
6+
7+
set -e # Exit on error
8+
9+
# Check for language parameter
10+
if [ -z "$1" ]; then
11+
echo "Error: Language code is required"
12+
echo "Usage: ./build-translated-lang.sh <language_code>"
13+
echo "Example: ./build-translated-lang.sh ja"
14+
echo " ./build-translated-lang.sh ko_KR"
15+
echo " ./build-translated-lang.sh en_GB"
16+
exit 1
17+
fi
18+
19+
LANG_CODE="$1"
20+
21+
echo "=========================================="
22+
echo "Zuul Translated Documentation Build Script"
23+
echo "Language: $LANG_CODE"
24+
echo "=========================================="
25+
echo ""
26+
27+
# Check if we're in the doc directory
28+
if [ ! -f "source/conf.py" ]; then
29+
echo "Error: This script must be run from the doc directory"
30+
echo "Usage: cd doc && ./build-translated-lang.sh <language_code>"
31+
exit 1
32+
fi
33+
34+
# Step 1: Create virtual environment if it doesn't exist
35+
echo "[1/7] Checking virtual environment..."
36+
if [ ! -d "../venv" ]; then
37+
echo "Creating virtual environment..."
38+
python3 -m venv ../venv
39+
echo "Virtual environment created."
40+
else
41+
echo "Virtual environment already exists."
42+
fi
43+
44+
# Step 2: Activate virtual environment and install dependencies
45+
echo ""
46+
echo "[2/7] Installing dependencies..."
47+
source ../venv/bin/activate
48+
pip install --upgrade pip > /dev/null 2>&1
49+
pip install 'setuptools<82' > /dev/null 2>&1
50+
pip install -r ../requirements.txt
51+
pip install -r ../test-requirements.txt
52+
pip install -r requirements.txt
53+
pip install -e ..
54+
echo "Dependencies installed."
55+
56+
# # Step 3: Generate pot files
57+
# echo ""
58+
# echo "[3/7] Generating pot files..."
59+
# make gettext > /dev/null 2>&1
60+
# echo "Pot files generated in build/locale/"
61+
62+
# # Step 4: Initialize po files if they don't exist
63+
# echo ""
64+
# echo "[4/7] Checking $LANG_CODE po files..."
65+
# if [ ! -d "source/locale/$LANG_CODE/LC_MESSAGES" ]; then
66+
# echo "Creating $LANG_CODE po files from pot files..."
67+
# mkdir -p "source/locale/$LANG_CODE/LC_MESSAGES"
68+
# for potfile in build/locale/*.pot; do
69+
# filename=$(basename "$potfile" .pot)
70+
# msginit --input="$potfile" --locale="$LANG_CODE" --output="source/locale/$LANG_CODE/LC_MESSAGES/${filename}.po" --no-translator
71+
# done
72+
# echo "$LANG_CODE po files created. Please translate msgstr entries manually."
73+
# else
74+
# echo "$LANG_CODE po files already exist in source/locale/$LANG_CODE/LC_MESSAGES/"
75+
# fi
76+
77+
# Step 5: Compile po files to mo files
78+
echo ""
79+
echo "[5/7] Compiling po files to mo files..."
80+
for pofile in source/locale/$LANG_CODE/LC_MESSAGES/*.po; do
81+
mofile="${pofile%.po}.mo"
82+
msgfmt "$pofile" -o "$mofile"
83+
done
84+
echo "All po files compiled to mo files."
85+
86+
# Step 6: Update conf.py if locale_dirs is not configured
87+
echo ""
88+
echo "[6/7] Checking conf.py configuration..."
89+
if ! grep -q "locale_dirs" source/conf.py; then
90+
echo "Adding locale_dirs configuration to conf.py..."
91+
# Find the line with "primary_domain = 'zuul'" and add locale config before it
92+
sed -i "/^primary_domain = 'zuul'/i\\# Internationalization\\nlocale_dirs = ['locale/']\\ngettext_compact = False\\n" source/conf.py
93+
echo "locale_dirs configuration added to conf.py."
94+
else
95+
echo "locale_dirs already configured in conf.py."
96+
fi
97+
98+
# Step 7: Build translated HTML documentation
99+
echo ""
100+
echo "[7/7] Building $LANG_CODE HTML documentation..."
101+
rm -rf "build/html/$LANG_CODE"
102+
sphinx-build -a -b html -D language="$LANG_CODE" source "build/html/$LANG_CODE"
103+
echo ""
104+
echo "=========================================="
105+
echo "Build completed successfully!"
106+
echo "=========================================="
107+
echo ""
108+
echo "$LANG_CODE documentation is available at: build/html/$LANG_CODE/index.html"
109+
echo ""
110+
echo "To view the documentation, open build/html/$LANG_CODE/index.html in a web browser."
111+
echo ""
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Korean translations for Zuul package.
2+
# Copyright (C) 2012-2026, Zuul project contributors
3+
# This file is distributed under the same license as the Zuul package.
4+
# Automatically generated, 2026.
5+
#
6+
msgid ""
7+
msgstr ""
8+
"Project-Id-Version: Zuul latest\n"
9+
"Report-Msgid-Bugs-To: \n"
10+
"POT-Creation-Date: 2026-02-12 01:27+0900\n"
11+
"PO-Revision-Date: 2026-02-12 01:27+0900\n"
12+
"Last-Translator: Automatically generated\n"
13+
"Language-Team: none\n"
14+
"MIME-Version: 1.0\n"
15+
"Content-Type: text/plain; charset=UTF-8\n"
16+
"Content-Transfer-Encoding: 8bit\n"
17+
"Language: ko\n"
18+
"Plural-Forms: nplurals=1; plural=0;\n"
19+
20+
#: ../../source/about.rst:6
21+
msgid "About Zuul"
22+
msgstr ""
23+
24+
#: ../../source/about.rst:8
25+
msgid ""
26+
"Zuul is a Project Gating System. That's like a CI or CD system, but the "
27+
"focus is on testing the future state of code repositories."
28+
msgstr ""
29+
30+
#: ../../source/about.rst:11
31+
msgid ""
32+
"A gating system doesn't just test a proposed change; it tests the proposed "
33+
"future state of multiple branches and repositories with any number of in-"
34+
"flight changes and their dependencies. And the same playbooks used to test "
35+
"software can also be used to deploy it."
36+
msgstr ""
37+
38+
#: ../../source/about.rst:16
39+
msgid ""
40+
"Zuul itself is a service which listens to events from various code review "
41+
"systems, executes jobs based on those events, and reports the results back "
42+
"to the code review system. The primary interface for Zuul is the code "
43+
"review system (or systems) so that it fits seamlessly into developer "
44+
"workflows, and a web interface is available for inspecting the current "
45+
"status and browsing build results."
46+
msgstr ""
47+
48+
#: ../../source/about.rst:23
49+
msgid ""
50+
"The best way to run Zuul is with a single installation serving as many "
51+
"projects or groups as possible. It is a multi-tenant application that is "
52+
"able to provide as much or as little separation between projects as desired."
53+
msgstr ""
54+
55+
#: ../../source/about.rst:28
56+
msgid ""
57+
"Zuul works with a wide range of code review systems, and can work with "
58+
"multiple systems (including integrating projects on different systems) "
59+
"simultaneously. See :ref:`drivers` for a complete list."
60+
msgstr ""
61+
62+
#: ../../source/about.rst:32
63+
msgid ""
64+
"Previous versions of Zuul required a separate component called `Nodepool`_ "
65+
"to provide the resources to run jobs. Nodepool works with several cloud "
66+
"providers as well as statically defined nodes (again, simultaneously). "
67+
"Nodepool's functionality is now incorporated into Zuul."
68+
msgstr ""
69+
70+
#: ../../source/about.rst:38
71+
msgid ""
72+
"Because Zuul is designed from the ground up to run jobs in a multi-node "
73+
"environment (whether those nodes are bare metal machines, VMs, Kubernetes "
74+
"clusters, or containers), Zuul's job definition language needs to support "
75+
"orchestrating tasks on multiple nodes. Zuul uses Ansible for this. Ansible "
76+
"is well-known and easy to learn and use. Some existing Ansible playbooks "
77+
"and roles may be able to be used directly with Zuul (but some restrictions "
78+
"apply, so not all will)."
79+
msgstr ""
80+
81+
#: ../../source/about.rst:46
82+
msgid ""
83+
"However, knowledge or use of Ansible is not required for Zuul -- it is quite "
84+
"simple for Zuul's embedded Ansible to run any shell script or any other "
85+
"program. Zuul's library of standard jobs even includes a job that will run "
86+
"a specified shell script, so it's possible to use Zuul without writing any "
87+
"Ansible at all."
88+
msgstr ""
89+
90+
#: ../../source/about.rst:52
91+
msgid ""
92+
"Zuul is an open source project developed and maintained by a community of "
93+
"users. We welcome your `support and contribution <https://zuul-ci.org/"
94+
"community.html>`__."
95+
msgstr ""
96+
97+
#: ../../source/about.rst:62
98+
msgid "_`Nodepool`: https://zuul-ci.org/docs/nodepool/"
99+
msgstr ""
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Korean translations for Zuul package.
2+
# Copyright (C) 2012-2026, Zuul project contributors
3+
# This file is distributed under the same license as the Zuul package.
4+
# Automatically generated, 2026.
5+
#
6+
msgid ""
7+
msgstr ""
8+
"Project-Id-Version: Zuul latest\n"
9+
"Report-Msgid-Bugs-To: \n"
10+
"POT-Creation-Date: 2026-02-12 01:27+0900\n"
11+
"PO-Revision-Date: 2026-02-12 01:27+0900\n"
12+
"Last-Translator: Automatically generated\n"
13+
"Language-Team: none\n"
14+
"MIME-Version: 1.0\n"
15+
"Content-Type: text/plain; charset=UTF-8\n"
16+
"Content-Transfer-Encoding: 8bit\n"
17+
"Language: ko\n"
18+
"Plural-Forms: nplurals=1; plural=0;\n"
19+
20+
#: ../../source/admin.rst:2
21+
msgid "Service Administration"
22+
msgstr ""

0 commit comments

Comments
 (0)