feat: add Turkish localization support#13762
Conversation
WalkthroughTurkish ( ChangesTurkish Language Support
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 8 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (8 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Pull request overview
Adds Turkish (tr) localization support to the Langflow frontend by introducing a new Turkish locale bundle and wiring it into the existing lazy-loaded language selection/i18n flow.
Changes:
- Added a Turkish translation resource file (
tr.json). - Registered
"tr"as a supported language in the i18n loader and UI language selector list. - Extended i18n unit tests to validate that the Turkish bundle can be loaded.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/frontend/src/locales/tr.json |
Adds Turkish translation strings as a new locale bundle. |
src/frontend/src/i18n.ts |
Adds "tr" to the supported language list used by normalization and lazy-loading. |
src/frontend/src/constants/languages.ts |
Adds Turkish to the language selector options (Türkçe). |
src/frontend/src/__tests__/i18n.test.ts |
Adds a test to ensure the Turkish bundle is registered when loaded. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Langflow already supports lazy-loaded locale bundles, so this adds a Turkish resource file and registers it with the existing language selector flow. The locale follows the same flat dot-key format as the existing bundles and the tests now guard key and interpolation placeholder parity with English. Constraint: Locale files must preserve the en.json key map and interpolation placeholders Rejected: Replace existing language loading flow | the current lazy-loading path already supports new locale bundles Confidence: medium Scope-risk: narrow Tested: npm test -- i18n.test.ts --runInBand Tested: npx @biomejs/biome check src/i18n.ts src/constants/languages.ts src/__tests__/i18n.test.ts src/locales/tr.json Tested: tr.json has 2062 keys, zero missing/extra keys, zero placeholder mismatches, and zero non-whitespace control/format characters Not-tested: Full visual review of every translated UI string
9b57be3 to
a7fb772
Compare
Summary
Adds Turkish localization support to the Langflow frontend.
Changes
tr.jsonlocale bundle using the same flat dot-key format as the existing locale filestrin i18n supported languagesVerification
npm test -- i18n.test.ts --runInBandnpx @biomejs/biome check src/i18n.ts src/constants/languages.ts src/__tests__/i18n.test.ts src/locales/tr.jsontr.jsonhas the same 2062 keys and matching interpolation placeholders asen.jsontr.jsonhas zero non-whitespace control/format characters