Skip to content

fix(i18n): localize titles, bodies, and action labels for every contextual tour step - #12713

Merged
nwparker merged 1 commit into
stablyai:mainfrom
5Hyeons:fix/localize-remaining-contextual-tours
Oct 27, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
5Hyeons:fix/localize-remaining-contextual-tours

Conversation

@5Hyeons

@5Hyeons 5Hyeons commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

When Orca's language is set to something other than English, the little "tour" pop-ups that explain features were still mostly in English, even though their Back / Next / Done buttons were translated. Now every tour pop-up — title, explanation, and buttons — shows up in the chosen language.

What Changed

Before: Only the Automations and client-hosted-browser tour steps had localized copy. Every other contextual tour (workspace board, agent sessions, browser, tasks, floating workspace, workspace creation) rendered English titles and bodies, and action labels like "Split terminal", "Got it" and "Browser settings" were always English.

After: Every tour step's title, body, and primary/secondary action labels are localized in en, ko, es, ja, zh, fr and pt.

Mechanism:

  • Every step in src/shared/contextual-tours.ts now has a required, stable id, and a ContextualTourStepId type is derived from CONTEXTUAL_TOURS.
  • The id-keyed copy lookup moves out of contextual-tour-overlay-measurement.ts into contextual-tour-step-copy.ts. The map uses satisfies Record<ContextualTourStepId, ...>, so adding a step without localized copy (or leaving a stray key) is a type error.
  • Primary and secondary action labels resolve through the same entry.
  • Existing automations and client-hosted-browser keys are unchanged, so shipped translations keep resolving.
  • New strings are declared in en.json and translated for ko, es, ja, zh, fr and pt. Shortcut markers such as {terminal.splitRight} stay verbatim, so the platform-correct shortcut (⌘ on macOS, Ctrl on Linux/Windows) is still substituted.

Why

The overlay only translated steps that had both an id and an entry in a whitelist map. Most steps had no id, so they fell back to the raw English. Keying every step by id and making coverage a compile-time check fixes all of the tours at once and stops the next new step from shipping untranslated. A runtime test that requires a translation for every step in every locale was considered and dropped: under the catalog policy, feature PRs own the English declarations and missing target translations fall back through i18next, so that test would break future feature PRs.

Linked Issue

None. Original fix by @5Hyeons in #12713.

Visual Proof

Contextual tour overlay surface, UI language Korean (component fixture screenshots, dark theme).

Step Before After
Split terminal (agent sessions) before split terminal after split terminal
Floating workspace before floating workspace after floating workspace
Client-hosted browser before client-hosted browser after client-hosted browser

Testing

  • Reproduced on main by walking CONTEXTUAL_TOURS in ko, mounting each target and calling measureContextualTourOverlayRenderState: 32 untranslated titles, bodies or action labels. All of them are localized on this branch.

  • Added a regression test in contextual-tour-overlay-measurement.test.ts that covers the title, the shortcut-substituted body, and the action label of a non-automation step in ko. It fails on main and passes here.

  • pnpm test src/renderer/src/components/contextual-tours/ src/shared/contextual-tours.test.ts: 11 files, 71 tests pass.

  • verify:localization-catalog, -catalogs, -runtime-catalog, -extraction and -coverage all pass.

  • oxlint, oxfmt --check, the anti-slop and code-quality oxlint configs, ast-grep and the changed-code quality gate are clean on the touched files.

  • Tested on macOS. The change only adds renderer copy and an id lookup, with no platform, path or IPC code. The shortcut chips are still substituted per platform.

  • I manually tested these changes locally

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

Review

Only the Korean is native-reviewed (by @5Hyeons). The es/ja/zh strings are the contributor's, and fr/pt were added during landing. All of them follow the existing catalog conventions and the repairTranslatedValue policy, but would still benefit from native review.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Security: no change. The new strings are static, and translate() is only called with constant keys.
  • Cross-platform: the shortcut markers are kept verbatim in every locale.
  • Remote SSH / folder workspaces: this is renderer-only presentation and works the same on remote hosts and in non-git folder workspaces.
  • Mobile: no mobile tour surface is affected.
  • Backwards compatibility: existing translation keys are unchanged.
  • Performance: one constant map lookup per step.

Original fix by @5Hyeons in #12713. Authorship is preserved on the commit.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@5Hyeons
5Hyeons requested a review from brennanb2025 as a code owner August 5, 2026 11:42
@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: 967964c4-c3c1-47cd-9343-2e8bd6c31c45
Commits

Reviewing files that changed from the base of the PR and between 3f406b5 and a72ae15.

Files selected for processing: 11
  • src/renderer/src/components/contextual-tours/contextual-tour-overlay-measurement.test.ts
  • src/renderer/src/components/contextual-tours/contextual-tour-overlay-measurement.ts
  • src/renderer/src/components/contextual-tours/contextual-tour-step-copy.ts
  • 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
  • src/shared/contextual-tours.ts
Files skipped from review as they are similar to previous changes: 5
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/es.json

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

Walkthrough

Contextual tour steps now have required stable IDs. A shared lookup provides translated titles and body text for 17 steps, plus action labels for supported steps. The overlay uses the localized copy when available and retains the step’s existing title and body as fallbacks. Locale resources add tour copy in English, Spanish, French, Japanese, Korean, Portuguese, and Simplified Chinese. Tests cover Korean rendering and an inserted step with an explicit ID.

Priority: Normal

Merge Risk: Minimal · up to a72ae

The localized tour changes appear ready to merge after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title uses conventional-commit form and names the main change: localizing titles, bodies, and action labels for every contextual tour step. It matches the changeset, which adds IDs to all steps, m…
Description check Passed The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, AI Disclosure, Review, the agent skill boundary, Notes, and Checklist. It exp…
Full details: Title check

Explanation

The title uses conventional-commit form and names the main change: localizing titles, bodies, and action labels for every contextual tour step. It matches the changeset, which adds IDs to all steps, moves copy lookup into a new module, and adds localized strings across seven locales. It is specific and concise, so it passes.

Full details: Description check

Explanation

The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, AI Disclosure, Review, the agent skill boundary, Notes, and Checklist. It explains the before and after behavior and the mechanism, and it gives the reasoning for the approach. Visual proof is present for the UI change. Gaps: the Linked Issue section says 'None' and cites an upstream PR (#12713) instead of a linked issue, which the template says outside contributors must provide. The AI Disclosure section is empty. The final lint/typecheck/test/build checklist item is unchecked. The Testing section also says the author ran the tests, but the PR objectives note that some suites failed on the Windows host, which the description does not mention.

Resolution

Mostly complete. Consider these fixes before merge: (1) Add a linked issue with 'Fixes #<number>', or explain why none exists, since the template says outside contributors must link an actual issue. (2) Fill in the AI Disclosure section, or leave it empty only if the author is a StablyAI team member. (3) Check the final checklist item only after pnpm lint, typecheck, test, and build pass, or note which ones CI will cover. (4) Note the known failing tests on the Windows host, and state that they also fail on clean main.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 4 files. (7 skipped: 7 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • 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.

Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/shared/contextual-tours.ts (1)

32-47: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider making id required now that every step has one.

All steps in CONTEXTUAL_TOURS, including the ones not touched by this PR, now set id. Keep id?: string optional, and a future step added without an id will compile without error. That step then has no stable anchor for localized copy, and it can silently fall back to the wrong copy or to English only.

Change the field to id: string (non-optional) so the type checker catches a missing id on any new step at the source, instead of relying on the copy-lookup layer or tests to catch it downstream.

♻️ Proposed change
 export type ContextualTourStep = {
   // Stable anchor for localized copy — position-keyed translations shift onto the wrong step when one is inserted.
-  id?: string
+  id: string
   title: string

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9a408867-6c00-4ebe-b603-4b680b5d7b57

📥 Commits

Reviewing files that changed from the base of the PR and between eea0bb6 and 60ba6c2.

📒 Files selected for processing (7)
  • config/scripts/locale-ko-key-overrides.json
  • src/renderer/src/components/contextual-tours/contextual-tour-overlay-measurement.ts
  • src/renderer/src/components/contextual-tours/contextual-tour-step-copy.test.ts
  • src/renderer/src/components/contextual-tours/contextual-tour-step-copy.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/ko.json
  • src/shared/contextual-tours.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 53185d10-ad30-4499-85ee-7b70064aa1a5

📥 Commits

Reviewing files that changed from the base of the PR and between 60ba6c2 and dcd396b.

📒 Files selected for processing (3)
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/zh.json

Comment thread src/renderer/src/i18n/locales/es.json Resolved
Comment thread src/renderer/src/i18n/locales/es.json Resolved
Only the automations and client-hosted-browser steps had an id-keyed
entry in the localized step copy map, so every other contextual tour
(workspace board, agent sessions, browser, tasks, floating workspace,
workspace creation) rendered English titles, bodies, and action labels
next to localized Back/Next/Done controls.

Give every tour step a required stable id and move the copy lookup into
contextual-tour-step-copy.ts. The map `satisfies` a record over all step
ids, so a new step without localized copy is a type error. Primary and
secondary action labels (Split terminal, Got it, Browser settings) are
localized through the same entry. Existing automations and
client-hosted-browser keys are unchanged so shipped translations keep
resolving.

Add the new strings to en and translate them for ko, es, ja, zh, fr,
and pt.

Co-authored-by: Neil <neil@stably.ai>
@nwparker
nwparker force-pushed the fix/localize-remaining-contextual-tours branch from 3f406b5 to a72ae15 Compare October 27, 2026 09:02
@nwparker nwparker changed the title fix(i18n): localize the remaining contextual tour steps fix(i18n): localize titles, bodies, and action labels for every contextual tour step Oct 27, 2026
@nwparker
nwparker merged commit 433d044 into stablyai:main Oct 27, 2026
67 of 70 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.

4 participants