anthropics / anthropics/claude-code
Feature: word-by-word gloss (interlinear translation) under English text, esp. thinking blocks
- Ngôn ngữ chính
- Python
- Star
- 145k
- Fork
- 23.1k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
### Summary
For non-native English speakers, add an optional **word-by-word gloss (interlinear translation)** rendered underneath English text in the UI — especially thinking blocks — in the user's configured language.
### Motivation
I use Claude Code in Korean (`CLAUDE.md` instructs Korean responses), but **thinking blocks are always emitted in English** and are not language-controllable from the user side. So a large amount of the text I read every day is English I did not ask for.
That turns out to be an opportunity rather than only a problem: those blocks are high-quality, domain-relevant English about *my own code*, which is close to ideal study material. Today I work around it by instructing Claude to hand-write an interlinear gloss at the top of each reply:
```
An event interrupts the rotation to prioritize the alert.
한 사건이 중단시킨다 그 순환을 위해 우선하다 그 경보를
```
> 사건이 발생하면 순환을 멈추고 그 경보를 우선 처리한다.
This works, but it burns model tokens, pushes the actual answer down the screen, depends on the model remembering to do it, and can't be applied to the thinking blocks themselves (they're already streamed by then).
### Proposal
A client-side rendering option, e.g. `/config` → "Gloss English text", with:
- **Target language** — default to the user's locale / `CLAUDE.md` language.
- **Scope** — thinking blocks only (my main need) / all assistant text / off (default).
- **Density** — every word, or only words above a difficulty threshold (skip `the`, `is`, `and`; gloss `interrupts`, `prioritize`, `deprecated`).
- **Interaction** — an unobtrusive form such as hover/tap on a word to reveal its meaning, or a toggle that expands the interlinear line beneath the paragraph, so it doesn't wreck the layout when off.
Skipping code spans, file paths, identifiers, and commands is essential — glossing `npm run build` or a variable name is noise.
### Why in the client rather than in the prompt
- Thinking blocks can be glossed at render time; the model can't retroactively annotate its own already-streamed reasoning.
- No token cost and no latency added to the answer.
- Deterministic — it doesn't depend on the model remembering an instruction across a long session.
- It's a display concern, which is where display concerns belong.
### Scope note
I'd be happy with a minimal first version: thinking blocks only, hover-to-reveal, one target language from a config key. The value is mostly in it being automatic and always-on for people who read English all day but don't think in it.
### Environment
- Claude Code Desktop (Microsoft Store / MSIX) `Claude_1.32352.1.0`, engine 2.1.229
- Windows 11 Pro 26200
- Working language: Korean
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Start by locating the /config handling and the thinking-block renderer in the client UI. Trace how streamed English text reaches rendering, then assess where an optional target-language gloss could be applied while excluding code, paths, identifiers, and commands. Done should cover the proposed minimal thinking-block-only, hover-to-reveal option with one configured language.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Lĩnh vực
- desktop, frontend
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100