Skip to content

feat(docs): crowdin translations setup - #9368

Draft
joshistoast wants to merge 8 commits into
invoke-ai:mainfrom
joshistoast:feat/crowdin-translations
Draft

feat(docs): crowdin translations setup#9368
joshistoast wants to merge 8 commits into
invoke-ai:mainfrom
joshistoast:feat/crowdin-translations

Conversation

@joshistoast

Copy link
Copy Markdown
Collaborator

Summary

Initial setup for crowdin translations for documentation site.

Related Issues / Discussions

QA Instructions

Merge Plan

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@github-actions github-actions Bot added CI-CD Continuous integration / Continuous delivery Root frontend-deps PRs that change frontend dependencies docs PRs that change docs labels Jul 20, 2026
@lstein lstein self-assigned this Jul 21, 2026
Pfannkuchensack and others added 6 commits July 24, 2026 13:26
The rule for prefixing a root-relative path with a locale, and the list of
custom pages exempt from it, were hand-copied between the remark plugin and
the runtime rewrite in MarkdownContent. Move both into
src/lib/link-localization.mjs so a new page under src/pages/ only has to be
registered once, and cover the helpers with unit tests.

Claude-Session: https://claude.ai/code/session_016pdfTjHiM9inq24jMHDE2y
MDX components stay JSX nodes through rehype instead of becoming <a>
elements, so rehypePrefixBaseToRootLinks skipped them and Starlight's
LinkButton passes href straight to the DOM. The home page "Get Invoke"
button therefore shipped as /download/ on the GitHub Pages target and 404'd.
Rewrite href/link attributes on MDX JSX nodes too, derive the links-validator
exclusions from the shared exemption list so they stay base-aware, and assert
the button in the deploy output check.

Claude-Session: https://claude.ai/code/session_016pdfTjHiM9inq24jMHDE2y
An href equal to the base with no trailing slash did not match the
`${base}/` test, so it fell through unstripped and the locale was inserted
after it, producing /InvokeAI/de/InvokeAI. Handle the exact-base case, adopt
the shared exemption list, and document why this rewrite happens at runtime
and what that costs.

Claude-Session: https://claude.ai/code/session_016pdfTjHiM9inq24jMHDE2y
starlight-links-validator errors on fallback pages by default, so the first
Crowdin import fails the build: a translated page linking to a page that is
not translated yet points at a route Starlight generates as fallback content
and the validator rejects it. Only six trees are translated and pages arrive
one batch at a time, so this is the expected state, not a broken link.

Claude-Session: https://claude.ai/code/session_016pdfTjHiM9inq24jMHDE2y
The localized expectations required `lang="en" dir="ltr"` on
start-here/installation, which only holds while that page is fallback
content. Translating it would have failed the deploy check on the Crowdin
import PR. Assert fallback rendering on contributing/translations instead,
which sits outside crowdin.yml and stays untranslated.

Claude-Session: https://claude.ai/code/session_016pdfTjHiM9inq24jMHDE2y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI-CD Continuous integration / Continuous delivery docs PRs that change docs frontend-deps PRs that change frontend dependencies Root

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants