Skip to content

doc: add Spanish (es) documentation translations - #5112

Merged
qinxuye merged 6 commits into
xorbitsai:mainfrom
kejhz653-stack:feat/docs-i18n-es
Jul 2, 2026
Merged

qinxuye merged 6 commits into
xorbitsai:mainfrom
kejhz653-stack:feat/docs-i18n-es

Conversation

@kejhz653-stack

Copy link
Copy Markdown
Contributor

Summary

  • Add machine-translated PO files for Spanish (es) documentation locale
  • Translations are based on the zh_CN template using DeepSeek API

Preview

Language URL
Spanish https://inference-i18n-es.readthedocs.io/es/latest/

Test plan

  • Verify RTD build succeeds for es after merge
  • Configure RTD translation for es on the main inference project

Made with Cursor

jiangjiawei and others added 3 commits July 1, 2026 19:04
Bring in unified switcher.json, locale-aware navbar labels, and Read the Docs mo compilation helpers from feat/docs-i18n-de.
pt_BR and zh_TW catalogs fail when passed to Babel as pt-br/zh-tw; keep Sphinx locale folder names unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
@XprobeBot XprobeBot added the documentation Improvements or additions to documentation label Jul 1, 2026
@XprobeBot XprobeBot added this to the v2.x milestone Jul 1, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request automates the compilation of translation catalogs (.po to .mo) for Sphinx documentation builds on Read the Docs and local environments. It introduces helper scripts for locale mapping and catalog compilation, updates the Sphinx configuration, and expands the documentation language switcher. The review feedback recommends improving robustness by handling the potential absence of the 'babel' library, simplifying the language resolution logic, and defensively modifying theme options using 'setdefault' to avoid potential KeyErrors.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread doc/build_i18n.py
Comment thread doc/build_i18n.py
Comment thread doc/i18n_locales.py Outdated
Comment thread doc/source/conf.py Outdated
Detect missing babel up front and fall back to sphinx-intl for --all builds, and normalize explicit locale slugs consistently.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kejhz653-stack

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive internationalization (i18n) build system for the documentation, including a script to compile .po catalogs to .mo files, updated Makefile targets, ReadTheDocs integration, and Spanish translation catalogs. It also expands the language switcher to support ten languages and dynamically configures localized theme options in conf.py. The review feedback suggests several robustness improvements: handling English sub-locales (e.g., en-us) to prevent incorrect translation directory resolution, using .setdefault() to avoid a potential KeyError when configuring the version switcher, and wrapping the catalog compilation in a try...except block to prevent compilation failures from crashing local Sphinx builds.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread doc/i18n_locales.py Outdated
Comment thread doc/source/conf.py Outdated
Comment thread doc/source/conf.py
Normalize en-us/en-gb to English builds and use setdefault when updating the theme language switcher.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kejhz653-stack

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@kejhz653-stack

Copy link
Copy Markdown
Contributor Author

Please review this pr @qinxuye .Thanks!

Catch mo compilation failures during conf import so missing tooling or bad catalogs do not abort Sphinx builds, use app.tags for zh_cn, and fix replica and XINFERENCE_LAUNCH_STRATEGY terminology in es and zh_CN launch docs.

Co-authored-by: Cursor <cursoragent@cursor.com>

@OliverBryant OliverBryant left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qinxuye
qinxuye merged commit 89fa0ab into xorbitsai:main Jul 2, 2026
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants