Skip to content

feat(i18n): add Turkish (tr) locale - #785

Open
sefakerem wants to merge 3 commits into
HarnessMD:mainfrom
sefakerem:feat/i18n-turkish
Open

sefakerem wants to merge 3 commits into
HarnessMD:mainfrom
sefakerem:feat/i18n-turkish

Conversation

@sefakerem

@sefakerem sefakerem commented Oct 24, 2026 •

Copy link
Copy Markdown

What & why

Adds Turkish (tr) as a fourth UI language, next to English, Simplified Chinese and Arabic, so Turkish speakers can use the app in their own language.

  • src/renderer/src/i18n/locales/tr.json: all 1170 keys, same key tree as en.json.
  • src/renderer/src/i18n/index.ts: registers tr (import, LANGUAGES entry "Türkçe", left-to-right, resources, supportedLngs).
  • test/turkish-ui.test.cjs: the same structural checks the Arabic locale has: registration, identical key tree, no English left behind (with an allowlist for product names, paths, pure format strings and words that are the same in Turkish, such as "terminal" and "Model"), every {{variable}} kept, inline tags and arrays kept.
  • Pixel heading font (press-start-2p-latin-400.woff2): the latin subset had no İ Ğ ğ Ş ş, so Turkish headings fell back per glyph to a CJK system face ("DİL" read "D:L", "Bağlantılar" read "Ba;lantılar"). Re-cut the subset from the upstream OFL Press Start 2P file with those five code points added (4.4 KB, smaller than before; same OFL license, attribution updated in LICENSE.txt). A new test in test/bundled-fonts.test.cjs reads the woff2 cmap and checks every Turkish letter; it fails on the old file. Inter and JetBrains Mono still fall back to the system sans/mono for these five letters, which looks the same at body sizes.
  • Office floor speech bubbles: the demo loop (store/mockEvents.ts) wrote English literals ("heading back to desk", "running tests", "fetching docs", "updating the todo board", …) into the demo agents' action and assistant text. They now come from a new demoFloor key tree, translated in en, zh-CN, ar and tr. Bubbles of real agents are built from their live tool calls and are not changed here.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Docs
  • Build / CI

Evidence

Both sides are the built renderer (out/renderer) in Chrome at 1440×900, same mock roster, same light theme. Before = main at 4d30bc4 with English; After = this branch with Turkish picked. In the Settings shots the language <select> is shown expanded as a list so every option is visible.

Before

Office floor on main (English):

Before: office floor in English on main

Settings → General → Language on main: English, 简体中文, العربية. No Turkish.

Before: language picker without Turkish

After

Office floor on this branch with Turkish selected:

After: office floor in Turkish

Settings → General → Language on this branch: "Türkçe" is selected, the Settings UI is in Turkish, and the pixel headings now render "DİL", "BİLDİRİMLER" and "Bağlantılar" correctly. The floor bubbles in the shot above are Turkish too ("panoya gidiyor", "PixelPanel.tsx düzenleniyor").

After: language picker with Türkçe selected

How I tested it

  • OS: macOS (Darwin 25.3)
  • Steps:
    • node --test test/turkish-ui.test.cjs test/arabic-ui.test.cjs test/i18n-god-name.test.cjs test/hooks-notification.test.cjs: 36/36 pass. test/bundled-fonts.test.cjs: 10/10 pass.
    • tsc --noEmit -p tsconfig.web.json: no errors.
    • Checked the ar and zh-CN floor and Settings once in the built renderer: bubbles translated, nothing else changed.
    • npm run test:focused: no new failures. The same 106 files fail with and without this change on my machine, because local node_modules is missing typescript.
    • tsc --noEmit -p tsconfig.web.json (temporary TypeScript install): no errors in i18n code. The only error is the missing vite/client types, for the same reason as above.
    • 30 random keys checked by hand for meaning and placeholders.

The tests check coverage and shape, not translation quality. A native-speaker read in the app is welcome.

Checklist

  • Before and after evidence is attached above, under both headings.
  • npm run typecheck passes. (not run in full locally, see above)
  • npm run test:focused passes. (no new failures, see above)
  • npm run build succeeds.
  • This PR is one change. Unrelated fixes belong in their own PR.
  • I read the diff myself before opening this, and there is no debug output, commented-out code, or unrelated formatting churn in it.
  • Any new UI derives from DESIGN.md / tokens.ts — no ad-hoc colors, spacing, or fonts.
  • If I added art, it's my own or compatibly licensed, and listed in ATTRIBUTION.md. (no art added)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

✅ Evidence received. Before and after are both attached. Thanks — this is what makes a PR reviewable in one pass.

sefakerem and others added 2 commits October 24, 2026 20:03
The tr locale's pixel headings fell back glyph by glyph to a CJK system
face: 'DİL' read 'D:L', 'Bağlantılar' read 'Ba;lantılar'. Re-cut the
latin subset from the upstream OFL file with those five code points
added (4.4KB, smaller than before). A test reads the woff2 cmap and
checks every Turkish letter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mock event loop (mockEvents.ts) wrote English literals into each
demo agent's action and assistant text, so the floor's thought clouds
('heading back to desk', 'running tests', ...) stayed English in every
locale. They now come from a demoFloor key tree in en, zh-CN, ar and tr.
Real agents' bubbles are still built from live tool calls and are not
touched here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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