GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - tamnd/python-docs-template: Starter template for PEP 545 Python docs translations (any language)

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
c-api
c-api
 
 
deprecations
deprecations
 
 
distributing
distributing
 
 
extending
extending
 
 
faq
faq
 
 
howto
howto
 
 
installing
installing
 
 
library
library
 
 
reference
reference
 
 
tutorial
tutorial
 
 
using
using
 
 
whatsnew
whatsnew
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
TRANSLATORS
TRANSLATORS
 
 
about.po
about.po
 
 
bugs.po
bugs.po
 
 
contents.po
contents.po
 
 
copyright.po
copyright.po
 
 
glossary.po
glossary.po
 
 
improve-page-nojs.po
improve-page-nojs.po
 
 
improve-page.po
improve-page.po
 
 
license.po
license.po
 
 
requirements-dev.txt
requirements-dev.txt
 
 
sphinx.po
sphinx.po
 
 

Repository files navigation

python-docs-template

Starter template for a new PEP 545 translation of the Python documentation. Fork or copy this repository to bootstrap a python-docs-{LANGUAGE_TAG} repo for any language.

The main branch carries the English source strings extracted from CPython 3.14 (make gettext plus sphinx-intl update), with every msgstr empty. Use it as the zero-state for a language you are about to start translating.

What is inside

  • 535 .po files mirroring CPython's Doc/ tree (flat layout: the same one used by python/python-docs-fr, python/python-docs-tr, etc.).
  • Makefile pinned to a specific CPython commit so local builds are reproducible.
  • README.md, CONTRIBUTING.md, LICENSE (CC0 1.0), TRANSLATORS, .pre-commit-config.yaml, requirements-dev.txt.

Bootstrapping a new language

  1. Pick a tag. Use the lowercased IETF BCP 47 tag with no redundant region subtag: vi, ja, ko, de, pt-br, zh-hans, ...
  2. Fork or copy this repo to python-docs-{TAG}.
  3. Edit Makefile and set LANGUAGE := {TAG}.
  4. Rewrite README.md in the target language and add the PEP 545 Documentation Contribution Agreement verbatim.
  5. Add the initial coordinator to TRANSLATORS.
  6. Start translating. Sphinx ignores fuzzy entries at build time, so partial translations are safe to merge.

Regenerating the English source

If upstream CPython has moved and you want to refresh the msgids:

git clone --depth 1 --branch 3.14 https://github.com/python/cpython
cd cpython/Doc
make venv
make gettext
python3 -m pip install sphinx-intl
sphinx-intl update -p build/gettext -l {TAG}
rsync -a locales/{TAG}/LC_MESSAGES/ /path/to/python-docs-{TAG}/

The sphinx-intl update step runs msgmerge under the hood, so existing translations are preserved and new/changed msgids surface as fuzzy entries.

Building the translated docs locally

python -m pip install -r requirements-dev.txt
make

This clones CPython into venv/cpython/, checks out the pinned commit, copies the .po files into locales/{LANGUAGE}/LC_MESSAGES/, and runs Sphinx with the target language. Output HTML lands in venv/cpython/Doc/build/html/index.html.

Documentation Contribution Agreement

Per PEP 545, contributions to a language translation are released under CC0 1.0. When you fork this template for a new language, replace this section of the downstream README.md with the agreement text quoted verbatim from PEP 545 (translated teams typically keep the English agreement and add a translated version below it).

Real translations using this layout

  • python/python-docs-fr
  • python/python-docs-tr
  • python/python-docs-ja
  • python/python-docs-ko
  • python/python-docs-pt-br
  • tamnd/python-docs-vi

About

Starter template for PEP 545 Python docs translations (any language)

Resources

Readme

Contributing

Contributing
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.