anthropics / anthropics/claude-code

Feature: word-by-word gloss (interlinear translation) under English text, esp. thinking blocks

Ouverte
#87,810 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
area:ui enhancement stale
Langage dominant
Python
Étoiles
145k
Forks
23.1k
Métriques de merge des PR
Métriques de PR en attente

Description

### 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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Domaine
desktop, frontend
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.