Skip to content

fix(docs): build and list only published locales; mark Spanish as a partial translation (ECO-179) - #29

Merged
33imattei33 merged 1 commit into
devfrom
fix/eco-179-published-locales
Oct 26, 2026
Merged

33imattei33 merged 1 commit into
devfrom
fix/eco-179-published-locales

Conversation

@33imattei33

Copy link
Copy Markdown
Contributor

Finishes ECO-179. #23 already fixed the root redirect; this PR covers what was left.

Problem

buildDocs.sh built en plus every dir under docs/locales/. docs/locales/en is 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.py filled 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 holds es partial.
  • docs/scripts/published_locales.py (new) turns that file into the language list, English first. buildDocs.sh builds exactly that list, read once on main the same way as switcher.json. conf.py renders the switcher from the same list. A typo, a duplicate, an unknown flag or a listed en fails the build.
  • Partial locales: a partial locale shows as es (partial) in the switcher. Every page in it gets a "Partial translation" banner (theme announcement) that links to the English docs.
  • CI:
    • The PR check unit-tests the helper (test_published_locales.py) and checks the switcher on the en build it already does (check_published_languages.py).
    • The deploy job asserts that the built site holds only the published languages, each with the right switcher and banner, before it uploads.
  • Docs: AGENTS.md and CONTRIBUTING.md now say a new locale is published by listing it in PUBLISHED, not by its catalog dir existing.

Testing (local, on this branch)

  • 12 unit tests pass.
  • The PR check steps pass: sphinx-build -W with no warnings and 59 pages, the asset check, the redirect test and the switcher check.
  • On the old conf.py, the switcher check fails for both en and es (11 languages listed, no banner). With the fix it passes for both, 59 pages each.
  • I ran the real buildDocs.sh in a throwaway clone. The log shows Publishing languages: en es, with each language built once per version. The docroot holds only en/ and es/, and the new deploy step passes on it.
  • The deploy step fails if a pt/ tree is added to the docroot, and if the banner is removed from one es page.

After merge

  • Live check: the acceptance checks against the live site (/pt/main/ 404; /es/main/ 200 with the banner; en built once in the deploy log) need this change on main plus a Pages deploy.
  • dev switcher: /*/dev/ pages are built by dev's own conf.py, so their switcher is correct once this is merged into dev.

🤖 Generated with Claude Code

…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>
@33imattei33
33imattei33 merged commit 7091322 into dev Oct 26, 2026
5 checks passed
33imattei33 added a commit that referenced this pull request Oct 26, 2026
release: Building Apps concept pages (#28) and published-locales fix (#29) to main
@33imattei33
33imattei33 deleted the fix/eco-179-published-locales branch October 26, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants