feat(i18n): add multi-language support for buddy reactions, achievements, and MCP responses - #108
feat(i18n): add multi-language support for buddy reactions, achievements, and MCP responses#108ndcorder wants to merge 1 commit into
Conversation
0b4fea3 to
711b429
Compare
|
I am currently working on iterating the translation quality |
Rebased onto upstream/main with expanded reaction/achievement set. - server/i18n.ts: zero-dep locale loader with t()/tArray()/tObj() - server/reactions.ts: all 100 reaction reasons migrated to locale - server/achievements.ts: 130 achievement names/descriptions via t() - server/index.ts: MCP response strings migrated, buddy_language tool added - server/state.ts: language field in BuddyConfig (default: en) - locales/en.json: 2249-line English base with all Phase 1 strings - locales/*.json: 17 AI-translated locales (zh, es, ja, de, fr, pt, ko, ru, ro, uk, tr, hi, it, pl, vi, ar, th) - cli/settings.ts: language setting with discovery - skills/buddy/SKILL.md: language command routing - server/i18n.test.ts: 36 structural integrity tests across all locales - scripts/translate.ts: bulk translation tool for adding new locales Signed-off-by: Nicolas Corder <ndcorder@pm.me>
711b429 to
0b26b51
Compare
|
Hey @ndcorder — triaging the queue after the project's rename (claude-buddy → coding-buddy, native Pi / Oh My Pi extensions, npm publishing). Checking in on this one: it's the biggest open PR by far (17 locales, ~42k lines) and it now conflicts with Honest question before anyone invests more effort: are you still actively iterating on this? If yes, it probably makes sense to re-scope — land the string-extraction/i18n architecture first as a smaller PR, then locales incrementally, so the translation surface stops racing 🤖 Created with the help of AI (Claude Fable 5). |
Summary
What changed
New files:
server/i18n.ts— zero-dep locale loader (t(),tArray(),tObj(), auto-discovers locale files)locales/en.json— 2249-line English base with all Phase 1 stringslocales/*.json— 17 translated locales, each structurally validatedserver/i18n.test.ts— 36 tests / 17,113 assertions validating all localesscripts/translate*.ts— translation + audit tooling for adding new languagesMigrated files:
server/reactions.ts— all 100 reaction reasons, 18 species pools, stat overrides, escalation tiers, rarity flair now loaded from localeserver/achievements.ts— 130 achievement names/descriptions rendered viat()server/index.ts— MCP response strings migrated,buddy_languagetool addedserver/state.ts—languagefield added toBuddyConfig(default:"en")CLI/skill updates:
cli/settings.ts—bun run settings language <code>skills/buddy/SKILL.md—/buddy language [code]routingcli/index.ts— help text updatedCONTRIBUTING.md— translation contribution guide.gitignore/package.json—i18n.lockignored,locales/in files arrayHow it works
locales/<code>.json, auto-discovered by scanning the directory_language(display name) and_verified(boolean) metadata fieldssetLocale(code)switches the active locale;t("key")looks up strings with English fallback/buddy language esorbun run settings language jaTranslation quality
_verified: falseon all AI locales — native speaker review sets it totrueHow to test
Adding a new language: copy
locales/en.json, translate values, drop it inlocales/. No code changes needed.