Skip to content

i18n: add Turkish (tr) as a bundled locale - #1184

Open
volkankurt2 wants to merge 2 commits into
pascalorg:mainfrom
volkankurt2:i18n/tr-locale
Open

volkankurt2 wants to merge 2 commits into
pascalorg:mainfrom
volkankurt2:i18n/tr-locale

Conversation

@volkankurt2

@volkankurt2 volkankurt2 commented Oct 27, 2026 •

Copy link
Copy Markdown

What does this PR do?

Adds Turkish (tr) as a bundled locale, following the "To bundle another language" steps in i18n/README.md and the community tr pack discussed in #621 and #1148.

  • lingui.config.ts and TARGET_LOCALES in scripts/i18n.ts gain tr.
  • packages/editor/src/i18n/locales.ts registers the tr pack.
  • i18n/glossary.json gains Turkish terms: tavan, kat planı, kat, oda, 3B tarama, duvar, gezinti.
  • packages/editor/src/i18n/locales/tr/messages.po has 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 with i18n:translate; they were checked with the same validateTranslation rules (placeholders, tags, Turkish one/other plurals, glossary). Since only Review: human entries are compiled, the shipped tr pack 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

  1. bun run i18n:check: it passes and reports tr 2611 awaiting review.
  2. bun scripts/i18n.ts check --reviewed tr fails as expected, because nothing is reviewed yet.
  3. bun test packages/editor/src/i18n passes.

Screenshots / screen recording

N/A — no reviewed strings yet, so nothing changes on screen.

Checklist

  • I've tested this locally with bun dev
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch

🤖 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_LOCALES in scripts/i18n.ts, and bundledLocalePacks in packages/editor/src/i18n/locales.ts all include tr. The glossary gains Turkish equivalents for architecture terms (e.g. tavan, kat planı, duvar). i18n unit tests now treat tr like other target locales.

The shipped tr compiled pack stays empty (messages.ts is {}) because only Review: human entries 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.

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 Aymericr added the enhancement New feature or request label Oct 27, 2026 — with Cursor

@Aymericr Aymericr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread scripts/i18n.ts
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 96691fe. Configure here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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
@volkankurt2

Copy link
Copy Markdown
Author

Thanks @Aymericr! Pushed 99bbdf5 for the Bugbot finding (the script tests now list tr in their fixtures). Noted on locales.test.ts: I will add the tr expectations in the first reviewed batch, with screenshots.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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).

Fix All in Cursor

❌ 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.

Comment thread scripts/i18n.ts
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 99bbdf5. Configure here.

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

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants