Skip to content

fix(i18n): localize sidebar copy and correct Japanese mistranslations - #28921

Merged
nwparker merged 1 commit into
stablyai:mainfrom
kojikojikojikoji:fix/localize-sidebar-strings
Oct 27, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
kojikojikojikoji:fix/localize-sidebar-strings

Conversation

@kojikojikojikoji

@kojikojikojikoji kojikojikojikoji commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Some text in the left sidebar was typed in English straight into the code, so it stayed English even when you picked another UI language. This sends that text through the normal translation step, adds the Japanese strings, and fixes a batch of existing Japanese strings that had picked the wrong meaning of the English word (for example "Sleeping" had become "asleep in bed").

What Changed

Before: with the UI set to Japanese, the sidebar still showed English such as "Hiding 4 discovered worktrees", "Keep 4 discovered worktrees hidden…" (aria label), "Delete Workspace", "Mark as read", "Loading issue...", the cache timer, remote file browser, setup-script prompt, and add-project busy labels.

After: those strings come from i18n keys. English copy is the same except the batch delete button, which now says "Delete 1 Workspace" for a single item instead of "Delete 1 Workspaces".

Mechanism:

  • Hardcoded strings in ~20 sidebar files now go through translate() with keys in en.json / en-runtime-required.json and Japanese in ja.json. Other locales fall back to English until the next catalog translation run.
  • Counted strings use _one / _other keys picked with count === 1, matching existing sidebar patterns. Sentences are translated whole. The old {{value0}} hidden worktrees for {{value1}} aria label, which put English "Expand"/"Collapse" into value0, becomes two keys, and the old key is removed from all locales.
  • Batch "Delete/Sleep N Workspaces" labels used by both the context menu and repo header menus now come from one module, workspace-batch-action-labels.ts. The duplicated add-project busy labels move into add-repo-busy-labels.ts.
  • imported-worktrees-card-actions.ts error constants become functions, so the message is resolved in the current language when the error is set.
  • Card titles are now derived only from fetched issue/Linear titles, not from the display fallback. The display fallback holds the localized "Loading issue..." / "unavailable" placeholder, and that text should never become a workspace card title.
  • ja.json: 25 literal-sense mistranslations fixed, values only, using terms the catalog already uses. Examples: "Hosted on {{device}}" was "an event is held at {{device}}", "Sleep with Descendants" was "go to bed with your descendants", "Grace" was the name "Grace", "within this window" (time window) was translated as a UI window. The full before/after table is in fix(i18n): localize sidebar copy and correct Japanese mistranslations #28921.

Out of scope: delete-worktree-dialog-copy.ts and worktree-card-agent-summary.ts still build sentences from pieces and need a separate restructuring. NON_GIT_REPO_ERROR is matched against main-process error text, so it is not display copy.

Why

The sidebar is the most-viewed surface in Orca, so mixed English and Japanese there stands out. Wrapping each string in place follows the pattern the rest of the sidebar already uses, so no new mechanism is needed. Moving the shared label builders into single modules keeps the two menus from drifting apart.

Linked Issue

Fixes #28920

Visual Proof

UI language: Japanese. The project has hidden discovered worktrees. The aria labels are printed under the sidebar.

Before (main) After (this PR)
before after

Testing

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • Rendered the hidden-worktrees sidebar line with UI language set to Japanese on main and on this branch (headless, macOS). The screenshots above show the result.

  • pnpm test src/renderer/src/components/sidebar/imported-worktrees-card-actions.test.ts src/renderer/src/i18n: 14 files, 117 tests pass. That run includes the runtime-required catalog and localized-catalog checks. The card-actions test is updated for the new error getters.

  • CI static gates on the touched files are clean: anti-slop oxlint, code-quality native plugins, ast-grep, check-changed-code-quality.mjs, and oxfmt --check.

  • Tested on macOS. The change touches renderer copy only, with no platform, path, IPC, or remote-protocol changes, so Linux, Windows, SSH, and mixed-version remotes are unaffected.

Original fix by @kojikojikojikoji in #28921. Follow-up maintainer commits are squashed in: shared batch-action labels, card titles kept free of placeholders, and an unreachable key removed.

Notes

Copy-only change plus small label-module consolidation. No new IPC, no state changes, nothing in hot paths. Desktop renderer sidebar only; no mobile surface is touched.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8506c1fe-caae-44c4-9a6a-d47c92716264
Commits

Reviewing files that changed from the base of the PR and between 8bd24aa and 9213403.

Files selected for processing: 23
  • src/renderer/src/components/sidebar/CacheTimer.tsx
  • src/renderer/src/components/sidebar/DeleteWorktreeDialogFooter.tsx
  • src/renderer/src/components/sidebar/ImportedWorktreesVisibilityLine.tsx
  • src/renderer/src/components/sidebar/RemoteFileBrowser.tsx
  • src/renderer/src/components/sidebar/RemoteFileBrowserEntryList.tsx
  • src/renderer/src/components/sidebar/WorkspaceKanbanStatusLane.tsx
  • src/renderer/src/components/sidebar/WorktreeCardAgents.tsx
  • src/renderer/src/components/sidebar/WorktreeCardPorts.tsx
  • src/renderer/src/components/sidebar/WorktreeCardStatusSlot.tsx
  • src/renderer/src/components/sidebar/use-worktree-card-linked-details.ts
  • src/renderer/src/components/sidebar/use-worktree-card-workspace-actions.ts
  • src/renderer/src/components/sidebar/use-worktree-context-menu-model.tsx
  • src/renderer/src/components/sidebar/useAddRepoLocalFolderFlow.ts
  • src/renderer/src/components/sidebar/workspace-batch-action-labels.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/use-external-worktree-cards.ts
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/zh.json
Files skipped from review as they are similar to previous changes: 17
  • src/renderer/src/components/sidebar/use-worktree-card-workspace-actions.ts
  • src/renderer/src/components/sidebar/WorkspaceKanbanStatusLane.tsx
  • src/renderer/src/components/sidebar/WorktreeCardPorts.tsx
  • src/renderer/src/components/sidebar/RemoteFileBrowser.tsx
  • src/renderer/src/components/sidebar/WorktreeCardStatusSlot.tsx
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/components/sidebar/ImportedWorktreesVisibilityLine.tsx
  • src/renderer/src/components/sidebar/DeleteWorktreeDialogFooter.tsx
  • src/renderer/src/components/sidebar/useAddRepoLocalFolderFlow.ts
  • src/renderer/src/components/sidebar/WorktreeCardAgents.tsx
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/components/sidebar/RemoteFileBrowserEntryList.tsx
  • src/renderer/src/components/sidebar/CacheTimer.tsx
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/en.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

Walkthrough

Sidebar messages and accessibility labels now use translation lookups, including imported-worktree controls, workspace actions, status text, file browsing, and project-add flows. Shared helpers provide busy labels and count-based workspace action labels. The English locale and several other locales were updated; Japanese copy was also revised in additional settings and interface areas. Linked issue titles now use fetched titles rather than fallback display text.

Priority: Normal

Severity of issue fixed: Low

Merge Risk: Minimal · up to 92134

No actionable merge-blocking issue was established in the localization changes; merge is reasonable with normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the two primary changes: sidebar localization and Japanese mistranslation fixes.
Description check Passed The description is complete and relevant. It covers the user impact, implementation, rationale, linked issue, visual proof, testing, scope, and compatibility considerations. The repository checklist a…
Linked Issues check Passed Issue #28920 requires localization of the listed sidebar copy and correction of the identified Japanese mistranslations. The supplied PR evidence shows that the sidebar strings now use translate(), …
Out of Scope Changes check Passed The changes stay within issue #28920. The shared batch-label module, shared add-project busy-label module, dynamic translated error getters, placeholder-title correction, locale key migration, Japanes…
Docstring Coverage Passed Docstring coverage is inconclusive: files from earlier reviews still need to be rechecked within the check's analysis limits. Not blocking.
Full details: Description check

Explanation

The description is complete and relevant. It covers the user impact, implementation, rationale, linked issue, visual proof, testing, scope, and compatibility considerations. The repository checklist and review sections are not included, but the required substantive information is present.

Full details: Linked Issues check

Explanation

Issue #28920 requires localization of the listed sidebar copy and correction of the identified Japanese mistranslations. The supplied PR evidence shows that the sidebar strings now use translate(), including hidden-worktree text and aria labels, errors, delete and sleep actions, status labels, project actions, busy labels, tooltips, and short messages. The evidence also shows 25 Japanese catalog value corrections. Counted labels use singular and plural keys. The PR reports passing focused catalog and component tests.

Full details: Out of Scope Changes check

Explanation

The changes stay within issue #28920. The shared batch-label module, shared add-project busy-label module, dynamic translated error getters, placeholder-title correction, locale key migration, Japanese value corrections, and tests support the localization objective. The PR identifies NON_GIT_REPO_ERROR, delete-worktree-dialog-copy.ts, and worktree-card-agent-summary.ts as excluded follow-up work. No unrelated change is demonstrated.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kojikojikojikoji kojikojikojikoji changed the title fix(i18n): localize hardcoded sidebar copy fix(i18n): localize sidebar copy and correct Japanese mistranslations Oct 15, 2026
Route hardcoded sidebar strings (cache timer, delete-worktree dialog,
imported-worktrees line, remote file browser, setup-script prompt, card
agents/ports/status, add-repo busy labels, batch action menus) through
i18n keys, and fix literal-sense Japanese translations in ja.json.

Co-authored-by: Neil <[email protected]>
@nwparker
nwparker force-pushed the fix/localize-sidebar-strings branch from 8bd24aa to 9213403 Compare October 27, 2026 11:39
@nwparker
nwparker merged commit 70d8159 into stablyai:main Oct 27, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some sidebar text stays in English when the UI language is Japanese

2 participants