Skip to content

i18n: add Hindi (hi) translations across all namespaces - #242

Open
bikash1376 wants to merge 1 commit into
AtomicBot-ai:mainfrom
bikash1376:feature/hindi-locale
Open

i18n: add Hindi (hi) translations across all namespaces#242
bikash1376 wants to merge 1 commit into
AtomicBot-ai:mainfrom
bikash1376:feature/hindi-locale

Conversation

@bikash1376

Copy link
Copy Markdown

Adds web-app/src/locales/hi/ (17 namespace files, key-parity verified against en/) and registers hi in the language switcher and Language type.

Describe Your Changes

Adds Hindi as a new language option. All 17 locale namespaces under web-app/src/locales/hi/ are translated, and hi is registered in the language switcher and the Language type.

Went with a spoken/developer friendly register instead of formal textbook Hindi - kept common English terms (GPU, API, save, delete, etc.) as-is since that's how most Hindi-speaking devs actually talk, rather than forcing pure Hindi words for everything.

Verification

  • All 17 files are valid JSON, checked against en/ for matching keys (nothing missing or extra)
  • Checked every {{placeholder}} and matches the English source exactly, so nothing breaks at runtime
  • Double checked the llamacpp DFlash strings in settings.json against where they're actually used in the code, since that block is easy to mix up with the separate MLX dflash/mtp/eagle3 strings
  • yarn lint passes clean
  • Tested it running locally.

Adds web-app/src/locales/hi/ (17 namespace files, key-parity verified
against en/) and registers hi in the language switcher and Language type.
@bikash1376
bikash1376 requested a review from Vect0rM as a code owner August 18, 2026 14:27

Vect0rM commented Aug 20, 2026

Copy link
Copy Markdown
Member

Thank you for this, @bikash1376 — 1,566 lines across all seventeen namespaces is a serious piece of work, and the quality shows in the details. Hindi is a language we've had requests for.

I checked it mechanically rather than by eye, since that's where locale PRs usually go wrong:

  • All 17 namespaces present, matching en file-for-file.
  • Zero placeholder mismatches. Every {{count}}, {{provider}}, {{modelId}} survives the translation with the same set per key — this is the single most common way a locale PR breaks at runtime, and it's clean.
  • Zero extra keys (nothing renamed or invented).
  • The 32 strings identical to English are all correct to leave aloneGitHub, Discord, CPU, VRAM, Vulkan, ANN (sqlite-vec), Shift + Enter, the path placeholders. A machine-translated pass would have mangled those.
  • tsc -b exit 0, eslint clean, prettier --check src/locales/hi/*.json clean, merges cleanly.

The wiring is right too: i18n/setup.ts globs ../locales/**/*.json, so the directory is picked up automatically, and you correctly updated both LANGUAGES in LanguageSwitcher.tsx and the Language union in types/app.d.ts — the second one is easy to miss.

One thing before merge: main moved under you

6b535b6 ("enhance onboarding and download management for low-spec devices") landed on 19 Aug, a day after you opened this, and added 20 keys that hi doesn't have yet:

  • setup.json → the whole cloudStep block (17 keys): trigger, keyTitle, keyLabel, keyDescription, keyPlaceholder, keyProtected, keyOnly, showKey, hideKey, saveKey, saved, saveFailed, empty, galleryTitle, galleryDescription, modelCountOne, modelCountOther
  • chat.json: selectModelToChat
  • settings.json: general.preloadModelOnStartup, general.preloadModelOnStartupDesc

Nothing breaks without them — translate() falls back to en — but a Hindi user would hit the onboarding cloud step in English, which is exactly the moment you don't want a fallback. Could you rebase on main and add those?

One note on modelCountOne / modelCountOther: they're a plural pair, and Hindi's plural rules differ from English's, so please translate them as a pair rather than deriving one from the other.

Once those land I'll merge. Genuinely nice work — this is the cleanest locale contribution we've had 🙏


Generated by Claude Code

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.

2 participants