fix(desktop): localize Bot Mode editor, scheduling, and intro copy - #120684
Conversation
Extend the existing Bot Mode catalogs, preserving schedule syntax, profile routes, capability IDs and user content. Cover locale switches through the real scheduling and editor components. Builds on the landed infrastructure by OutThisLife (#96726/#96878) and teknium1/Vadim Comanescu (#113430); report by NealZhouPanda (#88798). No wholesale supersede of #90810 or #101305.
Keep the stock selector and English JSONL authoritative. Add zh, zh-hant and ja display copy at each personality rotation position; preserve custom personality names. Reuse core skills-hub translations for advanced settings. Reported by NealZhouPanda in #88798; related broader work #90810 by Oliver Hees and #101305 by Euterer remains independent and is not superseded.
૮ >ﻌ< ა ci reviewran on 2d0b8cf — fix(desktop): translate stock intro bodies through locale ca debug infoCI timingsCI timings · View report · View jobWall time 4m27s vs 5m20s (-16.6%). 3 job(s) slower, 2 faster, 1 unchanged.
|
arkheioncorp
left a comment
There was a problem hiding this comment.
Review: fix(desktop): localize Bot Mode editor, scheduling, and intro copy
Verdict: APPROVE
Findings
What this PR does well:
- Comprehensive i18n coverage: intro copy, bot editor (advanced profile config, model picker, MCP setup, skills hub), cron/scheduling dialogs, and inspector chrome — all wired through
useBots()/botsText()locale helpers. - Each translated surface has dedicated test files (
intro.test.tsx,bots-advanced.test.tsx,bots-cron.test.tsx,bots-editor.test.tsx,model-picker.test.tsx,profile-config-capabilities.test.tsx,skills-hub-picker.test.tsx) that verify: (a) the UI renders the localized string, (b) user-supplied data (profile names, model IDs, instructions, schedule values) is NOT translated, and (c) switching locales mid-test updates the visible copy without losing staged data. - The
mcp-setup.tsxchanges replace hardcoded English strings withb.tools.*lookups consistently — no remaining hardcoded English in the MCP setup flow. - The model picker correctly handles the
placeholderModelprop: whenundefined, falls back tob.editor.gatewayDefault; when provided, uses it orb.editor.modelNameExampleas fallback.
Security: No secrets, no eval/exec, no shell injection. All user data paths (profile names, model IDs, custom prompts, schedule strings) are rendered via getByDisplayValue/getByText assertions confirming they are preserve-as-is.
Logic: The Intro component computes bodies from t.intro.stock[key] with a fallback chain (stock[key] → stock.none for neutral personalities → custom(personality)). The body selection uses Math.abs(rotationSeed) % bodies.length — correct for negative seeds. The ?? copy.body fallback preserves the English default when no translation exists for a personality, which is the right behavior for untranslated custom personalities.
Minor notes (non-blocking):
profile-config.tsxhasb.editor.editSoulused twice as a labeled text — once for the SOUL.md textarea header and once as a standalone label. This is fine since the label text is the same, but worth confirming it is intentional (not a copy-paste artifact).- The
Oopsfallback inprofile-config.tsx(fullConfigHint) is correct: when the gateway is too old, the entire advanced config panel shows a single message rather than partial UI.
What does this PR do?
Localize the remaining Hermes Bot Mode creation/editor, scheduling, advanced settings, and new-chat intro copy through the existing desktop locale catalogs. Locale changes repaint authored UI while preserving user text, identifiers, serialized schedules, routing, and existing auth/profile behavior.
Related Issue
Addresses #88798. Builds on landed #96726/#96878 infrastructure and #113430 roster/menu work. Broader #90810 and #101305 contain independent work and are not superseded.
Changes Made
Verification
npm run typecheck: passed (branch receipt).npm run lint: passed; 204 existing warnings outside this change (branch receipt).npm run test:ui -- --maxWorkers=6: 968 files / 8,114 tests passed (branch receipt).git diff --check: passed.'127'vs expected'0'.falsevs expectedtrue.Reconciliation / publication note
Current
origin/mainise013ba91d8c1115935654330d1f054a4dc0e8cb9, newer than the branch. A detached-worktree merge simulation found two content conflicts requiring manual resolution inapps/desktop/src/i18n/ja.tsandapps/desktop/src/i18n/zh-hant.ts; retain both current-main locale updates and this branch's intro/Bot additions, then rerun the focused checks.Acceptance and limitations
No forge writes, push, issue closure, or screenshot upload were performed by this review.
Credits: report and Edit Profile acceptance by @NealZhouPanda; confirmations by @hqaya316 and @linfon. Existing infrastructure by @OutThisLife; landed roster/menu work by @teknium1 and Vadim Comanescu (@vadimcomanescu). Related translation work by Oliver Hees, @Finn763, and @Euterer remains credited in the source manifest without claiming incorporation or supersession.