feat: UI localization (i18n) with Simplified Chinese — reviving the approach from #1993

Aperta
#3,849 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

This is a scope question before it is a patch: read the closed PR #1993 and issue #3333 first, and wait for a maintainer to say whether localization is in scope before writing code. If it is, the surface is the ~229 hardcoded English strings across packages/review-editor and packages/ui, plus a new packages/ui/i18n provider and a uiLanguage entry registered through SettingDef/ConfigStore. Done means a language selector in Settings → General, navigator.language detection with English fallback, and no bundle-size or dependency regressions.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

The Plannotator UI is English-only, which is a hard barrier for non-English-speaking users. Before proposing anything
new I searched existing work and found PR #1993 ("feat(ui): add lightweight zero-dependency i18n and Simplified
Chinese localization"). It appears to have implemented exactly this, but was closed without merge on 2026-10-28 with
no review comments or discussion.

The first question is therefore: was #1993 closed because the approach was wrong, because localization is planned
differently, or because localized UI is out of scope?

Why this matters

Plannotator sits directly in the review loop — plan approval, code review, annotation. Users click Approve / Reject /
Comment / Submit Feedback every session. Non-English speakers either misread the decision they are making or guess,
which is risky in a tool that gates plan execution.

There is also open issue #3333 (Simplified Chinese README), so community interest in zh-CN already exists at the
documentation level.

Suggested approach (only if localization is welcome)

Reuse the architecture from #1993 rather than designing from scratch:

  • Zero-dependency I18nProvider + useTranslation under packages/ui/i18n, with plain typed dictionaries — keeps
    the single-file HTML bundle small.
  • uiLanguage: 'auto' | 'en' | 'zh-CN' registered through the existing SettingDef / ConfigStore, inheriting the
    same port-independent cookie scoping and server sync as other preferences.
  • Auto-detect via navigator.language, fall back to English on missing keys.
  • Language selector in Settings → General.

This stays additive: English remains the source of truth, translations are pure data files, and adding a locale later
means adding one dictionary.

What I can contribute

If this direction is acceptable, I am willing to:

  • Rebase/revive the #1993 implementation against current main, or submit a fresh PR in the shape above.
  • Provide a reviewed zh-CN dictionary covering all UI strings (currently ~229 hardcoded English UI strings across
    packages/review-editor and packages/ui).

If localization is out of scope for the project, please say so and close this — I will not push a PR you do not want.

Notes

  • No runtime machine translation; dictionaries are static and reviewed.
  • No new runtime dependencies proposed.

Lingua principale
TypeScript
Stelle
8.7k
Fork
649
Merge medio
16h 1m
PR unite (30g)
756

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di backnotprop/plannotator

Tutte le issue di backnotprop/plannotator

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.