Skip to content

feat(i18n): add Turkish UI language - #34718

Merged
OrcaWin merged 8 commits into
mainfrom
OrcaWin/i18n-lang-tr
Oct 28, 2026
Merged

OrcaWin merged 8 commits into
mainfrom
OrcaWin/i18n-lang-tr

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​11 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​8
Prod 28 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​20893 $\color{#cf222e}{\Huge{\mathbf{−}}}$​23 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​20870

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-by on 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: adds UI_LANGUAGE_TURKISH, the built-in type and the normalize set.
  • src/shared/ui-locale.ts: adds tr to SUPPORTED_UI_LOCALES, so the system language tr_TR is detected and offered in the onboarding picker. Also adds resolveUiLocale.
  • src/renderer/src/i18n/supported-languages.ts: adds the Settings choice and the native fallback label Türkçe.
  • src/renderer/src/i18n/i18n.ts and src/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 keywords Türkçe and the native word Dil. Dil is also added to the coverage allowlist next to Idioma and Langue.
  • Docs: docs/site/content/docs/settings.mdx, the README language links, and docs/readme/README.tr.md from 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.
  • Dates and numbers: getIntlLocale() already resolves tr through Intl, so no mapping change is needed.

Catalog reconciliation

The tr.json from #31316 was reconciled against the current en.json:

  • 1,944 keys that en.json no longer has were removed.
  • 59 entries whose English source changed since that refresh were dropped, so no stale wording ships.
  • 7 entries whose placeholders did not match were dropped.

Coverage is 14,845/16,277. The 1,432 missing keys fall back to English at runtime until the next translation pass.

Compatibility

  • Older clients and servers: normalizeUiLanguage maps an unknown tr to system, so a mixed-version client or server degrades to the OS language instead of failing.
  • Plugin language packs: a pack for tr/tr-TR keeps its own synthetic plugin<hex> resource language and plugin: id, so it does not collide with the built-in. If such a pack declares displayName: "Türkçe", the picker shows two items with the same label. The same is already true for every other built-in.
  • Mobile: mobile has no UI i18n, so nothing changes there.
  • Casing: this PR adds no locale-sensitive upper/lower-casing. The separate casing-audit PR covers the existing call sites.

Validation

  • pnpm verify:localization-catalogs passes, with tr at 14,845/16,277 and no extra keys or placeholder mismatches.
  • verify:localization-extraction, verify:localization-coverage and verify:localization-runtime-catalog pass.
  • pnpm tc:web and pnpm tc:node pass.
  • pnpm test on i18n (renderer and main), ui-language, ui-locale, AppearancePane, appearance-search and the onboarding tests: 202/202 pass. The onboarding radio count went from 7 to 8.

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>
@OrcaWin
OrcaWin requested a review from brennanb2025 as a code owner October 28, 2026 04:21
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

Turkish is added as a supported UI language, including locale recognition, language selection, search terms, and catalog loading. The change adds Turkish language labels to existing locale catalogs and updates onboarding tests for the additional language option. It also adds a Turkish README, links to it from existing README language selectors, and provides Turkish UI translation guidance.

Priority: Normal

Merge Risk: Low · up to bbbd8

Some Turkish users may be unable to find settings using normal uppercase searches; the localized fix is small.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description gives detailed technical scope, compatibility notes, catalog reconciliation, and validation results. It does not follow several required template sections, including the linked issue, … Add an actual issue link under Linked Issue, provide before-and-after UI screenshots or videos (or state N/A with a reason), and complete the required ELI5, What Changed, Why, Testing, Notes, and Checklist sections. Include the relevant pla…
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: adding Turkish as a built-in UI language.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description gives detailed technical scope, compatibility notes, catalog reconciliation, and validation results. It does not follow several required template sections, including the linked issue, visual proof or an explicit N/A statement, ELI5, Why, and checklist confirmations.

Resolution

Add an actual issue link under Linked Issue, provide before-and-after UI screenshots or videos (or state N/A with a reason), and complete the required ELI5, What Changed, Why, Testing, Notes, and Checklist sections. Include the relevant platform testing details and command results in the template sections.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 11 files. (12 skipped: 12 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

OrcaWin commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator Author

Maintainer edits since the first push:

  • Merged current main (includes the plural-rule resolution from fix(i18n): resolve count strings with each language's plural rules #34693). Turkish only uses one/other, so every _one/_other pair is complete.
  • Catalog complete: translated the 1,432 missing keys, so tr.json now covers 16,277/16,277. tr.json now follows en.json key order, like the other catalogs.
  • Placeholder fixes: six inherited singular forms had hard-coded 1 in place of {{value0}}/{{value1}}. They are restored.
  • Translation review: the whole catalog went through two independent machine-assisted translation review passes (UX writing, and terminology/correctness), then a final regression check. That changed 557 strings, plus 3 more glossary fixes:
    • 32 critical fixes. Examples: "Onboarding" rendered as Katılım (participation); "Open GitHub tasks" read as a task status; "Milestones" translated as Başlarken; "Uncommitted" rendered as unsaved; a swapped {{value0}} of {{value1}}; the translated command name orca emulator; and translated example paths.
    • 525 issues that both passes flagged: glossary consistency (beceri for skill, repository/repo in place of depo, sunucu for host, bölme for pane, belirteç for auth tokens), grammar, and sentence case.
    • The final check rejected 2 of the 559 proposed edits.
  • Validation: verify:localization-catalogs, -extraction, -coverage, -runtime-catalog, tc:web, tc:node and the i18n, ui-language, ui-locale and appearance tests (123/123) all pass.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Commits

Reviewing files that changed from the base of the PR and between b1f1e9a and bbbd873.

Files selected for processing: 23
  • config/i18n-turkish.md
  • 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/components/settings/settings-search.test.ts
  • src/renderer/src/components/settings/settings-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/ru.json
  • src/renderer/src/i18n/locales/tr.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.test.ts
  • src/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.

Comment on lines +63 to +65
// 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', '')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

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)

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