Skip to content

Commit

Permalink
Add sphinx i18n
Browse files Browse the repository at this point in the history
Add internationalization (multi language support) for Sphinx dicumentation.
Supported languages: EN, RU
  • Loading branch information
aobolensk committed Jan 20, 2025
1 parent b4ab8f7 commit 79b99d4
Show file tree
Hide file tree
Showing 17 changed files with 796 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
working-directory: ./docs
run: |
python3 -m pip install -r requirements.txt
- name: Build i18n
working-directory: ./docs
run: |
make gettext
sphinx-build -b gettext . _build/gettext
sphinx-intl update -p _build/gettext -l en -l ru
- name: Build documentation
working-directory: ./docs
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[![codecov](https://codecov.io/gh/learning-process/parallel_programming_course/graph/badge.svg?token=qCOtqeFyIz)](https://codecov.io/gh/learning-process/parallel_programming_course)

# Parallel Programming Course
Welcome to the Parallel Programming Course! For more detailed documentation and resources, please visit [documentation page](https://learning-process.github.io/parallel_programming_course/).
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/).

### Parallel programming technologies:
The following parallel programming technologies are considered in practice:
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
_build
*.mo
7 changes: 4 additions & 3 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
BUILDDIR = _build/html
SPHINXOPTS += -W --keep-going -n

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

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -b html -D language=en "$(SOURCEDIR)" "$(BUILDDIR)/en" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -b html -D language=ru "$(SOURCEDIR)" "$(BUILDDIR)/ru" $(SPHINXOPTS) $(O)
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
locale_dirs = ['locale']
gettext_compact = False

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
Expand Down
36 changes: 36 additions & 0 deletions docs/locale/en/LC_MESSAGES/index.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2025, Learning Process
# This file is distributed under the same license as the Parallel
# Programming Course package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Parallel Programming Course \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-20 23:19+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n"
"Language-Team: en <[email protected]>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.16.0\n"

#: ../../index.rst:6
msgid "User Guide:"
msgstr ""

#: ../../index.rst:2
msgid "Parallel Programming Course documentation"
msgstr ""

#: ../../index.rst:4
msgid ""
"Below is the table of contents for the Parallel Programming Course "
"documentation. Follow the links to learn more about each topic."
msgstr ""

90 changes: 90 additions & 0 deletions docs/locale/en/LC_MESSAGES/user_guide/build.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2025, Learning Process
# This file is distributed under the same license as the Parallel
# Programming Course package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Parallel Programming Course \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-20 23:19+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n"
"Language-Team: en <[email protected]>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.16.0\n"

#: ../../user_guide/build.rst:2
msgid "Build the Project with ``CMake``"
msgstr ""

#: ../../user_guide/build.rst:4
msgid "Navigate to a source code folder."
msgstr ""

#: ../../user_guide/build.rst:6
msgid "**Configure the build**: ``Makefile``, ``.sln``, etc."
msgstr ""

#: ../../user_guide/build.rst:13
msgid "*Help on CMake keys:*"
msgstr ""

#: ../../user_guide/build.rst:15
msgid ""
"``-D USE_SEQ=ON`` enable ``Sequential`` labs (based on OpenMP's "
"CMakeLists.txt)."
msgstr ""

#: ../../user_guide/build.rst:16
msgid "``-D USE_MPI=ON`` enable ``MPI`` labs."
msgstr ""

#: ../../user_guide/build.rst:17
msgid "``-D USE_OMP=ON`` enable ``OpenMP`` labs."
msgstr ""

#: ../../user_guide/build.rst:18
msgid "``-D USE_TBB=ON`` enable ``TBB`` labs."
msgstr ""

#: ../../user_guide/build.rst:19
msgid "``-D USE_STL=ON`` enable ``std::thread`` labs."
msgstr ""

#: ../../user_guide/build.rst:20
msgid "``-D USE_FUNC_TESTS=ON`` enable functional tests."
msgstr ""

#: ../../user_guide/build.rst:21
msgid "``-D USE_PERF_TESTS=ON`` enable performance tests."
msgstr ""

#: ../../user_guide/build.rst:22
msgid ""
"``-D CMAKE_BUILD_TYPE=Release`` required parameter for stable work of "
"repo."
msgstr ""

#: ../../user_guide/build.rst:24
msgid "*A corresponding flag can be omitted if it's not needed.*"
msgstr ""

#: ../../user_guide/build.rst:26
msgid "**Build the project**:"
msgstr ""

#: ../../user_guide/build.rst:32
msgid "**Check the task**:"
msgstr ""

#: ../../user_guide/build.rst:34
msgid "Run ``<project's folder>/build/bin``"
msgstr ""

26 changes: 26 additions & 0 deletions docs/locale/en/LC_MESSAGES/user_guide/download.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2025, Learning Process
# This file is distributed under the same license as the Parallel
# Programming Course package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Parallel Programming Course \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-20 23:19+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n"
"Language-Team: en <[email protected]>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.16.0\n"

#: ../../user_guide/download.rst:2
msgid "Download all submodules"
msgstr ""

101 changes: 101 additions & 0 deletions docs/locale/en/LC_MESSAGES/user_guide/environment.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2025, Learning Process
# This file is distributed under the same license as the Parallel
# Programming Course package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Parallel Programming Course \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-20 23:19+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n"
"Language-Team: en <[email protected]>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.16.0\n"

#: ../../user_guide/environment.rst:2
msgid "Set Up Your Environment"
msgstr ""

#: ../../user_guide/environment.rst:5
msgid "Code Style Analysis"
msgstr ""

#: ../../user_guide/environment.rst:6
msgid ""
"Please follow the `Google C++ Style Guide "
"<https://google.github.io/styleguide/cppguide.html>`_."
msgstr ""

#: ../../user_guide/environment.rst:8
msgid ""
"Code style is checked using the `clang-format "
"<https://clang.llvm.org/docs/ClangFormat.html>`_ tool."
msgstr ""

#: ../../user_guide/environment.rst:11
msgid "Parallel Programming Technologies"
msgstr ""

#: ../../user_guide/environment.rst:14
msgid "``MPI``"
msgstr ""

#: ../../user_guide/environment.rst:15
msgid "**Windows (MSVC)**:"
msgstr ""

#: ../../user_guide/environment.rst:17
msgid ""
"`Installers link <https://www.microsoft.com/en-"
"us/download/details.aspx?id=105289>`_. You have to install "
"``msmpisdk.msi`` and ``msmpisetup.exe``."
msgstr ""

#: ../../user_guide/environment.rst:19 ../../user_guide/environment.rst:35
msgid "**Linux (gcc and clang)**:"
msgstr ""

#: ../../user_guide/environment.rst:25
msgid "**MacOS (apple clang)**:"
msgstr ""

#: ../../user_guide/environment.rst:32
msgid "``OpenMP``"
msgstr ""

#: ../../user_guide/environment.rst:33
msgid ""
"``OpenMP`` is included in ``gcc`` and ``msvc``, but some components "
"should be installed additionally:"
msgstr ""

#: ../../user_guide/environment.rst:41
msgid "**MacOS (llvm)**:"
msgstr ""

#: ../../user_guide/environment.rst:49
msgid "``TBB``"
msgstr ""

#: ../../user_guide/environment.rst:50
msgid ""
"**Windows (MSVC)**, **Linux (gcc and clang)**, **MacOS (apple clang)**: "
"Build as 3rdparty in the current project."
msgstr ""

#: ../../user_guide/environment.rst:54
msgid "``std::thread``"
msgstr ""

#: ../../user_guide/environment.rst:55
msgid "``std::thread`` is included in STL libraries."
msgstr ""

Loading

0 comments on commit 79b99d4

Please sign in to comment.