Skip to content

gh-138700: Add :sorted: option to automatically sort glossary#150321

Open
Vaibhav-S-Gowda wants to merge 1 commit into
python:mainfrom
Vaibhav-S-Gowda:gh-138700-fix-glossary-sorting
Open

gh-138700: Add :sorted: option to automatically sort glossary#150321
Vaibhav-S-Gowda wants to merge 1 commit into
python:mainfrom
Vaibhav-S-Gowda:gh-138700-fix-glossary-sorting

Conversation

@Vaibhav-S-Gowda
Copy link
Copy Markdown

Pull Request title

gh-138700: Add :sorted: option to automatically sort glossary

Description

This PR adds the :sorted: option to the .. glossary:: directive block inside Doc/glossary.rst.

Rationale

Currently, the Python documentation glossary is only organized in hardcoded alphabetical order for English. When the documentation is built for localized translations, the terms remain out of native alphabetical order for those target languages. Utilizing Sphinx's built-in :sorted: flag ensures that all language translations automatically compile their localized glossaries in clean, native alphabetical ordering during the build process.

Verification

  • Ran a local clean documentation build (make clean && make html) using a custom virtual environment.
  • Confirmed that the internal cross-reference anchor label (.. _glossary:) resolves perfectly and the build completes without errors.

@python-cla-bot
Copy link
Copy Markdown

python-cla-bot Bot commented May 23, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community
Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #32824449 | 📁 Comparing 3c6e065 against main (fad0674)

  🔍 Preview build  

1 file changed
± glossary.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant