Problem
Current translations only use the selected text.
This can lead to inaccurate translations because the model has no knowledge of surrounding code, comments, imports, or file structure.
For example:
The meaning depends on the current file and programming language context.
Proposed Solution
Include surrounding file content when generating translation requests.
Possible context:
- Current file language
- Nearby lines
- Imports
- Function scope
- Class scope
The selected text remains the primary translation target.
Alternatives
- Translate only the selected text
- Allow users to manually provide context
Additional Context
This is the next step after basic translation.
Goal:
Selected text + current file context → better translation quality.
Problem
Current translations only use the selected text.
This can lead to inaccurate translations because the model has no knowledge of surrounding code, comments, imports, or file structure.
For example:
The meaning depends on the current file and programming language context.
Proposed Solution
Include surrounding file content when generating translation requests.
Possible context:
The selected text remains the primary translation target.
Alternatives
Additional Context
This is the next step after basic translation.
Goal:
Selected text + current file context → better translation quality.