Repository navigation
i18n: add Turkish (tr) as a bundled locale - #1184
volkankurt2 wants to merge 2 commits into
Conversation
Adds `tr` to the Lingui config, the translate/check tooling and the bundled locale packs, with Turkish glossary terms and a full draft catalog of all 2,611 messages. Every entry is a machine draft (`fuzzy`, `Review: required`), so the compiled pack stays empty and Turkish shows as English until a native speaker reviews entries; review follows in later PRs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E3gd4d8ajhkLqYhF3KbFPB
Aymericr
left a comment
There was a problem hiding this comment.
Thanks for this, and welcome! The wiring follows the "To bundle another language" steps: tr is added to lingui.config.ts, TARGET_LOCALES, BundledLocale and bundledLocalePacks, and the glossary terms look right. Since every draft is fuzzy with Review: required, the compiled pack is {} and the UI keeps falling back to English, so nothing changes on screen yet and no screenshots are needed for this one.
One small ask for your first reviewed batch: please add tr to the expectations in packages/editor/src/i18n/locales.test.ts (the viewer.display.title and editor.buildPanel.rooms.title strings) once those two are reviewed, so the pack gets the same coverage as the other languages. Screenshots of the Turkish UI on those follow-ups would help too.
CI hasn't run yet because this is your first contribution from a fork. It'll merge once a maintainer approves the workflow run and checks are green.
| const GLOSSARY_PATH = join(ROOT, 'i18n/glossary.json') | ||
| const LINGUI_BIN = join(ROOT, 'node_modules/.bin/lingui') | ||
| const TARGET_LOCALES = ['zh-CN', 'fr', 'es', 'ja'] as const | ||
| const TARGET_LOCALES = ['zh-CN', 'fr', 'es', 'ja', 'tr'] as const |
There was a problem hiding this comment.
Test fixtures omit Turkish locale
Medium Severity
Adding tr to TARGET_LOCALES leaves the i18n script tests still listing only zh-CN, fr, es, and ja. Fixture extract reads a missing Turkish catalog, and checkTranslationEntries reports tr as missing, so scripts/i18n.test.ts and scripts/i18n-literals.test.ts fail under bun run test.
Reviewed by Cursor Bugbot for commit 96691fe. Configure here.
There was a problem hiding this comment.
Right, fixed in 99bbdf5: tr is now in the fixture locales of scripts/i18n.test.ts and scripts/i18n-literals.test.ts (56 pass locally).
The i18n script tests listed only zh-CN, fr, es and ja, so with tr in TARGET_LOCALES the extract fixture read a missing Turkish catalog and checkTranslationEntries reported tr as missing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E3gd4d8ajhkLqYhF3KbFPB
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 99bbdf5. Configure here.
| const GLOSSARY_PATH = join(ROOT, 'i18n/glossary.json') | ||
| const LINGUI_BIN = join(ROOT, 'node_modules/.bin/lingui') | ||
| const TARGET_LOCALES = ['zh-CN', 'fr', 'es', 'ja'] as const | ||
| const TARGET_LOCALES = ['zh-CN', 'fr', 'es', 'ja', 'tr'] as const |
There was a problem hiding this comment.
New locale breaks release base lookup
High Severity
Adding tr to TARGET_LOCALES makes hasCatalogs require a Turkish PO on the comparison revision. Existing @pascal-app/editor@* tags and the original catalogs commit lack that file, so releaseBase() can no longer use them. On a release from main, origin/main matches HEAD and is skipped, and release-check fails asking for --base.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 99bbdf5. Configure here.
|
Hi @volkankurt2, checking in on this one. |
Aymericr
left a comment
There was a problem hiding this comment.
[Maintainer] Re-reviewed at 99bbdf5 (the earlier approval was on 96691fe, before this push).
The locale wiring is still fine, but I cannot approve this head as a shippable pack:
- No reviewed entries. I counted 2,611 messages; every one is still
fuzzy/Review: required, so the compiledtrpack is empty and the UI will stay in English. The 27 Oct note said the first reviewed batch (viewer, navbar, toolbar, Build panel) plus a?lang=trscreenshot would come in this PR; that batch is not in this head, andtris still missing from the expectations inpackages/editor/src/i18n/locales.test.ts. - The catalog is behind
main. Current source is about 3.96k messages; this pack has 2,611. Please rebase, runbun run i18n:extract, and keep new strings asReview: required. - CI. The only CI run on this SHA (40559883477) never executed jobs and was later marked failed when the fork-approval window expired. A fresh run will be needed after the rebase.
The earlier approval of the wiring still stands as a comment on the approach, but this head needs the reviewed slice, the test expectations, a rebase/extract, and a screenshot before it can merge.
|
Review at
P0/P1: 1. Those need fixing before this can land. CI hasn't run on this fork PR yet because it needs a maintainer to approve the workflow run; it merges once that's green. |
Aymericr
left a comment
There was a problem hiding this comment.
[Maintainer] Re-checked at 99bbdf5 against current main (9c00a41), which now has the #1310 lazy loader and the Italian locale (#1200) as the pattern. Reviewed with Codex (gpt-6.2-astra) in two rounds, re-verifying every claim against the code. This is a comment only, not a merge decision. No new push since my last review, and the branch now conflicts, so CI can't run on it yet.
P1 — Turkish is only in the old eager loader. On main, tr-TR resolves to null (lazy-locales.ts:38) and there is no @pascal-app/editor/locales/tr export. The pack is empty today, which is fine because every entry is fuzzy + Review: required. But it needs wiring now so the first reviewed batch actually loads.
What to change (model: #1200, edb4ba2f):
- Rebase onto
mainand resolve the six conflicts:lingui.config.ts,scripts/i18n.ts,scripts/i18n.test.ts,scripts/i18n-literals.test.ts: keepmain. They now use the shared lists fromscripts/i18n-locales.ts.packages/editor/src/i18n/locales.ts: keepmain's imports and registration loop. Add only thetrmessages import andtr: { locale: 'tr', messages: tr }.i18n/glossary.json: keepmain's Italian terms and notes and add your seven Turkish values.
- Tooling registry: append
'tr'to bothTARGET_LOCALESandPREVIEW_LOCALESinscripts/i18n-locales.ts. The pack is all drafts, so it is a preview likeit. - Lazy loader: in
lazy-locales.ts, add'tr'toBUNDLED_LOCALESandcase 'tr': return (await import('./locales/tr/messages')).messages. - Per-locale entry: add
packages/editor/src/i18n/locales/tr/index.ts(copylocales/it/index.ts), plus"./locales/tr": "./src/i18n/locales/tr/index.ts"inpackages/editor/package.json. - Re-extract: keep your
tr/messages.poand runbun run i18n:extract. Against currentmainit lacks 1,606 IDs and has 38 retired ones. New empty entries come in asReview: missing. Fill them asfuzzy+Review: required; don't mark draftshuman. Then runbun run i18n:compileandbun run i18n:check. - Tests: in
locales.test.ts, addtr-TR → tr, addtrto the sorted pack keys, and mirror the Italian isolated-registration and lazy-load tests. Assert that a draft such asapp.appShell.pascalHomestill renders English ("Pascal home"). - README:
i18n/README.md:200is stale. Please describe the shared target and preview lists, lazy loader, per-locale entry and package export.
From my last review, still outstanding: the first reviewed batch (viewer, navbar, toolbar, Build panel), the viewer.display.title / editor.buildPanel.rooms.title expectations in locales.test.ts, and a ?lang=tr screenshot. The first reviewed batch can follow as a separate PR if that's easier; only the wiring above is needed to land this one.
No P0 found in the non-catalog diff. I'm not pushing to your fork.


What does this PR do?
Adds Turkish (
tr) as a bundled locale, following the "To bundle another language" steps ini18n/README.mdand the communitytrpack discussed in #621 and #1148.lingui.config.tsandTARGET_LOCALESinscripts/i18n.tsgaintr.packages/editor/src/i18n/locales.tsregisters thetrpack.i18n/glossary.jsongains Turkish terms: tavan, kat planı, kat, oda, 3B tarama, duvar, gezinti.packages/editor/src/i18n/locales/tr/messages.pohas a draft for all 2,611 messages.Every entry is an AI draft, marked
fuzzy+Review: required(AI-Provider: claude-code). The drafts were not produced withi18n:translate; they were checked with the samevalidateTranslationrules (placeholders, tags, Turkishone/otherplurals, glossary). Since onlyReview: humanentries are compiled, the shippedtrpack stays empty and the UI shows English until a native speaker reviews entries. I'm a native speaker and will send reviewed batches as follow-ups, starting with the viewer, navbar, toolbar and Build panel copy.How to test
bun run i18n:check: it passes and reportstr 2611awaiting review.bun scripts/i18n.ts check --reviewed trfails as expected, because nothing is reviewed yet.bun test packages/editor/src/i18npasses.Screenshots / screen recording
N/A — no reviewed strings yet, so nothing changes on screen.
Checklist
bun devbun checkto verify)mainbranch🤖 Generated with Claude Code
https://claude.ai/code/session_01E3gd4d8ajhkLqYhF3KbFPB
Note
Low Risk
Infrastructure-only i18n wiring with an empty compiled Turkish pack, so user-visible behavior is unchanged until human-reviewed strings are merged.
Overview
Adds Turkish (
tr) as a bundled locale across Lingui, the i18n toolchain, and editor locale registration, following the existing pattern for zh-CN, fr, es, and ja.lingui.config.ts,TARGET_LOCALESinscripts/i18n.ts, andbundledLocalePacksinpackages/editor/src/i18n/locales.tsall includetr. The glossary gains Turkish equivalents for architecture terms (e.g. tavan, kat planı, duvar). i18n unit tests now treattrlike other target locales.The shipped
trcompiled pack stays empty (messages.tsis{}) because onlyReview: humanentries are compiled; draft PO entries (per the PR description) remain fuzzy and do not change the UI until reviewed batches land.Reviewed by Cursor Bugbot for commit 99bbdf5. Bugbot is set up for automated code reviews on this repo. Configure here.