Repository navigation
feat(i18n): add Turkish UI language - #34718
Conversation
Register Turkish (tr) as a built-in UI language alongside en, zh, ko, ja, es, fr and pt: language setting, system-locale detection, renderer and main-process lazy catalogs, Settings picker label in every catalog, Settings search keyword, onboarding picker, docs, README link and a Turkish style glossary (config/i18n-turkish.md). tr.json comes from the community Turkish catalog (#22200, refreshed in #31316), reconciled with the current en.json: keys retired from en.json, entries whose English source changed since the refresh, and entries with placeholder mismatches are dropped and fall back to English until the next translation pass. Supersedes #31316. Co-authored-by: Uğur Pala <mail@ugurpala.com> Co-authored-by: mert <mmerttpz@gmail.com> Co-authored-by: Mehmet Efe Aytaş <mehmetefeaytas@icloud.com>
Walkthrough
Priority: Merge Risk:
|
Translate the 1,432 keys tr.json was missing, restore the count placeholder in six Turkish singular forms, and order the catalog like en.json.
Correct 32 mistranslations (wrong meaning, translated command names and example paths, swapped placeholders) and 525 glossary and grammar issues that two independent review passes both flagged.
|
Maintainer edits since the first push:
A native-speaker spot check is still welcome before merge. |
Fold U+0307 from lowercased Turkish İ so settings search matches plain-i queries, fix sampled Turkish meaning/terminology issues, and align the glossary casing rule with the catalog.
# Conflicts: # docs/site/content/docs/settings.mdx # src/main/i18n/main-i18n.ts # src/renderer/src/i18n/i18n.ts # src/shared/ui-locale.ts
# Conflicts: # docs/site/content/docs/settings.mdx # src/main/i18n/main-i18n.ts # src/renderer/src/components/onboarding/OnboardingLanguageSwitcher.test.tsx # src/renderer/src/components/settings/appearance-search.ts # src/renderer/src/i18n/i18n.ts # src/renderer/src/i18n/locales/en.json # src/renderer/src/i18n/locales/es.json # src/renderer/src/i18n/locales/fr.json # src/renderer/src/i18n/locales/ja.json # src/renderer/src/i18n/locales/ko.json # src/renderer/src/i18n/locales/pt.json # src/renderer/src/i18n/locales/zh-Hant.json # src/renderer/src/i18n/locales/zh.json # src/renderer/src/i18n/supported-languages.ts # src/shared/ui-language.test.ts # src/shared/ui-language.ts # src/shared/ui-locale.ts
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
acddb46f-a731-4d73-b78a-5c2ebcfe5aa7
Files selected for processing: 23-
config/i18n-turkish.mddocs/site/content/docs/settings.mdxsrc/main/i18n/main-i18n.tssrc/renderer/src/components/onboarding/OnboardingLanguageSwitcher.test.tsxsrc/renderer/src/components/settings/appearance-search.tssrc/renderer/src/components/settings/settings-search.test.tssrc/renderer/src/components/settings/settings-search.tssrc/renderer/src/i18n/i18n.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/pt.jsonsrc/renderer/src/i18n/locales/ru.jsonsrc/renderer/src/i18n/locales/tr.jsonsrc/renderer/src/i18n/locales/zh-Hant.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/i18n/supported-languages.tssrc/shared/ui-language.test.tssrc/shared/ui-language.tssrc/shared/ui-locale.test.tssrc/shared/ui-locale.ts
Files skipped from review as they are similar to previous changes: 10-
- docs/site/content/docs/settings.mdx
- src/renderer/src/i18n/locales/es.json
- src/renderer/src/i18n/locales/en.json
- src/renderer/src/i18n/locales/zh.json
- src/renderer/src/i18n/locales/pt.json
- config/i18n-turkish.md
- src/renderer/src/i18n/locales/fr.json
- src/renderer/src/i18n/locales/tr.json
- src/renderer/src/i18n/locales/ja.json
- src/renderer/src/i18n/locales/ko.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
-
| // Turkish İ lowercases to i + U+0307; drop the dot so plain-i queries still match. | ||
| function foldSettingsSearchText(value: string): string { | ||
| return value.toLowerCase().replaceAll('\u0307', '') |
There was a problem hiding this comment.
Fold Turkish dotless ı as well.
The helper removes U+0307 but leaves dotless ı unchanged. Therefore ÇALIŞMA normalizes to çalişma, while Çalışma normalizes to çalışma, so the search misses valid Turkish settings when users type uppercase queries. The Turkish catalog contains settings-search values such as Çalışma Alanı. (raw.githubusercontent.com)
Map ı to i and add a regression test for this case.
Proposed fix
-
function foldSettingsSearchText(value: string): string { - return value.toLowerCase().replaceAll('\u0307', '') + return value.toLowerCase().replaceAll('\u0307', '').replaceAll('\u0131', 'i') }+expect(matchesSettingsSearch('ÇALIŞMA', [{ title: 'Çalışma Alanı' }])).toBe(true)
Drop TabGroupDropOverlay.paneColumnLabel from the ru, tr and zh-Hant catalogs main added (stablyai#29795, stablyai#34717, stablyai#34718). This PR removes the string and its seven other translations, and the catalog check fails on a key that en.json no longer has.
Summary
Adds Turkish (
tr) as a built-in UI language. It is registered the same way as the most recent built-ins, French and Portuguese (pt).Credit: the catalog comes from the community Turkish work.
All three are listed as
Co-authored-byon the commit. Supersedes #31316. I opened a separate branch because #31316 does not allow maintainer edits. It also bundles unrelated changes (native menu role labels, localized shortcut search, Landing and PR-checkbox strings), which can be proposed as separate PRs.Registration points
src/shared/ui-language.ts: addsUI_LANGUAGE_TURKISH, the built-in type and the normalize set.src/shared/ui-locale.ts: addstrtoSUPPORTED_UI_LOCALES, so the system languagetr_TRis detected and offered in the onboarding picker. Also addsresolveUiLocale.src/renderer/src/i18n/supported-languages.ts: adds the Settings choice and the native fallback labelTürkçe.src/renderer/src/i18n/i18n.tsandsrc/main/i18n/main-i18n.ts: lazy-load the catalog in the renderer and in the main process.settings.appearance.language.turkish = "Türkçe"is added to every catalog (en, zh, ko, ja, es, fr, pt, tr).appearance-search.ts: search keywordsTürkçeand the native wordDil.Dilis also added to the coverage allowlist next toIdiomaandLangue.docs/site/content/docs/settings.mdx, the README language links, anddocs/readme/README.tr.mdfrom feat(i18n): add Turkish UI locale and README translation #22200/feat(i18n): refresh Turkish localization and verify Windows UI #31316.config/i18n-turkish.md: a short glossary and style guide covering voice, apostrophe suffixes, the term table and dotted/dotless I.getIntlLocale()already resolvestrthroughIntl, so no mapping change is needed.Catalog reconciliation
The
tr.jsonfrom #31316 was reconciled against the currenten.json:en.jsonno longer has were removed.Coverage is 14,845/16,277. The 1,432 missing keys fall back to English at runtime until the next translation pass.
Compatibility
normalizeUiLanguagemaps an unknowntrtosystem, so a mixed-version client or server degrades to the OS language instead of failing.tr/tr-TRkeeps its own syntheticplugin<hex>resource language andplugin:id, so it does not collide with the built-in. If such a pack declaresdisplayName: "Türkçe", the picker shows two items with the same label. The same is already true for every other built-in.Validation
pnpm verify:localization-catalogspasses, with tr at 14,845/16,277 and no extra keys or placeholder mismatches.verify:localization-extraction,verify:localization-coverageandverify:localization-runtime-catalogpass.pnpm tc:webandpnpm tc:nodepass.pnpm teston i18n (renderer and main),ui-language,ui-locale,AppearancePane,appearance-searchand the onboarding tests: 202/202 pass. The onboarding radio count went from 7 to 8.