Support translations in Storybook: locale toolbar#6843
Open
reecebrowne wants to merge 1 commit into
Open
Conversation
762d1d5 to
ee6ae00
Compare
bd6f52d to
2784e39
Compare
Base automatically changed from
feat/storybook-i18n-init
to
feat/shared-branding
June 30, 2026 10:36
4ca60d8 to
ee6ae00
Compare
Adds a globe toolbar in Storybook that lets you switch between all 41 supported languages and see useTranslation() update live. All editor locale TOML files are bundled at build time via import.meta.glob so no new import line is needed per language. en-US merges portal + editor keys; every other locale is editor-only until the portal gets translations. RTL languages (Arabic, Farsi) also flip document.dir so layout is correct.
2784e39 to
83c8e55
Compare
Contributor
🚀 V2 Auto-Deployment Complete!Your V2 PR with embedded architecture has been deployed! 🔗 Direct Test URL (non-SSL) http://54.175.155.236:6843 🔐 Secure HTTPS URL: https://6843.ssl.stirlingpdf.cloud This deployment will be automatically cleaned up when the PR is closed. 🔄 Auto-deployed for approved V2 contributors. |
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
en-USraw import forimport.meta.globover all editor locale files so every language is bundled at build time — no new import line needed per languageen-USmerges portal + editor keys; all other locales are editor-only until the portal gets translationsar-AR, Farsifa-IR) also flipdocument.dirso layout direction is correctDepends on: #6714 (base i18n init)
Test plan
{code} — {native name}de-DEon an editor story (e.g. Editor/Policies) — UI strings update to Germanar-AR—document.dirflips tortl, layout mirrors correctlyen-USon a portal story (e.g. Portal/AccountLink/LinkAccountCard) — shows translated strings; switching to any other language falls back to keys (expected until portal gets translations)