Translations of the docstrings of Python's turtle
module.
Translations live in gettext catalogs in the po/ directory.
The template is extracted from the turtle module of the Python you run the
script with, so use the latest Python version available:
$ python scripts/i18n.py extract
po/turtle.pot: 103 docstrings from Python 3.16.0a0Create a new catalog from the template for your language:
$ python scripts/i18n.py init ga
Created: po/ga.poYou can now translate it with your tool of choice.
After re-extracting the template against a newer Python, merge the changes into the existing catalogs:
$ python scripts/i18n.py update # all languages
$ python scripts/i18n.py update pl ga # specific languagesDocstrings whose original text changed are fuzzy-matched by default and marked
#, fuzzy for review. Fuzzy entries are not shipped until the flag is removed.
Pass --no-fuzzy to skip the matching and --drop-obsolete to delete entries
that no longer exist in the template rather than keeping them commented out.
$ python scripts/i18n.py stats
pl 42/103 translated (40%), 3 fuzzyEach PO file compiles to a top-level turtle_docstringdict_<lang>.py module
containing a docsdict, which is what turtle imports. Untranslated and fuzzy
entries are left out so their help stays English. When imported, the module drops
entries for names that do not exist in the running version of turtle, so a
single module built from the newest Python works on older ones too.
The modules are built automatically when the wheel is built, so you normally only need this to test locally:
$ python scripts/i18n.py compile
Compiled: turtle_docstringdict_pl.py