feat(i18n): translate the demo and add a demo language switcher - #122
Merged
Conversation
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.
Brings the GitHub Pages demo into the translation layer and lets visitors switch
language from the demo itself.
What's here
resolve their text through the translation layer, so the demo is no longer
English-only.
available (so it appears automatically as catalogs get published).
loader reads the manifest and catalogs straight from the CDN (the same files the
backend proxy serves in the real app). The real build is unchanged.
Only English is published today, so the switcher stays hidden until a translation
lands; the wiring is in place for when one does.
Testing
npm run check-i18npasses (646 keys); a check confirms everyt()key in thesource resolves.
VITE_DEMO=1demo build compile; the committedweb/distis the normal (non-demo) build.