feat: add Turkish language support (tr locale)
Summary
Add Turkish language (tr) support to Orca. This PR introduces a full Turkish locale catalog (tr.json) with 12,402 lines covering the entire UI, along with all the necessary infrastructure changes to register, load, and maintain the new locale.
Changes included:
- New locale catalog: \src/renderer/src/i18n/locales/tr.json\ — complete Turkish translation of all UI strings
- Language registration: Added \UI_LANGUAGE_TURKISH = 'tr'\ to \src/shared/ui-language.ts\
- Locale support: Added 'tr'\ to \SUPPORTED_UI_LOCALES\ in \src/shared/ui-locale.ts\
- Renderer i18n: Added lazy tr loader in \src/renderer/src/i18n/i18n.ts\
- Main process i18n: Added lazy tr loader in \src/main/i18n/main-i18n.ts\
- Language picker: Added Turkish to \UI_LANGUAGE_CHOICES\ and fallback labels
- Translation policy: Added Turkish to \LOCALE_KEY_OVERRIDES, \LOCALE_VALUE_OVERRIDES, \LOCALE_PHRASE_FIXES, and \SEARCH_KEYWORD_OVERRIDES\
- Package.json: Added \ootstrap:tr-catalog\ script
CI changes (inherited from #7160):
This branch is stacked on top of \eat/windows-terminal-perf-ci\ (#7160), so the diff includes the terminal-perf workflow split. Those changes belong to #7160 and are not part of this PR's scope. Review the locale changes only.
Verification:
- [x] \pnpm lint\ — 0 errors
- [x] \pnpm typecheck\ — passes
- [x] \pnpm test\ (related tests) — all pass
- [x] All locale catalog verification passes (10076 keys, parity with en.json)
AI Review & Security
See #7247 review comments for details.
Notes
- The tr.json catalog was generated via machine translation with manual review.
- Turkish locale follows the same patterns as existing locales (ko, ja, es, zh).
- Turkish README translation is tracked in #7250.
📝 Walkthrough
Walkthrough
This PR splits the terminal-perf GitHub Actions workflow into separate Linux and Windows jobs with platform-specific artifact names for reports and traces. It also adds Turkish ("tr") as a supported UI language/locale across shared type definitions, main and renderer i18n lazy loaders, renderer language selection UI, and locale build/config scripts, plus a new bootstrap script entry for the Turkish locale catalog.
Changes
| Cohort / Area | Change |
|---|---|
| CI workflow | Split terminal-perf job into terminal-perf-linux and terminal-perf-windows with distinct artifact names for reports/traces |
| Shared types | Added UI_LANGUAGE_TURKISH, extended UiLanguage, SupportedUiLocale, SUPPORTED_UI_LOCALES, resolveUiLocale |
| i18n loaders | Added tr lazy loaders in main and renderer i18n modules |
| Renderer UI | Added Turkish to UI_LANGUAGE_CHOICES and fallback labels |
| Locale scripts | Added Turkish entries/repairs in key overrides, phrase fixes, search keyword overrides, translation policy, value overrides |
| Package scripts | Added bootstrap:tr-catalog script |
Sequence Diagram(s)
Not applicable.
Related PRs: None identified.
Suggested labels: i18n, ci, localization
Suggested reviewers: None specified.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| 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. |
| Title check | ✅ Passed | The title is concise and accurately summarizes the main change: adding Turkish locale support. |
| Description check | ✅ Passed | The description covers the main change, verification, review, security, and notes, with only minor template omissions. |
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.
Comment @coderabbitai help to get the list of available commands.
✅ Addressed CodeRabbit review feedback:
- Added
permissions: contents: readat the workflow level to follow least-privilege principle (zizmor static analysis). - Added
persist-credentials: falseto the Windows checkout step to prevent the GitHub token from lingering in local git config (artipacked risk).
See commit dab4bbb0e.
Additionally, the Turkish README translation was added in PR #7250.