Skip to content

[FEATURE]: Add message translation for Windows desktop app - left-click to translate foreign language messages #25923

@LifetimeVip

Description

@LifetimeVip

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem

When using OpenCode, the AI sometimes outputs content in other languages (Japanese, Korean, Russian, etc.). If a conversation contains foreign text the user cannot understand, they currently have to manually copy and paste it into a translation tool, which disrupts the workflow.

This is especially painful for Windows desktop users who lack browser extension-style translation support.

Proposed Interaction

  1. Left-click and drag to select a portion of text in a message
  2. A floating mini toolbar appears near the selection, with buttons for "Translate", "Copy", etc.
  3. Click the "Translate" button to translate the selected text
  4. Translation result is displayed in a tooltip/popover bubble near the selected text, with a close (x) button
  5. Click outside the bubble or press x to dismiss
  6. Alternative: Right-click context menu also includes a "Translate" option

Settings

Add a new setting:

  • Name: Translate Target Language
  • Default: Auto (follow system language) - automatically detects the Windows system language as the translation target
  • Available options: Chinese, English, Japanese, Korean, French, German, Russian, and other common languages

Notes

  • Code block content should be skipped or labeled as code to avoid meaningless translation
  • Translation results should be cached locally to avoid redundant API calls
  • Support both local models (e.g., Ollama) and cloud APIs (e.g., DeepL, Google Translate) for translation

Use Cases

  1. User asks in Chinese, but the AI response contains Japanese code comments or documentation
  2. Code snippets include non-native variable names or comments
  3. Multi-language team conversations contain mixed languages

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions