Skip to content

feat(tui): add Turkish i18n support to terminal UI - #31887

Closed
ugur-murat-alt wants to merge 1 commit into
anomalyco:devfrom
ugur-murat-alt:feat-tui-turkish-i18n
Closed

ugur-murat-alt wants to merge 1 commit into
anomalyco:devfrom
ugur-murat-alt:feat-tui-turkish-i18n

Conversation

@ugur-murat-alt

Copy link
Copy Markdown
Contributor

Summary

Adds full Turkish (tr) i18n support to the Terminal UI, introducing an i18n infrastructure and translating all hardcoded strings.

New Files

packages/tui/src/i18n/index.ts — i18n infrastructure

  • I18nProvider context using createSimpleContext pattern
  • useI18n() hook returning { t, locale, dict }
  • t(key, params?) with {{param}} template interpolation
  • detectLocale() reads LANG/LC_ALL/LC_MESSAGES env vars

packages/tui/src/i18n/en.ts — English dictionary (178 keys)

  • All dialog titles, button labels, status messages, error messages
  • Command names, help text, prompt placeholders, toast messages

packages/tui/src/i18n/tr.ts — Turkish translations (181 keys)

  • Full coverage of all TUI strings with natural Turkish

Modified Files (27 components)

  • All dialog components (agent, model, provider, MCP, session-list, stash, workspace-create, etc.)
  • Command palette, error component, startup loading
  • Prompt system (index, autocomplete, workspace)
  • UI primitives (dialog, dialog-prompt, dialog-select, toast)
  • Sidebar plugins (context, files)
  • Test file updated for providerOptions signature change

Design Decisions

  • Locale detection via environment variables (appropriate for terminal UIs)
  • English dict uses as const for type-safe key extraction
  • Turkish dict uses satisfies Partial<Record<Keys, string>> for compile-time key checking
  • Branded terms preserved: "Warp", "OpenCode" kept as-is

Verification

  • bun run --cwd packages/tui typecheck passes cleanly
  • provider-options.test.ts updated and passes (5/5)
  • Pre-existing test failures (10 on dev) unchanged; 2 additional failures are i18n context-dependent tests that need mock updates

feat(tui): create i18n infrastructure with locale detection
feat(tui): extract hardcoded strings to i18n dictionary
feat(tui): add Turkish translations for all TUI components
refactor(tui): use i18n context for dialog titles and messages
Copilot AI review requested due to automatic review settings June 11, 2026 12:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added contributor needs:compliance This means the issue will auto-close after 2 hours. labels Jun 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

I found a potentially related PR:

Related PR:

Why it's related: PR #31886 also addresses Turkish (tr) locale translations and i18n support. The current PR (#31887) focuses specifically on TUI (terminal UI) Turkish translations, while #31886 appears to cover Turkish translations across multiple packages. There may be overlap in scope or coordination needed between these two PRs to avoid duplicating translation work or creating conflicting changes.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jun 11, 2026
@github-actions github-actions Bot closed this Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants