Repository navigation
fix(docs): build and list only published locales; mark Spanish as a partial translation (ECO-179) - #29
Merged
Conversation
…artial translation (ECO-179) buildDocs.sh built `en` plus every dir under docs/locales/. docs/locales/en is a catalog dir too, so English was built twice, and nine locales with 0% translated strings were published. conf.py filled the language switcher the same way, so it linked to all of them. - docs/locales/PUBLISHED lists the translated locales to publish (today `es partial`). docs/scripts/published_locales.py turns it into the one language list (English first); buildDocs.sh builds exactly that list and conf.py renders the switcher from it. A typo, duplicate, unknown flag or listed `en` fails the build. - A `partial` locale shows as `es (partial)` in the switcher and gets a "Partial translation" banner linking to the English docs on every page. - PR check: unit-test the helper and check the built switcher. Deploy: assert the built site holds only the published languages, each with the right switcher and banner, before uploading. - AGENTS.md and CONTRIBUTING.md: a new locale is published by listing it in PUBLISHED, not by its catalog dir existing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Finishes ECO-179. #23 already fixed the root redirect; this PR covers what was left.
Problem
buildDocs.shbuiltenplus every dir underdocs/locales/.docs/locales/enis a catalog dir too, so English was built twice. The nine 0%-translated locales (ar bn de fr hi ja pt ru zh) were published as well.conf.pyfilled the language switcher with the same scan, so it linked to all of them.Change
docs/locales/PUBLISHED(new) lists the translated locales to publish. Today it holdses partial.docs/scripts/published_locales.py(new) turns that file into the language list, English first.buildDocs.shbuilds exactly that list, read once onmainthe same way asswitcher.json.conf.pyrenders the switcher from the same list. A typo, a duplicate, an unknown flag or a listedenfails the build.partiallocale shows ases (partial)in the switcher. Every page in it gets a "Partial translation" banner (themeannouncement) that links to the English docs.test_published_locales.py) and checks the switcher on theenbuild it already does (check_published_languages.py).PUBLISHED, not by its catalog dir existing.Testing (local, on this branch)
sphinx-build -Wwith no warnings and 59 pages, the asset check, the redirect test and the switcher check.conf.py, the switcher check fails for bothenandes(11 languages listed, no banner). With the fix it passes for both, 59 pages each.buildDocs.shin a throwaway clone. The log showsPublishing languages: en es, with each language built once per version. The docroot holds onlyen/andes/, and the new deploy step passes on it.pt/tree is added to the docroot, and if the banner is removed from oneespage.After merge
/pt/main/404;/es/main/200 with the banner;enbuilt once in the deploy log) need this change onmainplus a Pages deploy./*/dev/pages are built bydev's ownconf.py, so their switcher is correct once this is merged intodev.🤖 Generated with Claude Code