backnotprop / backnotprop/plannotator
Feature request: UI language setting (English default, offering to contribute es-ES)
- Dominant language
- TypeScript
- Stars
- 8.7k
- Forks
- 649
- Avg merge
- 11h 12m
- Merged PRs (30d)
- 109
Description
### What
Add a UI language setting, with English as the default and one additional locale to prove the seam. I would like to contribute Spanish (es-ES) as that second locale, and I am offering to do the work.
### Why
I run Claude Code in Spanish, so the plans plannotator renders are already Spanish. The surrounding chrome (Settings, toolbars, buttons, the annotation summary) is English, which makes the review surface read as two languages stitched together.
Quick labels already solve part of this: they are user-editable and stored per browser, so I translated the ten defaults and their `tip` strings without touching the source. That works well, and it is worth noting because it narrows the scope of this request. What is left is the app chrome, plus `THUMBS_UP_LABEL` in `AnnotationToolbar.tsx`, which is a separate constant and not part of the configurable set.
### Current state
As far as I can tell there is no i18n scaffolding anywhere in `packages/ui`, `packages/editor` or `packages/review-editor`, and no existing issue asking for it. So this is a question about whether you want the seam at all before anyone writes strings into it.
### Proposal, open to being wrong on all of it
- A small `useT()` style hook plus a flat key/value catalogue per locale, no runtime dependency.
- `en` shipped inline as the fallback so a missing key degrades to English rather than to the key name.
- Locale picker in Settings next to the theme controls, persisted through the same cookie-based `storage` util the other settings use, so it survives the random port per hook invocation.
- One PR for the seam and the `en` extraction, a second for `es-ES`, so the mechanical string extraction is reviewable separately from the translation.
### Questions before I start
1. Do you want i18n in the project at all? A "no, single language by design" is a perfectly good answer and I would rather hear it now.
2. If yes, do you have a preference on the catalogue format or a library you would want used?
3. Would you rather see the extraction land package by package, or all at once?
Happy to open the PR once you point me at the shape you want. Not going to touch anything until then.
Contributor guide
Assessment
This issue has not been assessed yet.