Announcement
Hello, VTK community,
I am the author of the Localize The Docs organization. And Iβm glad to announce that the
vtk-docs-l10n
project is published now:
Preview: vtk-docs-l10n
Crowdin: vtk-docs-l10n
GitHub: vtk-docs-l10n
The goal of this project is to translate the VTK Documentation into multiple languages. Translations are contributed via the Crowdin platform, automatically synchronized with the GitHub repository, and can be previewed on GitHub Pages.
How to Contribute Translations
To contribute the translations to the project, just follow the following steps:
- Create an account on Crowdin Enterprise if you donβt have one.
- Log in and go the vtk-docs-l10n project.
- Choose the language you would like to contribute.
If translators want to translate a language that is not yet supported, they just need to open a new issue to request the new language. Once the requested language is added, they can begin translating.
How to Reuse Translations?
If the upstream project or anyone wants to reuse the translated .po files prepared by the vtk-docs-l10n project, they can clone the .po files from the po/${VERSION} branch by using the following command:
git clone --depth=1 --branch=po/${VERSION} https://github.com/localizethedocs/vtk-docs-l10n.git Documentation/docs/locale
Those po/${VERSION} branches are created to facilitate reusage by the upstream project. For instance, the zh_TW documentation for the latest version can be generated using the commands below:
BRANCH=master
VERSION=latest
LANGUAGE=zh_TW
BUILDER=html
# Prepare the repository and environment
git clone --branch=${BRANCH} --depth=1 https://github.com/Kitware/VTK.git vtk-docs
cd vtk-docs
conda create --prefix ./.conda --yes
conda activate ./.conda
conda install python=3.12 graphviz -c conda-forge -c nodefaults --yes
export PYTHONNOUSERSITE=1
pip install -r Documentation/docs/requirements.txt
# Clone the .po files to the 'locale' directory
git clone --branch=po/${VERSION} --depth=1 https://github.com/localizethedocs/vtk-docs-l10n.git Documentation/docs/locale
# Build the documentation
sphinx-build \
-b ${BUILDER} \
-D language=${LANGUAGE} \
-D locale_dirs=locale \
-D gettext_compact=0 \
-D gettext_additional_targets=index,literal-block,raw \
Documentation/docs \
Documentation/docs/_build/${LANGUAGE}
# Preview the documentation
firefox Documentation/docs/_build/${LANGUAGE}/index.html
If you have questions about this project, feel free to propose here.