There are several documentation translations alreadyin production and can be found in the language switcher; others are works inprogress. To get started read your repository’s contributing guide, which isgenerally theREADME file, and this page.If your language isn’t listed below, feel free to start the translation!Seecoordination to get started.
For more details about translations and their progress, seetranslations.python.org.
Language | Coordination team | Links |
|---|---|---|
Arabic (ar) | Abdur-Rahmaan Janhangeer (@Abdur-rahmaanJ) | |
Kushal Das (@kushaldas) | ||
Julien Palard (@JulienPalard) | ||
Hindi (hi-IN) | Sanyam Khurana (@CuriousLearner) | |
Hungarian (hu) | ||
Kinebuchi Tomohiko (@cocoatomo), Atsuo Ishimoto (@atsuoishimoto) | ||
오동권 (@flowdas) | ||
Marathi (mr) | Sanket Garade (@sanketgarade,email) | |
Lithuanian (lt) | ||
Persian (fa) | Alireza Shabani (@revisto) | |
Maciej Olko (@m-aciek), Stan Ulbrych (@StanFromIreland) | ||
Rafael Fontenelle (@rffontenelle), Marco Rougeth (@rougeth) | ||
Russian (ru) | Daniil Kolesnikov (@MLGRussianXP,email) | |
Raúl Cumplido (@raulcd) | ||
Swedish (sv) | Daniel Nylander (@yeager) | |
王威翔 Matt Wang (@mattwang44), Josix Wang (@josix) | ||
Ege Akman (@egeakman) | ||
If there is already a repository for your language team (there may be links toTelegrams/Discords in theREADME), join and introduceyourself. Your fellow translators will be more than happy to help!General discussions about translations occur on the Python Docs Discord#translations channel and thetranslations category of the Python Discourse.
Before translating, you should familiarize yourself with the generaldocumentationstyle guide. Some translation-specificguidelines are explained below.
Try to stay as close as possible to the original text. Focus on translating itsmeaning in the best possible way.
Many languages use grammatical gender. When possible and natural, prefergender-neutral or inclusive forms. Aim to reflect the inclusive tone ofthe English documentation.
The Python docs contain many roles (:role:`target`) that link to other partsof the documentation.Do not translate reStructuredText roles targets, such as:func:`print` or:ref:`some-section` because it will break the link.If alternate text (:role:`text<target>`) is provided, it generallyshould be translated. You can also introduce alternate text for translation ifthe target is not a name or term.
Links (`text<target>`_) should be handled similarly. If possible, the targetshould be updated to match the language.
See also
Translators should know both English and the language they aretranslating to. Translators should aim for a similar level of quality as thatof the English documentation.
Do not rely solely on machine translation. These tools can be useful to speed upwork, but often produce inaccurate or misleading results and should be reviewedby a human.
The documentation is full of technical terms, some are common in generalprogramming and have translations, whereas others are specific to Pythonand previous translations are not available.Translation teams should keep the translations of these termsconsistent, which is done with glossaries.
Some general guidelines for deciding on a translation:
Use existing community conventions over inventing new terms.
You can use a hybrid English form if users are generally familiarwith the English word.
For common terms, the English word may be best.
Use other translations as a reference as to what they did for the word.
Be careful to not translate names.
Use your best judgment.
When you translate a specific term, record it in your translations glossary tohelp fellow translators and ensure consistency.
Some translations receive contributions from people of several different dialects,understandably the language will differ. It is recommended however thattranslators try to keep files and sections consistent.
Translate values in code examples, that is string literals, and comments.Don’t translate keywords or names, including variable, function, class, argument,and attribute names. An example of a translated codeblock from thetutorialis provided below:
defcheeseshop(kind,*arguments,**keywords):print("-- Czy jest może",kind,"?")print("-- Przykro mi, nie mamy już sera",kind)forarginarguments:print(arg)print("-"*40)forkwinkeywords:print(kw,":",keywords[kw])
Important
There are many translations in thepython-doc organization on Transifex,some of which, however, are not used or do not have a coordination team.Confirm that a coordination team exists before you begin translating.
Several language projects use Transifex as their translation interface.Translations on Transifex are carried out via a web interface, similar to Weblate.You should translate thepython-newest project.If you are new to Transifex, it is recommended that you take the time to readthrough the following resources from the Transifex documentation:
This covers signing up for an account and joining a translation team.
This covers getting to the editor, searching and filtering strings, and translating strings.
This covers the history, glossary, comments, keyboard shortcuts, and more.
A group of documents with basic information.
Within the organization, a project for translating thePython Docs Sphinx Theme can also befound.For further information about Transifex see ourdocumentation.
Some useful resources:
Several translations accept contributions by pull requests. Most have theirown guide for how to do this, but this can provide useful tips.
This project contains issues and pull requests that aim to improvethe Python documentation for translations.
Pootle is no longer used for translation. Contains translations for old Python versions.
To build a documentation translation for a specific language,you need to have Python installed and alocal copy of theCPython repository andtranslation repository (see table above). The PO files must be placedin alocales/LANG/LC_MESSAGES/ (replacingLANG with the translation’slanguage code) folder inside theDoc/ directory of the CPython repository.
You can then build withmake by addingaSPHINXOPTS="-Dlanguage=LANG" variable before the targetor by usingSphinx directly and adding a-Dlanguage=LANG option. For example:
# Build the HTML format of the Polish translation using makemakeSPHINXOPTS="-D language=pl"html# Build the HTML format of the Romanian translation using Sphinx directlypython-msphinx-bhtml.build/html-Dlanguage=ro
You should work on the latest branch available to you for translation (this shouldbe the latest non-alpha branch), the translations should then be propagated byyour languages coordination team.
The Sphinx theme for the Python documentation supports localization.
You can translate either onTransifex(seetranslating on Transifex for more information)or locally by following the steps outlined below.
To translate locally, clone thePython Docs Sphinx Theme repository and run the followingcommands to generate the PO files. ReplaceLANG with the same language codethat is used for the docs translation:
pythonbabel_runner.pyextractpythonbabel_runner.pyinit-lLANG
The file can then be found at:
python-docs-theme/locale/LANG/LC_MESSAGES/python-docs-theme.po
After translating, submit your PO file via a pull request to therepository.See ourGit bootcamp and cheat sheet for more information about using Git.
To update an existing translation after source changes, run:
pythonbabel_runner.pyupdate# To update source for all languagespythonbabel_runner.pyupdate-lLANG# To update source just for LANG
If you would like to coordinate, open a pull request in thedevguide adding yourself to the tableat the top of this page, and ping@python/editorial-board.