Skip to content

fix(ui): restore missing spaces in i18n JSX fragment copy - #9513

Merged
nwparker merged 1 commit into
mainfrom
nwparker/fix-i18n-glue-spaces
Jul 20, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/fix-i18n-glue-spaces

Conversation

@nwparker

@nwparker nwparker commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #9511. The same glue-word class of bug exists wherever translate(...) fragments sit next to <code> / dynamic values without an explicit {' '}.

Examples of broken copy this fixes:

  • This repo ignores sharedorca.yaml setup scripts
  • Exampleorca.yaml template / Editorca.yaml to change
  • main ormaster / commands likegit diff main...HEAD
  • Runorca serve --pairing-address …
  • Showing8 of42
  • Force-quitssess_abc123
  • Version1.2.3 is available
  • and many more label/value pairs (Started…, Renamed from…, Filter pull requests, rate limits, etc.)

Approach

  • Insert explicit JSX {' '} between word-ending fragments and the next token (same pattern as the trust dialog fix).
  • Leave intentional glue alone (check #123, comment L42, Clear ( + count + )).
  • Add i18n-jsx-spacing-guard.test.ts to lock high-impact cases.

Screenshots

Critical paths (orca.yaml / setup / git / run)

hero before-after

Full before/after grid (all fixed cases)

full evidence grid

Test plan

  • pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/i18n-jsx-spacing-guard.test.ts
  • pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/sidebar/OrcaYamlTrustDialog.test.tsx
  • Spot-check Settings → Git / Repository hooks / Runtime environments copy
  • Spot-check setup script prompt when shared orca.yaml is ignored

Across settings, setup prompts, checks, and dialogs, translate() fragments
were concatenated with <code>/dynamic values without explicit JSX spaces,
gluing words together (sharedorca.yaml, ormaster, Showing8 of42, etc.).

Insert {' '} between word-ending fragments and the next token, matching the
orca.yaml trust dialog fix. Add a source guard test for high-impact cases.
@nwparker

Copy link
Copy Markdown
Contributor Author

Attachments

hero.png evidence-full.png
hero.png evidence-full.png

@nwparker
nwparker merged commit 0d97653 into main Jul 20, 2026
1 of 2 checks passed
@nwparker
nwparker deleted the nwparker/fix-i18n-glue-spaces branch July 20, 2026 04:24
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Updated renderer JSX text composition to use explicit whitespace between translated labels, timestamps, counts, paths, errors, and inline elements across dialogs, editor views, automation, settings, sidebar, and statistics components. Some multiline expressions were consolidated without changing logic or displayed values. Added a Vitest guard that verifies explicit spacing after selected translation fallbacks.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning Missing required template sections for AI Review Report, Security Audit, and Notes, and the Testing section doesn't follow the requested checklist format. Add the missing sections, rename Test plan to Testing with the full checkbox list, and include the AI review, security audit, and notes details required by the template.
Docstring Coverage ⚠️ Warning Docstring coverage is 8.89% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: fixing missing i18n JSX spaces in UI copy.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@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


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6967e646-9353-4ffa-8b08-13cf66bb1474

📥 Commits

Reviewing files that changed from the base of the PR and between 7df56ad and 2df2122.

📒 Files selected for processing (46)
  • src/renderer/src/components/GitHubItemDialog.tsx
  • src/renderer/src/components/GitLabItemDialog.tsx
  • src/renderer/src/components/PullRequestPage.tsx
  • src/renderer/src/components/TaskPage.tsx
  • src/renderer/src/components/UpdateCard.tsx
  • src/renderer/src/components/automations/AutomationsPage.tsx
  • src/renderer/src/components/automations/ExternalAutomationRunTable.tsx
  • src/renderer/src/components/contextual-tours/ContextualTourProgressDots.tsx
  • src/renderer/src/components/editor/CombinedDiffViewer.tsx
  • src/renderer/src/components/editor/ConflictComponents.tsx
  • src/renderer/src/components/editor/IpynbViewer.tsx
  • src/renderer/src/components/editor/MermaidBlock.tsx
  • src/renderer/src/components/editor/RichMarkdownDocLinkMenu.tsx
  • src/renderer/src/components/feature-wall/ReviewNotesAnimatedVisual.tsx
  • src/renderer/src/components/feature-wall/ReviewPRViewAnimatedVisual.tsx
  • src/renderer/src/components/feature-wall/ReviewShipAnimatedVisual.tsx
  • src/renderer/src/components/feature-wall/review-notes-diff-rows.tsx
  • src/renderer/src/components/github/PRFilterSections.tsx
  • src/renderer/src/components/github/github-rate-limit-display.tsx
  • src/renderer/src/components/gitlab/gitlab-rate-limit-display.tsx
  • src/renderer/src/components/linear-priority-icon.tsx
  • src/renderer/src/components/right-sidebar/FileExplorerTreeStatus.tsx
  • src/renderer/src/components/right-sidebar/SourceControlAgentActionDialogForm.tsx
  • src/renderer/src/components/right-sidebar/checks-panel-content.tsx
  • src/renderer/src/components/settings/AccountsPane.tsx
  • src/renderer/src/components/settings/AutoRenameBranchFromWorkSetting.tsx
  • src/renderer/src/components/settings/BaseRefPicker.tsx
  • src/renderer/src/components/settings/BrowserSessionCookiesSection.tsx
  • src/renderer/src/components/settings/CliSection.tsx
  • src/renderer/src/components/settings/CommitMessageAiPane.tsx
  • src/renderer/src/components/settings/GeneralEditorSettingsSection.tsx
  • src/renderer/src/components/settings/GeneralUpdateSettingsSection.tsx
  • src/renderer/src/components/settings/GitPane.tsx
  • src/renderer/src/components/settings/ManageSessionKillDialog.tsx
  • src/renderer/src/components/settings/NotificationSoundSection.tsx
  • src/renderer/src/components/settings/RepositoryHooksSection.tsx
  • src/renderer/src/components/settings/RepositoryPane.tsx
  • src/renderer/src/components/settings/RepositorySourceControlAiHostedReviewDefaults.tsx
  • src/renderer/src/components/settings/RuntimeEnvironmentsPane.tsx
  • src/renderer/src/components/settings/SshPassphraseDialog.tsx
  • src/renderer/src/components/settings/WslCliRegistration.tsx
  • src/renderer/src/components/sidebar/DeleteWorktreeWarningPanels.tsx
  • src/renderer/src/components/sidebar/SetupScriptPromptCardViews.tsx
  • src/renderer/src/components/stats/ShareUsageCard.tsx
  • src/renderer/src/components/stats/UsageOverviewPane.tsx
  • src/renderer/src/lib/i18n-jsx-spacing-guard.test.ts

<div className="mermaid-error">
{translate('auto.components.editor.MermaidBlock.dcc132e691', 'Diagram error:')}
{error}
{translate('auto.components.editor.MermaidBlock.dcc132e691', 'Diagram error:')} {error}

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use explicit JSX whitespace to prevent formatting bugs.

Using a raw space between JSX expressions (e.g., } {error}) works when the code is on a single line, but if an auto-formatter like Prettier wraps the code across multiple lines, the space will be stripped by the JSX parser. This is the exact root cause of the glued-word bugs this PR fixes. Use explicit {' '} to ensure the space is always preserved.

💻 Proposed fix
-          {translate('auto.components.editor.MermaidBlock.dcc132e691', 'Diagram error:')} {error}
+          {translate('auto.components.editor.MermaidBlock.dcc132e691', 'Diagram error:')}{' '}
+          {error}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{translate('auto.components.editor.MermaidBlock.dcc132e691', 'Diagram error:')} {error}
{translate('auto.components.editor.MermaidBlock.dcc132e691', 'Diagram error:')}{' '}
{error}

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.

1 participant