Skip to content

Add Turkish interface language - #345

Merged
artcc merged 2 commits into
artcc:developfrom
muhammedkoramaz:feature/turkish-translation
Sep 24, 2026
Merged

artcc merged 2 commits into
artcc:developfrom
muhammedkoramaz:feature/turkish-translation

Conversation

@muhammedkoramaz

Copy link
Copy Markdown
Contributor

Summary

Adds Turkish (tr) as a new interface language and native-language option.

Changes

  • New catalog messages/tr.json: all 1,542 keys translated, with the same key order and structure as en.json. Placeholders, ICU plurals and HTML/rich-text tags are unchanged.
  • Language name languages.tr added to every existing catalog ("Turkish", "Türkisch", "Турецкий", …) so the selectors can label the new option.
  • Frontend: tr added to SUPPORTED_LOCALES, the browser-language auto-detection script in layout.tsx, and the native-language lists in register, Settings and Admin → Users.
  • formatLanguageName: tr added to LOCALES_CAPITALIZE_LANGUAGE. Turkish capitalizes language names, and toLowerCase() would also turn "İ" into a dotted "i̇".
  • Backend:
    • tr added to SUPPORTED_LANGUAGES and SUPPORTED_UI_LOCALES (schemas/auth.py) and to the admin native-language set.
    • Turkish voice session title and month names, native-language name, and lesson answer feedback.
    • Turkish strings for the verification, password reset, welcome, account deletion, contact, feedback and review emails.
  • Tests: existing locale lists extended with tr. New tests cover the Turkish voice session title and the Turkish onboarding goals subtitle.
  • Docs: interface/native locale lists updated in specs/platform.instructions.md and specs/api-endpoints.instructions.md. Added an entry to CHANGELOG.md → Unreleased.

Out of scope: the dashboard announcement. Its translations are stored as exactly ten locales (JSONB validated by DashboardBannerTranslations), and adding tr would make existing stored banners fail validation without a data migration. DashboardAnnouncement already falls back to English, so Turkish users see the English announcement. I'm happy to add tr there in a follow-up if you'd like to handle the migration.

Testing

  • messages/tr.json checked against en.json with a key/placeholder/ICU consistency script: 1,542 keys, no issues
  • Frontend: npm run lint ✅, npx tsc --noEmit ✅, npm run test:run ✅ (60 files, 612 tests)
  • Backend: pytest ✅ (1,418 passed, coverage 85.86%)
  • ruff check and black --check on the changed backend files ✅. prettier --check on the changed frontend files ✅

This change was prepared with AI assistance and reviewed and tested by me.

Add a complete Turkish (tr) message catalog and register tr as a
supported interface locale and native language across the frontend
and backend: locale lists, browser-language detection, registration,
settings and admin selectors, schema validation, voice session titles,
lesson feedback, and transactional email templates.

Turkish capitalizes language names, so tr is added to the
capitalization set in formatLanguageName (lowercasing would also turn
"İ" into a dotted "i̇").

The dashboard announcement keeps its existing ten stored locales;
Turkish users fall back to the English translation.
@artcc

artcc commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Thank you for adding Turkish support and for the thorough work across the UI translations and backend! I’ll take care of merging the PR.

@artcc
artcc merged commit 3ca48ce into artcc:develop Sep 24, 2026
2 checks passed
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.

2 participants