Translate documentation to other languages
@albfan
Submitted by Alberto Fanjul Link to original bug (#789008)
Description
Doing some research about sphinx i18n, needed steps to translate docs are
Install sphinx-intl
$ sudo pip3 install sphinx-intl´
build gettext info
$ python -msphinx -M gettext . _build
Generate po files (here in spanish)
$ sphinx-intl update -p _build/gettext -l es Create: locale/es/LC_MESSAGES/installation.po Create: locale/es/LC_MESSAGES/index.po Create: locale/es/LC_MESSAGES/exploring.po Create: locale/es/LC_MESSAGES/troubleshooting.po Create: locale/es/LC_MESSAGES/credits.po Create: locale/es/LC_MESSAGES/plugins/vcs.po Create: locale/es/LC_MESSAGES/plugins/index.po Create: locale/es/LC_MESSAGES/plugins/greeter.po Create: locale/es/LC_MESSAGES/plugins/keybindings.po Create: locale/es/LC_MESSAGES/plugins/transfers.po Create: locale/es/LC_MESSAGES/plugins/langserv.po Create: locale/es/LC_MESSAGES/plugins/preferences.po Create: locale/es/LC_MESSAGES/plugins/devices.po Create: locale/es/LC_MESSAGES/plugins/creating.po Create: locale/es/LC_MESSAGES/plugins/running.po Create: locale/es/LC_MESSAGES/plugins/search.po Create: locale/es/LC_MESSAGES/plugins/enabling.po Create: locale/es/LC_MESSAGES/plugins/workers.po Create: locale/es/LC_MESSAGES/plugins/menus.po Create: locale/es/LC_MESSAGES/plugins/processes/index.po Create: locale/es/LC_MESSAGES/plugins/processes/subprocesses.po Create: locale/es/LC_MESSAGES/plugins/processes/runtimes.po Create: locale/es/LC_MESSAGES/plugins/editor/snippets.po Create: locale/es/LC_MESSAGES/plugins/editor/index.po Create: locale/es/LC_MESSAGES/plugins/editor/filesettings.po Create: locale/es/LC_MESSAGES/plugins/editor/highlighting.po Create: locale/es/LC_MESSAGES/plugins/editor/diagnostics.po Create: locale/es/LC_MESSAGES/plugins/editor/autocompletion.po Create: locale/es/LC_MESSAGES/plugins/editor/view.po Create: locale/es/LC_MESSAGES/plugins/editor/buffers.po Create: locale/es/LC_MESSAGES/plugins/symbols/index.po Create: locale/es/LC_MESSAGES/plugins/symbols/symbols.po Create: locale/es/LC_MESSAGES/plugins/symbols/rename.po Create: locale/es/LC_MESSAGES/plugins/symbols/gotodef.po Create: locale/es/LC_MESSAGES/plugins/building/index.po Create: locale/es/LC_MESSAGES/plugins/building/buildsystem.po Create: locale/es/LC_MESSAGES/plugins/building/pipeline.po Create: locale/es/LC_MESSAGES/plugins/workbench/basics.po Create: locale/es/LC_MESSAGES/plugins/workbench/index.po Create: locale/es/LC_MESSAGES/plugins/workbench/perspectives.po Create: locale/es/LC_MESSAGES/plugins/workbench/panels.po Create: locale/es/LC_MESSAGES/plugins/workbench/actions.po Create: locale/es/LC_MESSAGES/plugins/workbench/headerbar.po Create: locale/es/LC_MESSAGES/projects/debugging.po Create: locale/es/LC_MESSAGES/projects/sharing.po Create: locale/es/LC_MESSAGES/projects/index.po Create: locale/es/LC_MESSAGES/projects/profiling.po Create: locale/es/LC_MESSAGES/projects/creating.po Create: locale/es/LC_MESSAGES/projects/building.po Create: locale/es/LC_MESSAGES/contributing/index.po Create: locale/es/LC_MESSAGES/contributing/writingdocs.po Create: locale/es/LC_MESSAGES/contributing/planning.po Create: locale/es/LC_MESSAGES/contributing/code.po Create: locale/es/LC_MESSAGES/howto/jump_to_definition.po Create: locale/es/LC_MESSAGES/howto/index.po Create: locale/es/LC_MESSAGES/howto/search_and_replace.po Create: locale/es/LC_MESSAGES/howto/search_for_symbol.po Create: locale/es/LC_MESSAGES/howto/indentation.po
Translate some file:
20 #: ../../installation.rst:14
21 msgid "Installation"
22 msgstr "Instalación"
$ python -msphinx -M html -Dlanguage='es' . _build
Documentation is translated
I'm talking with Alexander Franke about how this fit into i18n workflow, by now all we have is https://mail.gnome.org/archives/gnome-i18n/2017-March/msg00048.html