Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(i18n): add Turkish (tr) locale support and sync desktop spellchecker #39688

Closedjacksumberg7(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/39688/headopened View on GitHub

Problem

T3 Code currently ships 10 UI locales (en, de, es, fr, ja, ko, pt-BR, ru, sv, zh), leaving Turkish (tr) users without localized UI strings across Desktop, Web, Mobile, and the marketing site.

In addition, on Windows/Linux desktop builds, Electron's Chromium spellchecker is never synced with the active UI or system languages (session.defaultSession.setSpellCheckerLanguages), so Turkish words typed in the prompt composer are underlined in red as spelling errors even when Turkish is selected.

Change

  1. Turkish (tr) locale support across all surfaces:

    • Added tr: "Türkçe" to packages/client-runtime/src/locales.ts so the language picker displays Turkish natively across clients.
    • Added "tr" to apps/desktop/gt.config.json, apps/web/gt.config.json, and apps/mobile/gt.config.json, and registered the tr.json catalog loaders in apps/desktop/src/i18n/messages.ts and apps/mobile/src/i18n/I18nProvider.tsx.
    • Added complete Turkish translation catalogs matching en.json key-for-key (preserving all ICU placeholders, plural/select rules, and General Translation JSX AST nodes):
      • apps/desktop/src/i18n/translations/tr.json (102 keys)
      • apps/web/src/i18n/translations/tr.json (9,689 keys)
      • apps/mobile/src/i18n/translations/tr.json (4,783 keys)
    • Added apps/marketing/src/i18n/tr.ts (72 keys) and registered tr in apps/marketing/src/i18n/locales.ts and apps/marketing/src/i18n/index.ts.
  2. Desktop spellchecker locale sync:

    • Added resolveSpellCheckerLanguages and syncSpellCheckerLanguages in apps/desktop/src/electron/ElectronApp.ts to configure Electron.session.defaultSession.setSpellCheckerLanguages with the active UI locale, matching system locales, and English (en-US) filtered against availableSpellCheckerLanguages.
    • Invoked syncSpellCheckerLanguages from applyLanguage in apps/desktop/src/i18n/messages.ts so both Turkish (or other non-English locales) and English/code terms are spellchecked properly in the composer.
    • Added unit tests in apps/desktop/src/electron/ElectronApp.test.ts.

Scope

Full Turkish (tr) localization across all T3 Code client surfaces (desktop, web, mobile, marketing) together with the desktop Electron spellchecker sync needed so Turkish input in the composer works without false-positive red underlines.

Verification

  • GT catalog & key parity (gt generate + tr.json check):
    • apps/web: 9,689 / 9,689 keys matched, 0 missing, 0 extra
    • apps/mobile: 4,783 / 4,783 keys matched, 0 missing, 0 extra
    • apps/desktop: 102 / 102 keys matched, 0 missing, 0 extra
    • apps/marketing: 72 / 72 keys and all {placeholder} tokens matched
  • Automated placeholder / ICU / JSX AST audit: verified balanced braces, exact ICU variable & plural/select structure parity, and exact GT JSX AST node parity across all 14,574 JSON entries with 0 errors.
  • Unit tests: vp test run apps/desktop/src/electron/ElectronApp.test.ts — 6/6 passed (including new resolveSpellCheckerLanguages test cases for tr + en-US, Turkish OS + English UI, unsupported dictionary fallback, and empty available-language list).
  • Static checks: vp fmt, vp lint (0 warnings, 0 errors), vp run knip:check, and effect-tsgo tsrs --noEmit across @t3tools/client-runtime, @t3tools/desktop, @t3tools/web, and @t3tools/marketing all passed cleanly.
  • Not checked: Interactive native mobile build (iOS/Android) was not launched on a physical device.

Built with Gemini 4 Neon via Antigravity in T3 Code.

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. Thanks for this. #38681 makes the same change and is the one being kept.

      #38681 already adds Turkish across the same surfaces and also registers the Turkish plural-rule data needed by mobile, which this version omits. That makes it the more complete localization to keep.

      The desktop spellchecker work is a separate improvement worth preserving independently. Please coordinate it with #32311, which already addresses choosing composer spellcheck languages.

      Closing as a duplicate.

    3. juliusmarminge closed this

Sign in to join this conversation.