Skip to content

Register eight new locales and add their fallback prose - #89

Merged
aghyad97 merged 1 commit into
mainfrom
feat/register-new-locales
Aug 2, 2026
Merged

aghyad97 merged 1 commit into
mainfrom
feat/register-new-locales

Conversation

@aghyad97

@aghyad97 aghyad97 commented Aug 2, 2026

Copy link
Copy Markdown
Owner

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 ToolSeoContent suppresses by design, so the pages would otherwise render blank SEO sections).

Verified with JS disabled on /{locale}/tools/cron-parser:

locale lang dir words
tr tr ltr 157
hi hi ltr 197
vi vi ltr 251
ja ja ltr 69*
fa fa rtl 184
ko ko ltr 154
pl pl ltr 170
it it ltr 177

* 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.ts previously held a hardcoded 9-entry map of static message imports; it now uses the shared lazy loader, so locales.ts is the only place a language is declared.

Gates: tsc clean, 1349 tests passing (was 1317), lint 0 errors, validate 152/152.

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.
@vercel

vercel Bot commented Aug 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
browserytools Ready Ready Preview Aug 2, 2026 1:50pm

Request Review

@aghyad97
aghyad97 merged commit c842993 into main Aug 2, 2026
4 checks passed
@aghyad97
aghyad97 deleted the feat/register-new-locales branch August 2, 2026 13:53

This branch was successfully deployed

1 active deployment
Preview — 9999c633 Deployed Aug 2, 2026 by vercel[bot]
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.

1 participant