Repository navigation
Register eight new locales and add their fallback prose - #89
Merged
Merged
Conversation
Adds tr, hi, vi, ja, fa, ko, pl and it to the locale registry, taking the site from 9 to 17 languages. Persian is the second RTL locale after Arabic; everything directional derives from the registry's dir field, so it needed no separate handling. Each new locale gets its own templated fallback prose — five data-profile paragraphs plus the network-touching FAQs — rather than falling back to English, which ToolSeoContent would otherwise suppress entirely. The model-download copy states in every language that model files come from a third-party CDN on first use while the user's own content stays on the device; a per-locale regex in the test suite asserts that claim appears in the model-download paragraph and never in the on-device one. locale-metadata.ts had a hardcoded map of static message imports covering only the original nine. It now reads through the shared lazy loader, so src/lib/locales.ts is the only place a language is ever declared.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Takes the site from 9 to 17 languages: Turkish, Hindi, Vietnamese, Japanese, Persian, Korean, Polish, Italian. The translations themselves are already on main; this is the wiring that makes them reachable.
Persian is the second RTL locale after Arabic and needed no special handling — direction derives from the registry.
Each locale gets its own templated fallback prose rather than falling back to English (which
ToolSeoContentsuppresses by design, so the pages would otherwise render blank SEO sections).Verified with JS disabled on
/{locale}/tools/cron-parser:* Japanese counts low because the text has no spaces to split on; its rendered prose is comparable in length.
Also checked
/{locale}/tools/image-captioner(a model-download tool) in tr/ja/fa: the two-part privacy claim renders correctly in each — model files fetched from a third-party CDN on first use, user content processed on device.locale-metadata.tspreviously held a hardcoded 9-entry map of static message imports; it now uses the shared lazy loader, solocales.tsis the only place a language is declared.Gates: tsc clean, 1349 tests passing (was 1317), lint 0 errors, validate 152/152.