Skip to content

fix(i18n): localize sparse preset validation - #19205

Closed
mors119 wants to merge 4 commits into
stablyai:mainfrom
mors119:fix/i18n-sparse-preset-validation
Closed

mors119 wants to merge 4 commits into
stablyai:mainfrom
mors119:fix/i18n-sparse-preset-validation

Conversation

@mors119

@mors119 mors119 commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Sparse preset form validation was still displayed in English even when Orca was using Korean. The validation messages now use Orca's localization system.

What Changed

  • Localized the desktop Sparse preset validation messages.
  • Added semantic localization entries.
  • Added and reviewed Korean translations.
  • Preserved existing validation behavior.
  • Updated relevant tests.

Why

Issue #17913 tracks user-facing strings that bypass Orca's localization system. This PR addresses only the desktop Sparse preset validation portion.

Linked Issue

Part of #17913

Visual Proof

The affected desktop validation surfaces were manually verified in Korean.

Sparse preset settings

Before After
Sparse preset settings validation before localization Sparse preset settings validation after Korean localization

New workspace sparse preset

Before After
New workspace sparse preset validation before localization New workspace sparse preset validation after Korean localization

Testing

  • ORCA_BACKGROUND_LAUNCH=1 npx --yes [email protected] test src/renderer/src/components/settings/SparsePresetSettingsSection.test.tsx src/renderer/src/components/sparse/SparseCheckoutPresetSelect.test.tsx — 2 files, 4 tests passed
  • pnpm run verify:localization-catalog
  • pnpm run verify:localization-extraction
  • pnpm run verify:localization-coverage
  • pnpm run check:code-quality:changed
  • I manually tested these changes locally
    • Verified Project Settings → Sparse Checkout Presets → New Preset in Korean.
    • Verified New Workspace → Advanced → Sparse checkout → New preset in Korean.
    • Confirmed the empty-name validation renders as 이름을 입력해 주세요. on both desktop surfaces.
  • Automated tests added/updated

Full repository checks on the current head:

  • pnpm lint — passed via npx --yes [email protected] lint; existing non-blocking collator-performance warnings remain.
  • pnpm typecheck — passed via npx --yes [email protected] typecheck.
  • pnpm test — 8131 passed, 62 skipped, 12 failed suites / 21 failed tests, and 1 unhandled error. Failures were in unrelated cross-version, shell, relay/PTY, Electron CLI, i18n import-time, and performance tests.
  • pnpm build — passed via npx --yes [email protected] build; non-blocking native deprecation and local CLI symlink permission warnings were reported.

AI Disclosure

Codex was used for implementation, testing, and code review assistance. Korean localization wording was manually reviewed in context.

Review

  • Cross-platform: Localization-only renderer change; no platform-specific behavior changed.
  • SSH / Remote / Local: No execution or routing behavior changed.
  • Agents / integrations: Unaffected.
  • Performance: No meaningful runtime impact.
  • UI quality: English and Korean validation text were reviewed through focused renderer tests and manually verified in both affected desktop surfaces.
  • Security: No security-sensitive behavior changed.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Localization Notes

  • No mobile localization changes were included.
  • The duplicate-name message uses the named {{name}} placeholder.
  • Korean wording avoids attaching a context-sensitive particle directly to the dynamic preset name.
  • Existing Orca terminology was preserved, using 사전 설정 for the preset in this Sparse UI.

Notes

  • No mobile files were changed.
  • No validation behavior was changed.
  • No unrelated refactoring was included.
  • No release/version files were touched.

Checklist

  • This PR is small and focused.
  • I explained what changed and why, including an ELI5.
  • Before/after screenshots are attached for both affected desktop surfaces.
  • Self-reviewed for correctness, security, and performance.
  • Cross-platform, SSH/remote, and compatibility impact considered.
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass, or any current-head failures are documented above.

Author

X: @mors119

@coderabbitai

coderabbitai Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: b0e9dec4-2e00-49ae-a621-bb475f565f71

📥 Commits

Reviewing files that changed from the base of the PR and between 40ef993 and 555bbe7.

📒 Files selected for processing (3)
  • src/renderer/src/components/sparse/SparseCheckoutPresetSelect.test.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/ko.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/renderer/src/i18n/locales/ko.json

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Sparse preset validation messages now use i18n translations in the settings and checkout components. English and Korean locale entries cover required names, names longer than 80 characters, and duplicate names. Tests verify rendered load errors and validation messages in both interfaces, including Korean interpolation behavior.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 555bb

Localized sparse-preset validation messages are covered across both interfaces, with no actionable current-head risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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. Analyzed 2 functions across 4 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: localizing Sparse preset validation messages.
Description check ✅ Passed The description is complete and relevant. It includes the required change summary, rationale, issue reference, visual proof, testing results, AI disclosure, review notes, boundary confirmation, and ch…
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.
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. Analyzed 2 functions across 4 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI

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.

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

  • Localized name validation in SparsePresetSettingsSection — the three hardcoded validation strings are now translate() calls with semantic components.sparse.preset.validation.* keys.
  • Localized name validation in SparseCheckoutPresetSelect — the same three strings, sharing the nameAlreadyExists key with a consistent {{name}} placeholder.
  • Added en.json and ko.json entries — semantic keys under the components namespace; the Korean nameAlreadyExists reorders to "{{name}}" 이름의 사전 설정이 이미 있습니다. so no particle attaches to the interpolated name.
  • Tests — SparsePresetSettingsSection moved from renderToStaticMarkup to @testing-library/react + happy-dom to drive the form, and a new SparseCheckoutPresetSelect test covers the checkout-picker path in both languages.

Verified the key paths resolve under the top-level components namespace, the {{name}} placeholder is consistent across both call sites and both catalogs (so the interpolation-parity checks hold), and the English values match their inline fallbacks (so en-runtime-required.json needs no regeneration). The fr/es/ja/zh catalogs are intentionally left untouched and fall back to English, per the translation-source architecture.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@mors119 mors119 closed this Oct 5, 2026
@mors119
mors119 deleted the fix/i18n-sparse-preset-validation branch October 5, 2026 23:59
@mors119
mors119 restored the fix/i18n-sparse-preset-validation branch October 5, 2026 23:59
@mors119
mors119 deleted the fix/i18n-sparse-preset-validation branch October 6, 2026 00:01
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