Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multilanguage support and GitHub Actions #3829

Open
wants to merge 10 commits into
base: rolling
Choose a base branch
from
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
build/
plugins/__pycache__
*__pycache__
_build/
.idea/
.vscode/
*.mo
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ SOURCE = source
OUT = build
LINKCHECKDIR = $(OUT)/linkcheck
BUILD = python3 -m sphinx
OPTS =-c .
LANG = en
OPTS = -c . -D language=$(LANG)

help:
@$(BUILD) -M help "$(SOURCE)" "$(OUT)" $(OPTS)
@echo " multiversion to build documentation for all branches"

multiversion: Makefile
sphinx-multiversion $(OPTS) "$(SOURCE)" build/html
@echo "<html><head><meta http-equiv=\"refresh\" content=\"0; url=iron/index.html\" /></head></html>" > build/html/index.html
sphinx-multiversion $(OPTS) "$(SOURCE)" build/html/$(LANG)
@echo "<html><head><meta http-equiv=\"refresh\" content=\"0; url=iron/index.html\" /></head></html>" > build/html/$(LANG)/index.html
python3 make_sitemapindex.py

%: Makefile
Expand All @@ -26,4 +27,10 @@ linkcheck:
@echo
@echo "Check finished. Report is in $(LINKCHECKDIR)."

updatepo:
sphinx-intl update -p "$(OUT)/gettext" -d "locale" -l $(LANG)

html:
$(BUILD) -b html $(OPTS) $(SOURCE) $(OUT)/html/$(LANG);

.PHONY: help Makefile multiversion test linkcheck
11 changes: 8 additions & 3 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,14 @@

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
language = 'en'

# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'
locale_dirs = ['../locale/'] # Path from the source directory to the locale directory.
gettext_compact = True # One pot file per rst file
gettext_uuid = True # Add a identifier to each message
# gettext_allow_fuzzy_translations = True

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down Expand Up @@ -307,7 +311,8 @@ def github_link_rewrite_branch(app, pagename, templatename, context, doctree):
def expand_macros(app, docname, source):
result = source[0]
for key, value in app.config.macros.items():
result = result.replace(f'{{{key}}}', value)
if app.builder.name != 'gettext':
result = result.replace(f'{{{key}}}', value)
source[0] = result

def setup(app):
Expand Down
8 changes: 1 addition & 7 deletions docker/image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ RUN apt-get update && \
git-all \
graphviz \
make \
python3-doc8 \
python3-docutils \
python3-pip \
python3-sphinx \
python3-sphinx-copybutton \
python3-sphinx-rtd-theme \
python3-sphinx-tabs && \
python3-pip && \
rm -rf /var/lib/apt/lists/*

RUN useradd -u $uid -m $user
Expand Down
91 changes: 91 additions & 0 deletions locale/es/LC_MESSAGES/API-Docs.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Archivo de traducción al español para la documentación de ROS 2.
# Copyright (C) 2023, Open Robotics
# This file is distributed under the same license as the ROS 2 documentation
# package.
# Cristian Chitiva <cychitivav@unal.edu.co>, 2023.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: ROS 2 documentation\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-06 22:03+0000\n"
"Language-Team: es <LL@li.org>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"Generated-By: Babel 2.8.0\n"

#: ../../source/API-Docs.rst:4 daa522126f9d4686ad1752693bc778e5
msgid "API Documentation"
msgstr "Documentación de la API"

#: ../../source/API-Docs.rst:6 0972ddc1dba6457a9ba636d4d4ee9512
msgid ""
"All ROS 2 package's documentation is hosted alongside its information on "
"the `ROS Index <https://index.ros.org/>`_. Searching for packages will "
"yield their information such as released distributions, ``README.md`` "
"files, URLs, and other important metadata. A list of all packages for "
"each distribution on the index can be found `here "
"<https://index.ros.org/packages/#{DISTRO}>`_. From the right-hand side of"
" a package of interest, the auto-generated API documentation may be found"
" found using the \"API Docs\" button."
msgstr ""
"Toda la documentación de los paquetes de ROS 2 se aloja junto con su "
"información en el `Índice de ROS <https://index.ros.org/>`_. La búsqueda "
"de paquetes arrojará su información, como las distribuciones publicadas, "
"los archivos ``README.md``, las URL y otros metadatos importantes. Se "
"puede encontrar una lista de todos los paquetes para cada distribución en "
"el índice `aquí <https://index.ros.org/packages/#{DISTRO}>`_. Desde el "
"lado derecho de un paquete de interés, se puede encontrar la documentación"
" de la API generada automáticamente utilizando el botón \"API Docs\"."

#: ../../source/API-Docs.rst:11 ee9df2f5a4504203984bf6336db00b19
msgid ""
"You can find the API Documentation for the Client Libraries in the "
"{DISTRO_TITLE} distribution using the links below:"
msgstr ""
"Puede encontrar la documentación de la API para las bibliotecas de cliente"
" en la distribución {DISTRO_TITLE} utilizando los enlaces a continuación:"

#: ../../source/API-Docs.rst:13 e5839f65c74a4aa081ff0a7ba12dbfea
msgid ""
"`rclcpp - C++ client library "
"<http://docs.ros.org/en/{DISTRO}/p/rclcpp/generated/index.html>`_"
msgstr ""
"`rclcpp - Biblioteca de cliente C++ "
"<http://docs.ros.org/en/{DISTRO}/p/rclcpp/generated/index.html>`_"

#: ../../source/API-Docs.rst:14 f8742bd83a05406f9d55f1c8ce1889ce
msgid ""
"`rclcpp_lifecycle - C++ lifecycle library "
"<http://docs.ros.org/en/{DISTRO}/p/rclcpp_lifecycle/generated/index.html>`_"
msgstr ""
"`rclcpp_lifecycle - Biblioteca de ciclo de vida C++ "
"<http://docs.ros.org/en/{DISTRO}/p/rclcpp_lifecycle/generated/index.html>`_"

#: ../../source/API-Docs.rst:15 6b2f37f9986f4c318c80addaaa7f7956
msgid ""
"`rclcpp_components - C++ components library "
"<http://docs.ros.org/en/{DISTRO}/p/rclcpp_components/generated/index.html>`_"
msgstr ""
"`rclcpp_components - Biblioteca de componentes C++ "
"<http://docs.ros.org/en/{DISTRO}/p/rclcpp_components/generated/index.html>`_"

#: ../../source/API-Docs.rst:16 b5dfcb251cec493ea294dbff879c30ff
msgid ""
"`rclcpp_action - C++ actions library "
"<http://docs.ros.org/en/{DISTRO}/p/rclcpp_action/generated/index.html>`_"
msgstr ""
"`rclcpp_action - Biblioteca de acciones C++ "
"<http://docs.ros.org/en/{DISTRO}/p/rclcpp_action/generated/index.html>`_"

#: ../../source/API-Docs.rst:18 c5b931f6970144d5a943621493b21c6b
msgid ""
"A raw list of {DISTRO_TITLE} package documentation `may be found here "
"<https://docs.ros.org/en/{DISTRO}/p/>`_."
msgstr ""
"Una lista de la documentación de paquetes de {DISTRO_TITLE} `se puede "
"encontrar aquí <https://docs.ros.org/en/{DISTRO}/p/>`_."
63 changes: 63 additions & 0 deletions locale/es/LC_MESSAGES/Citations.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Archivo de traducción al español para la documentación de ROS 2.
# Copyright (C) 2023, Open Robotics
# This file is distributed under the same license as the ROS 2 documentation
# package.
# Cristian Chitiva <cychitivav@unal.edu.co>, 2023.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: ROS 2 documentation\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-06 22:03+0000\n"
"Language-Team: es <LL@li.org>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"Generated-By: Babel 2.8.0\n"

#: ../../source/Citations.rst:4 0a3348ee55c544d1b3bbc75970bfdc52
msgid "Citations"
msgstr "Citas"

#: ../../source/Citations.rst:6 11a5c2a6e6fc4d0281693512b10f0000
msgid ""
"If you use ROS 2 in your work please cite the 2022 Science Robotics paper"
" `Robot Operating System 2: Design, architecture, and uses in the wild "
"<https://www.science.org/doi/10.1126/scirobotics.abm6074>`_."
msgstr ""
"Si usa ROS 2 en su trabajo, cite el artículo de Science Robotics de 2022 "
"`Robot Operating System 2: Design, architecture, and uses in the wild "
"<https://www.science.org/doi/10.1126/scirobotics.abm6074>`_."

#: ../../source/Citations.rst:8 31f6c6019475419dab803cc1743b4043
msgid ""
"Macenski, T. Foote, B. Gerkey, C. Lalancette, W. Woodall, “Robot "
"Operating System 2: Design, architecture, and uses in the wild,” Science "
"Robotics vol. 7, May 2022."
msgstr ""
"Macenski, T. Foote, B. Gerkey, C. Lalancette, W. Woodall, “Robot "
"Operating System 2: Design, architecture, and uses in the wild,” Science "
"Robotics vol. 7, mayo de 2022."

#: ../../source/Citations.rst:25 e7716df961314d2096ff8cc32ccca0d4
msgid ""
"If you use ROS 2 Composition in your work, please cite the 2023 IEEE RA-L"
" paper `Impact of ROS 2 Node Composition in Robotic Systems "
"<https://arxiv.org/abs/2305.09933>`_."
msgstr ""
"Si usa ROS 2 Composition en su trabajo, cite el artículo IEEE RA-L de 2023 "
"`Impact of ROS 2 Node Composition in Robotic Systems "
"<https://arxiv.org/abs/2305.09933>`_."

#: ../../source/Citations.rst:27 ea9e0d6e1eba4e429f8b49fb42b4908d
msgid ""
"Macenski, A. Soragna, M. Carroll, Z. Ge, “Impact of ROS 2 Node "
"Composition in Robotic Systems”, IEEE Robotics and Autonomous Letters "
"(RA-L), 2023."
msgstr ""
"Macenski, A. Soragna, M. Carroll, Z. Ge, “Impact of ROS 2 Node "
"Composition in Robotic Systems”, IEEE Robotics and Autonomous Letters "
"(RA-L), 2023."
Loading