Skip to content

fix(desktop): localize Bot Mode editor, scheduling, and intro copy - #120684

Merged
OutThisLife merged 3 commits into
mainfrom
bb/i18n-bots-copy
Sep 23, 2026
Merged

OutThisLife merged 3 commits into
mainfrom
bb/i18n-bots-copy

Conversation

@OutThisLife

Copy link
Copy Markdown

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

  • Extend the existing Bot Mode locale bundles for New/Edit/avatar, advanced model/capability/MCP setup, skills hub, and scheduling copy in English fallback plus zh, zh-Hant, and ja.
  • Translate stock intro bodies by existing personality and rotation position without changing the English JSONL authority; custom personality names remain verbatim.
  • Translate schedule labels, statuses, notifications, and locale-aware clock display without changing cron expressions, repeat counts, task instructions, IDs, profile routing, or unknown backend values.
  • Add behavior coverage for live locale changes, stock-body catalog/rotation coverage, and preservation of user/backend data.

Verification

  • npm run typecheck: passed (branch receipt).
  • Changed-file Prettier/ESLint: passed (branch receipt).
  • npm run lint: passed; 204 existing warnings outside this change (branch receipt).
  • Bots/intro focused suite: 89 files / 716 tests passed (independently rerun at exact branch head).
  • npm run test:ui -- --maxWorkers=6: 968 files / 8,114 tests passed (branch receipt).
  • git diff --check: passed.
  • Isolated Chromium fixture: 12 locale/surface cases; zero page errors and zero horizontal overflow (branch receipt; not native E2E).
  • Electron platform suite: not green — two unchanged SSH update/lifecycle tests fail. Exact serial retry gives 2 failed, 117 passed (119) on both the branch and the exact base control.
    • POSIX managed launcher status: '127' vs expected '0'.
    • Installer-wrapper dashboard ownership: false vs expected true.

Reconciliation / publication note

Current origin/main is e013ba91d8c1115935654330d1f054a4dc0e8cb9, newer than the branch. A detached-worktree merge simulation found two content conflicts requiring manual resolution in apps/desktop/src/i18n/ja.ts and apps/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

  • Auth/profile/RPC, credential sharing, routing, registration, and backend behavior are unchanged by this renderer-only diff.
  • Unsupported locales retain existing English fallback.
  • Native/packaged E2E, backend pytest, live gateway/MCP/OAuth, and native Windows/Linux validation were not run.
  • Translations were not certified by native speakers.
  • The isolated intro screenshot did not verify wordmark appearance.

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.

Preserve the existing draft, routing, credential-sharing and avatar behavior. Extend the landed Bot Mode catalogs from #96726/#96878 and #113430; addresses the dialog report in #88798 by NealZhouPanda. Broader #90810 and #101305 remain independent.
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.
@OutThisLife
OutThisLife enabled auto-merge (rebase) September 23, 2026 21:56
@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

૮ >ﻌ< ა ci review

ran on 2d0b8cf — fix(desktop): translate stock intro bodies through locale ca

debug info

CI timings

CI timings · View report · View job

Wall time 4m27s vs 5m20s (-16.6%). 3 job(s) slower, 2 faster, 1 unchanged.

  • Check no case-colliding filenames / check-case-collisions: -13.0s
  • Profile artifact check / Reject profile archives: -6.0s
  • Detect affected areas: +2.0s
  • All required checks pass: +2.0s
  • Check no committed infographics / check-no-committed-infographics: +1.0s

@OutThisLife
OutThisLife merged commit 92d13e8 into main Sep 23, 2026
28 checks passed
@OutThisLife
OutThisLife deleted the bb/i18n-bots-copy branch September 23, 2026 22:01

@arkheioncorp arkheioncorp left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.tsx changes replace hardcoded English strings with b.tools.* lookups consistently — no remaining hardcoded English in the MCP setup flow.
  • The model picker correctly handles the placeholderModel prop: when undefined, falls back to b.editor.gatewayDefault; when provided, uses it or b.editor.modelNameExample as 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.tsx has b.editor.editSoul used 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 Oops fallback in profile-config.tsx (fullConfigHint) is correct: when the gateway is too old, the entire advanced config panel shows a single message rather than partial UI.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) area/i18n Localization, locales, translations labels Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/i18n Localization, locales, translations comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants