Skip to content

Commit faac384

Browse files
authored
Add sphinx i18n (#244)
Add internationalization (multi language support) for Sphinx documentation. Supported languages: EN, RU close #243
1 parent b4ab8f7 commit faac384

File tree

17 files changed

+796
-7
lines changed

17 files changed

+796
-7
lines changed

.github/workflows/pages.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ jobs:
2424
working-directory: ./docs
2525
run: |
2626
python3 -m pip install -r requirements.txt
27+
- name: Build i18n
28+
working-directory: ./docs
29+
run: |
30+
make gettext
31+
sphinx-build -b gettext . _build/gettext
32+
sphinx-intl update -p _build/gettext -l en -l ru
2733
- name: Build documentation
2834
working-directory: ./docs
2935
run: |

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![codecov](https://codecov.io/gh/learning-process/parallel_programming_course/graph/badge.svg?token=qCOtqeFyIz)](https://codecov.io/gh/learning-process/parallel_programming_course)
33

44
# Parallel Programming Course
5-
Welcome to the Parallel Programming Course! For more detailed documentation and resources, please visit [documentation page](https://learning-process.github.io/parallel_programming_course/).
5+
Welcome to the Parallel Programming Course! For more detailed documentation and resources, please visit documentation pages: [en](https://learning-process.github.io/parallel_programming_course/en/), [ru](https://learning-process.github.io/parallel_programming_course/ru/).
66

77
### Parallel programming technologies:
88
The following parallel programming technologies are considered in practice:

docs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
_build
2+
*.mo

docs/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@
66
SPHINXOPTS ?=
77
SPHINXBUILD ?= sphinx-build
88
SOURCEDIR = .
9-
BUILDDIR = _build
9+
BUILDDIR = _build/html
1010
SPHINXOPTS += -W --keep-going -n
1111

1212
# Put it first so that "make" without argument is like "make help".
1313
help:
14-
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)/en" $(SPHINXOPTS) $(O)
1515

1616
.PHONY: help Makefile
1717

1818
# Catch-all target: route all unknown targets to Sphinx using the new
1919
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
2020
%: Makefile
21-
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21+
@$(SPHINXBUILD) -b html -D language=en "$(SOURCEDIR)" "$(BUILDDIR)/en" $(SPHINXOPTS) $(O)
22+
@$(SPHINXBUILD) -b html -D language=ru "$(SOURCEDIR)" "$(BUILDDIR)/ru" $(SPHINXOPTS) $(O)

docs/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
templates_path = ['_templates']
1919
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
20+
locale_dirs = ['locale']
21+
gettext_compact = False
2022

2123
# -- Options for HTML output -------------------------------------------------
2224
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

docs/locale/en/LC_MESSAGES/index.po

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) 2025, Learning Process
3+
# This file is distributed under the same license as the Parallel
4+
# Programming Course package.
5+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
6+
#
7+
#, fuzzy
8+
msgid ""
9+
msgstr ""
10+
"Project-Id-Version: Parallel Programming Course \n"
11+
"Report-Msgid-Bugs-To: \n"
12+
"POT-Creation-Date: 2025-01-20 23:19+0100\n"
13+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15+
"Language: en\n"
16+
"Language-Team: en <[email protected]>\n"
17+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
18+
"MIME-Version: 1.0\n"
19+
"Content-Type: text/plain; charset=utf-8\n"
20+
"Content-Transfer-Encoding: 8bit\n"
21+
"Generated-By: Babel 2.16.0\n"
22+
23+
#: ../../index.rst:6
24+
msgid "User Guide:"
25+
msgstr ""
26+
27+
#: ../../index.rst:2
28+
msgid "Parallel Programming Course documentation"
29+
msgstr ""
30+
31+
#: ../../index.rst:4
32+
msgid ""
33+
"Below is the table of contents for the Parallel Programming Course "
34+
"documentation. Follow the links to learn more about each topic."
35+
msgstr ""
36+
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) 2025, Learning Process
3+
# This file is distributed under the same license as the Parallel
4+
# Programming Course package.
5+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
6+
#
7+
#, fuzzy
8+
msgid ""
9+
msgstr ""
10+
"Project-Id-Version: Parallel Programming Course \n"
11+
"Report-Msgid-Bugs-To: \n"
12+
"POT-Creation-Date: 2025-01-20 23:19+0100\n"
13+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15+
"Language: en\n"
16+
"Language-Team: en <[email protected]>\n"
17+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
18+
"MIME-Version: 1.0\n"
19+
"Content-Type: text/plain; charset=utf-8\n"
20+
"Content-Transfer-Encoding: 8bit\n"
21+
"Generated-By: Babel 2.16.0\n"
22+
23+
#: ../../user_guide/build.rst:2
24+
msgid "Build the Project with ``CMake``"
25+
msgstr ""
26+
27+
#: ../../user_guide/build.rst:4
28+
msgid "Navigate to a source code folder."
29+
msgstr ""
30+
31+
#: ../../user_guide/build.rst:6
32+
msgid "**Configure the build**: ``Makefile``, ``.sln``, etc."
33+
msgstr ""
34+
35+
#: ../../user_guide/build.rst:13
36+
msgid "*Help on CMake keys:*"
37+
msgstr ""
38+
39+
#: ../../user_guide/build.rst:15
40+
msgid ""
41+
"``-D USE_SEQ=ON`` enable ``Sequential`` labs (based on OpenMP's "
42+
"CMakeLists.txt)."
43+
msgstr ""
44+
45+
#: ../../user_guide/build.rst:16
46+
msgid "``-D USE_MPI=ON`` enable ``MPI`` labs."
47+
msgstr ""
48+
49+
#: ../../user_guide/build.rst:17
50+
msgid "``-D USE_OMP=ON`` enable ``OpenMP`` labs."
51+
msgstr ""
52+
53+
#: ../../user_guide/build.rst:18
54+
msgid "``-D USE_TBB=ON`` enable ``TBB`` labs."
55+
msgstr ""
56+
57+
#: ../../user_guide/build.rst:19
58+
msgid "``-D USE_STL=ON`` enable ``std::thread`` labs."
59+
msgstr ""
60+
61+
#: ../../user_guide/build.rst:20
62+
msgid "``-D USE_FUNC_TESTS=ON`` enable functional tests."
63+
msgstr ""
64+
65+
#: ../../user_guide/build.rst:21
66+
msgid "``-D USE_PERF_TESTS=ON`` enable performance tests."
67+
msgstr ""
68+
69+
#: ../../user_guide/build.rst:22
70+
msgid ""
71+
"``-D CMAKE_BUILD_TYPE=Release`` required parameter for stable work of "
72+
"repo."
73+
msgstr ""
74+
75+
#: ../../user_guide/build.rst:24
76+
msgid "*A corresponding flag can be omitted if it's not needed.*"
77+
msgstr ""
78+
79+
#: ../../user_guide/build.rst:26
80+
msgid "**Build the project**:"
81+
msgstr ""
82+
83+
#: ../../user_guide/build.rst:32
84+
msgid "**Check the task**:"
85+
msgstr ""
86+
87+
#: ../../user_guide/build.rst:34
88+
msgid "Run ``<project's folder>/build/bin``"
89+
msgstr ""
90+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) 2025, Learning Process
3+
# This file is distributed under the same license as the Parallel
4+
# Programming Course package.
5+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
6+
#
7+
#, fuzzy
8+
msgid ""
9+
msgstr ""
10+
"Project-Id-Version: Parallel Programming Course \n"
11+
"Report-Msgid-Bugs-To: \n"
12+
"POT-Creation-Date: 2025-01-20 23:19+0100\n"
13+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15+
"Language: en\n"
16+
"Language-Team: en <[email protected]>\n"
17+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
18+
"MIME-Version: 1.0\n"
19+
"Content-Type: text/plain; charset=utf-8\n"
20+
"Content-Transfer-Encoding: 8bit\n"
21+
"Generated-By: Babel 2.16.0\n"
22+
23+
#: ../../user_guide/download.rst:2
24+
msgid "Download all submodules"
25+
msgstr ""
26+
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) 2025, Learning Process
3+
# This file is distributed under the same license as the Parallel
4+
# Programming Course package.
5+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
6+
#
7+
#, fuzzy
8+
msgid ""
9+
msgstr ""
10+
"Project-Id-Version: Parallel Programming Course \n"
11+
"Report-Msgid-Bugs-To: \n"
12+
"POT-Creation-Date: 2025-01-20 23:19+0100\n"
13+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15+
"Language: en\n"
16+
"Language-Team: en <[email protected]>\n"
17+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
18+
"MIME-Version: 1.0\n"
19+
"Content-Type: text/plain; charset=utf-8\n"
20+
"Content-Transfer-Encoding: 8bit\n"
21+
"Generated-By: Babel 2.16.0\n"
22+
23+
#: ../../user_guide/environment.rst:2
24+
msgid "Set Up Your Environment"
25+
msgstr ""
26+
27+
#: ../../user_guide/environment.rst:5
28+
msgid "Code Style Analysis"
29+
msgstr ""
30+
31+
#: ../../user_guide/environment.rst:6
32+
msgid ""
33+
"Please follow the `Google C++ Style Guide "
34+
"<https://google.github.io/styleguide/cppguide.html>`_."
35+
msgstr ""
36+
37+
#: ../../user_guide/environment.rst:8
38+
msgid ""
39+
"Code style is checked using the `clang-format "
40+
"<https://clang.llvm.org/docs/ClangFormat.html>`_ tool."
41+
msgstr ""
42+
43+
#: ../../user_guide/environment.rst:11
44+
msgid "Parallel Programming Technologies"
45+
msgstr ""
46+
47+
#: ../../user_guide/environment.rst:14
48+
msgid "``MPI``"
49+
msgstr ""
50+
51+
#: ../../user_guide/environment.rst:15
52+
msgid "**Windows (MSVC)**:"
53+
msgstr ""
54+
55+
#: ../../user_guide/environment.rst:17
56+
msgid ""
57+
"`Installers link <https://www.microsoft.com/en-"
58+
"us/download/details.aspx?id=105289>`_. You have to install "
59+
"``msmpisdk.msi`` and ``msmpisetup.exe``."
60+
msgstr ""
61+
62+
#: ../../user_guide/environment.rst:19 ../../user_guide/environment.rst:35
63+
msgid "**Linux (gcc and clang)**:"
64+
msgstr ""
65+
66+
#: ../../user_guide/environment.rst:25
67+
msgid "**MacOS (apple clang)**:"
68+
msgstr ""
69+
70+
#: ../../user_guide/environment.rst:32
71+
msgid "``OpenMP``"
72+
msgstr ""
73+
74+
#: ../../user_guide/environment.rst:33
75+
msgid ""
76+
"``OpenMP`` is included in ``gcc`` and ``msvc``, but some components "
77+
"should be installed additionally:"
78+
msgstr ""
79+
80+
#: ../../user_guide/environment.rst:41
81+
msgid "**MacOS (llvm)**:"
82+
msgstr ""
83+
84+
#: ../../user_guide/environment.rst:49
85+
msgid "``TBB``"
86+
msgstr ""
87+
88+
#: ../../user_guide/environment.rst:50
89+
msgid ""
90+
"**Windows (MSVC)**, **Linux (gcc and clang)**, **MacOS (apple clang)**: "
91+
"Build as 3rdparty in the current project."
92+
msgstr ""
93+
94+
#: ../../user_guide/environment.rst:54
95+
msgid "``std::thread``"
96+
msgstr ""
97+
98+
#: ../../user_guide/environment.rst:55
99+
msgid "``std::thread`` is included in STL libraries."
100+
msgstr ""
101+

0 commit comments

Comments
 (0)