feat(i18n): add Turkish (tr) locale support and sync desktop spellchecker #39688
main fromrefs/pull/39688/head·opened View on GitHubProblem#
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#
Turkish (
tr) locale support across all surfaces:- Added
tr: "Türkçe"topackages/client-runtime/src/locales.tsso the language picker displays Turkish natively across clients. - Added
"tr"toapps/desktop/gt.config.json,apps/web/gt.config.json, andapps/mobile/gt.config.json, and registered thetr.jsoncatalog loaders inapps/desktop/src/i18n/messages.tsandapps/mobile/src/i18n/I18nProvider.tsx. - Added complete Turkish translation catalogs matching
en.jsonkey-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 registeredtrinapps/marketing/src/i18n/locales.tsandapps/marketing/src/i18n/index.ts.
- Added
Desktop spellchecker locale sync:
- Added
resolveSpellCheckerLanguagesandsyncSpellCheckerLanguagesinapps/desktop/src/electron/ElectronApp.tsto configureElectron.session.defaultSession.setSpellCheckerLanguageswith the active UI locale, matching system locales, and English (en-US) filtered againstavailableSpellCheckerLanguages. - Invoked
syncSpellCheckerLanguagesfromapplyLanguageinapps/desktop/src/i18n/messages.tsso 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.
- Added
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.jsoncheck):apps/web: 9,689 / 9,689 keys matched, 0 missing, 0 extraapps/mobile: 4,783 / 4,783 keys matched, 0 missing, 0 extraapps/desktop: 102 / 102 keys matched, 0 missing, 0 extraapps/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 newresolveSpellCheckerLanguagestest cases fortr+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, andeffect-tsgo tsrs --noEmitacross@t3tools/client-runtime,@t3tools/desktop,@t3tools/web, and@t3tools/marketingall 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
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
juliusmarminge closed this
Sign in to join this conversation.
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.