Add a third UI language
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- internationalization
Research direction
Start with the suggested first pull request: read packages/scene/src/focus.ts and the site language toggles in apps/site/src/playground/main.ts, apps/site/src/landing/main.ts, and apps/site/src/shared/prefs.ts. Remove assumptions that only two locales exist, then check how locale selection behaves across the CLI, viewer, and site. The full change is done when a third locale works in the CLI and viewer, tests cover translated keys, docs/faq.md is updated, and a changeset is added.
Written by the indexing model from the issue text.
Description
Why
kgdiff speaks English and Simplified Chinese: the CLI, the HTML reports, the viewer, the
GitHub Action comment and the website. A third language is a good way to make kgdiff feel at
home for more people, and adding it will also make the code ready for a fourth.
If you are a native speaker of Japanese, Korean, German, French, Spanish, Portuguese or
another language and would like to translate, comment with the language. One language per
pull request.
What has to change
The locale is a closed union today, and a few places assume there are exactly two:
| Where | What |
|---|---|
| core types.ts#L64 | type Locale = 'en' | 'zh-CN' |
| core i18n.ts#L353 | phrasebooks for hunk titles and change descriptions (the largest part: whole sentences with plurals and quoted names) |
| viewer i18n.ts#L386 | viewer UI strings, LOCALES, locale matching |
| cli locale.ts#L10 | CLI messages, LOCALES, matching LANG |
| action/lib.mjs#L25 | the pull request comment |
| scene focus.ts#L59 | a hard-coded zh-CN branch for the "+38 unchanged" pill |
| viewer popovers.ts#L68 | the language menu |
| playground main.ts#L765, landing main.ts#L328, prefs.ts#L32 | the site's language toggle flips between two languages |
Suggested order
- A first pull request with no translation in it: remove the two-language assumptions (the
focus.tsbranch, the site toggles) so that adding a locale means adding tables. This part
is a good first contribution on its own. - Then the translation: CLI and viewer strings first, core phrasebook (hunk titles) next.
The website and the docs can follow later, or never: the tool matters more.
Done when
--locale <xx>in the CLI andlocale="xx"on<kgdiff-viewer>work, with tests next to
the existingi18n.test.tsfiles that check every key is translated.docs/faq.md("Which languages does kgdiff speak?") updated, and a changeset.
- Dominant language
- TypeScript
- Stars
- 47
- Forks
- 6
- Avg merge
- 2h 32m
- Merged PRs (30d)
- 22
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from iiwish/kgdiff
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
accessibility help wanted viewer
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
iiwish/kgdiff#16 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 1/100
iiwish/kgdiff#21 · 1 comment ·
Maintainers usually reply within 1 day
-
cli enhancement good first issue
Difficulty 4/5 3-5 days Newbie friendliness 57/100
Maintainers usually reply within 1 day
-
documentation help wanted
Difficulty 3/5 1-2 days Newbie friendliness 76/100
Maintainers usually reply within 1 day
Similar issues
-
maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
assistant-ui/assistant-ui#10499 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug server-sequentialthinking v2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
modelcontextprotocol/servers#5526 · 1 comment ·
Maintainers usually reply within 1 day
-
app-server bug CLI
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
cimd: default originBoundFields rejects a cross-origin client_uri, which the CIMD draft forbidsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
better-auth/better-auth#12458 · 1 reaction ·
Maintainers usually reply within 1 day