Skip to content

feat: Add Turkish (tr) translations#7645

Merged
Dhruwang merged 3 commits intoformbricks:mainfrom
onwp:add-tr-translations
Apr 20, 2026
Merged

feat: Add Turkish (tr) translations#7645
Dhruwang merged 3 commits intoformbricks:mainfrom
onwp:add-tr-translations

Conversation

@onwp
Copy link
Copy Markdown
Contributor

@onwp onwp commented Apr 1, 2026

What does this PR do?

Adds Turkish (tr-TR) language support to Formbricks. Translated 3,186 keys across the web app and survey components.

Files added

  • apps/web/locales/tr-TR.json - Web app Turkish translations
  • packages/surveys/locales/tr.json - Survey component Turkish translations (100%)

Files modified

  • packages/types/user.ts - Added tr-TR to ZUserLocale
  • apps/web/lib/constants.ts - Added tr-TR to AVAILABLE_LOCALES
  • apps/web/lib/time.ts - Added Turkish date-fns locale
  • apps/web/lib/i18n/utils.ts - Added Turkish to appLanguages
  • apps/web/i18n.json - Added tr-TR to targets
  • apps/web/modules/survey/link/lib/utils.ts - Added tr: "tr-TR" mapping
  • apps/web/vitestSetup.ts - Added tr-TR to mock
  • packages/surveys/i18n.json - Added tr to targets
  • packages/surveys/src/lib/i18n.config.ts - Added tr support

How should this be tested?

  • Set language to Turkish in user settings
  • Verify UI strings appear in Turkish across the web app
  • Create a survey and verify survey component strings are in Turkish
  • Check date formatting shows Turkish locale

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read How we Code at Formbricks
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand bits
  • Ran pnpm build (9/10 packages pass; web app requires ENCRYPTION_KEY and REDIS_URL env vars not related to translations)
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues
  • First PR at Formbricks? Please sign the CLA! Without it we wont be able to merge it

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Formbricks Docs if changes were necessary

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 1, 2026

Walkthrough

This pull request adds Turkish locale support (tr-TR) across the application. Changes include: extending the locale targets in i18n configuration files, adding Turkish to the AVAILABLE_LOCALES constant and ZUserLocale type definition, registering Turkish language metadata in the application languages list, adding Turkish locale support for date formatting, and creating a new Turkish locale resource file with localized UI strings and error messages for the surveys package. The Turkish language code is mapped to the tr-TR locale in language-to-locale conversion logic.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding Turkish language support with translations to the codebase.
Description check ✅ Passed The description includes a summary of changes, files added/modified, testing instructions, and a completed checklist matching the required template.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/web/modules/survey/link/lib/utils.ts`:
- Line 82: The locale map in utils.ts is missing an explicit "tr-TR" entry for
consistency; update the locale mapping object (e.g., localeMap or LOCALES
constant used in utils.ts) to include the key/value pair "tr-TR": "tr-TR"
alongside the existing "tr": "tr-TR", ensuring you don’t introduce a duplicate
key and keeping the same formatting/style as other entries like "pt-BR" and
"pt-PT".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1598101e-76f7-41fd-b6b4-75dd6f3f2951

📥 Commits

Reviewing files that changed from the base of the PR and between 4f26278 and abcf9f7.

⛔ Files ignored due to path filters (1)
  • apps/web/locales/tr-TR.json is excluded by !apps/web/locales/**
📒 Files selected for processing (10)
  • apps/web/i18n.json
  • apps/web/lib/constants.ts
  • apps/web/lib/i18n/utils.ts
  • apps/web/lib/time.ts
  • apps/web/modules/survey/link/lib/utils.ts
  • apps/web/vitestSetup.ts
  • packages/surveys/i18n.json
  • packages/surveys/locales/tr.json
  • packages/surveys/src/lib/i18n.config.ts
  • packages/types/user.ts

Comment thread apps/web/modules/survey/link/lib/utils.ts
@mattinannt mattinannt requested a review from jobenjada April 17, 2026 09:03
@jobenjada jobenjada requested review from Dhruwang and removed request for jobenjada April 17, 2026 10:25
@jobenjada
Copy link
Copy Markdown
Member

jobenjada commented Apr 17, 2026

im happy to add it, @Dhruwang wanna get it over the finish line?

- Added new Turkish translations for various UI elements and error messages in the i18n files.
- Updated the language support in the iso639Languages utility to include Turkish (tr-TR).
- Removed outdated or unnecessary keys from the Turkish locale files to streamline translations.
Copy link
Copy Markdown
Member

@Dhruwang Dhruwang left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Looks good.

@Dhruwang Dhruwang enabled auto-merge April 20, 2026 12:03
@Dhruwang Dhruwang added this pull request to the merge queue Apr 20, 2026
@Dhruwang Dhruwang removed this pull request from the merge queue due to a manual request Apr 20, 2026
@Dhruwang Dhruwang added this pull request to the merge queue Apr 20, 2026
Merged via the queue into formbricks:main with commit e489c6a Apr 20, 2026
21 of 24 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.

3 participants