Conversation
Read the Docs's prescribed multi-language layout is one project per language linked under a main project's Translations tab. Add the two missing translation configs (.readthedocs.zh-TW.yaml, .readthedocs.zh-CN.yaml) so each Sphinx source tree builds as its own RTD project. Set language explicitly on every conf.py and pull html_baseurl from READTHEDOCS_CANONICAL_URL so canonical link tags match the per-language URL RTD serves. Replace the relative ../html-*/index.html switcher links with absolute https://fileautomation.readthedocs.io/<lang>/latest/ URLs so cross-language navigation works on the public site (the relative form 404s because only the English source was built on RTD), and add a brief note pointing to RTD's built-in language flyout.
Up to standards ✅🟢 Issues
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
The previous PR shipped a homepage rewrite, but only the English source tree was wired up on Read the Docs — relative
../html-zh-TW/index.htmlswitcher links 404 on the public site because the two Chinese sources are never built or deployed. This PR follows RTD's prescribed multi-language layout: one project per language, linked under a main project's Translations tab..readthedocs.zh-TW.yamland.readthedocs.zh-CN.yamlso each Sphinx source tree builds as its own RTD project..readthedocs.yamlas the English (main) project config.language = "en"ondocs/source/conf.py(was implicit) and pulledhtml_baseurlfromREADTHEDOCS_CANONICAL_URLon every conf.py so canonical link tags match the per-language URL RTD serves.../html-*/index.htmlswitcher with absolutehttps://fileautomation.readthedocs.io/<lang>/latest/URLs and added a brief note pointing at RTD's built-in language flyout.Commits in this PR
5bf51c3Configure docs as three Read the Docs translation projectsRequired RTD admin steps after merge
Config alone can't create projects — these steps must happen on https://readthedocs.org:
fileautomation(main, English)fileautomation-zh-tw(Traditional Chinese)fileautomation-zh-cn(Simplified Chinese).readthedocs.yaml=.readthedocs.zh-TW.yaml/.readthedocs.zh-CN.yaml. Set Language to Traditional Chinese / Simplified Chinese.fileautomationproject, open the Translations tab and link the two translation projects. RTD then serves them at/zh_TW/and/zh_CN/and adds an automatic language selector to the version flyout on every page.Test plan
py -m sphinx -b html docs/source docs/_build/htmlpy -m sphinx -b html docs/source.zh-TW docs/_build/html-zh-TWpy -m sphinx -b html docs/source.zh-CN docs/_build/html-zh-CNhttps://fileautomation.readthedocs.io/<lang>/latest/switcher links.https://fileautomation.readthedocs.io/en/latest/shows the language flyout and the in-page switcher links navigate between/en/,/zh_TW/, and/zh_CN/.