- Find your language in Python Developer's Guide > Documentation > Translating.
- If it's missing there, start a new translation.
- If it's not using Transifex, download Poedit.
- If it's using Transifex, sign up to Transifex.
- Request to join a language team in python-doc organization on Transifex.
- Select a resource you want to start translating.
- Locate a resource and a string in translating tool.
- Look for the context of the paragraph/sentence to translate in rendered (built) docs.
- Look for glossary terms underlined in a source string.
- Optionally update the glossary.
- Look for suggestions, and use it to base the new translation on one of them.
- Make sure that you fully understand the sense and context of the paragraph/sentence.
- Optionally you can use an external translation tool.
- Using above points, try to come up with a few sentences. "Would it be understandable for your friend?"
- You may want to consult something with the translation group, use Discord.
- If you're not sure, you can use Save as Suggestion.
- You may want to manually check the correctness of reStructuredText syntax of your translation. You can use Online Sphinx editor.
- Open Actions tab in the GitHub repository.
- Look for most recent documentation build there.
- If the build fails, read through the logs and try to locate and resolve the cause.
- If the build succeeds, from Artifacts section download the documentation in desired version and format.
- Clone CPython repository.
- Enter
Doc
directory. - Call
make venv
. - Activate the venv:
.venv/bin/activate
. - Call
make html
. - The generated files will be placed in the
_build/html
directory.
- Clone your language translation repository.
- Create directories
locale/xx
incpython/Doc
, wherexx
is your language shortcut. - Create a symlink in the CPython repository pointing to freshly cloned translation.
ln -s cpython/Doc/locales/xx/LC_MESSAGES python-docs-xx
- Call
-e SPHINXOPTS="-D language='xx'" html
incpython/Doc
repository. - The generated files will be placed in the
_build/html
directory.
- Go to Transifex user settings > API token.
- Generate a new token.
- Set it as a TX_TOKEN environment variable.
- In the language repository call
python manage_translation.py fetch
.
- poutils for PO-file related tasks
- sphinx-intl for updating existing translations with new source strings
- Weblate's continuous localization – Transifex alternative
- MyST – reStructuredText alternative
- docsbuild-scripts – where the documentation is built for multiple versions and languages for docs.python.org
- docspush-transifex – where the source strings updates are pushed to Transifex