[PR #7683] [MERGED] feat(settings): localize the settings search registry #7880

Closed
opened 2026-10-24 04:08:26 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7683
Author: @ylli-selmani
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/15/2026
Merged by: @ylli-selmani

Base: staging ← Head: feat/settings-search-i18n


📝 Commits (6)

  • a719e27 feat(settings): add localization keys to the settings search registry
  • 681bb19 feat(settings): translate settings search results through registry keys
  • d636729 test(settings): check settings registry keys against en.json
  • 821a73a Merge remote-tracking branch 'upstream/staging' into feat/settings-search-i18n
  • a15c532 fix(localization): decode single-quoted registry strings in one pass
  • 90bf9d3 style(localization): format check-locales

📊 Changes

9 files changed (+580 additions, -20 deletions)

View changed files

📝 packages/client/src/components/chat/mari/CompactMariMessage.tsx (+7 -3)
📝 packages/client/src/components/layout/omnibar/use-omnibar-mari-arrival.ts (+3 -3)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+9 -5)
📝 packages/client/src/lib/omnibar-results.ts (+9 -4)
📝 packages/client/src/lib/omnibar-settings.ts (+26 -2)
📝 packages/client/src/lib/settings-registry.ts (+313 -3)
📝 packages/client/src/localization/locales/en.json (+142 -0)
📝 scripts/check-locales.mjs (+42 -0)
📝 scripts/regressions/command-center.regression.ts (+29 -0)

📄 Description

Linked issue

Closes #7680

Why this change

  • Settings search, the omnibar and Professor Mari read control labels and descriptions from SETTINGS_SEARCHABLE_CONTROLS, which was hard-coded English. It only translated when the exact English string happened to exist in en.json (118 of 143 labels, 26 of 143 descriptions), so 117 descriptions and 25 labels always showed in English and could drift from the real setting text.

What changed

  • Every registry control now has labelKey and descriptionKey. Existing settings.controls.* / settings.* / omnibar.settings.* keys are reused when the English text matches exactly (118 labels, 27 descriptions); otherwise new settings.search.<id>.label / .description keys were added to en.json (142 keys). English text is unchanged. The English label / description stay on the entry as the t() fallback.
  • Settings panel search (searchSettings), omnibar settings rows (omnibar-settings.ts, omnibar-results.ts) and Professor Mari setting cards (CompactMariMessage.tsx, use-omnibar-mari-arrival.ts) translate through the keys. Search matches the translated text, the English text and aliases; the omnibar adds the English title as an alias when the translated title differs.
  • pnpm localization:check now fails when a registry control lacks a key, when a key is missing from en.json, or when the registry English no longer equals the en.json text.
  • No other locales were touched; missing translations fall back to English.
  • Not changed: professor-mari-navigation.ts, state-navigation.ts, GlobalOmnibar.tsx and use-omnibar-local-results.ts only use ids, types or isOmnibarSettingsTarget, or already pass t. Tab and section copy still goes through useLocalizedUiText (they live in @marinara-engine/shared).

Slices

  • Add labelKey / descriptionKey to every registry control and the matching en.json keys
  • Translate Settings panel search, omnibar settings rows and Mari setting cards through the keys
  • Fail pnpm localization:check on missing or drifted registry keys
  • Regression coverage for translated, English and alias search

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Also run: pnpm localization:check; the issue-sweep-settings, omnibar-settings-sync and command-palette browser tests on desktop Chromium (21 passed, 2 skipped by design); and the command-center, omnibar-home-commands, omnibar-row-lines, omnibar-question-shape, omnibar-message-groups, omnibar-excerpt, mari-polish, mari-permissions-mode, music-dj-and-floating-ui and issue-sweep-5371-5375 regressions via node ./scripts/run-regressions.mjs --filter <file>. All pass.

Manual verification notes

  • Settings search ("queue") and the omnibar ("queue media") were checked in a headless browser against a production build; both show the same English text as before. No translated pack was tried, since no pack has the new keys yet.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

The [ui-i18n] follow-up #7684 covers the new settings.search.* keys.

UI evidence (if applicable)

Not applicable; no visible English change.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Settings searches now match translated control names and descriptions, while continuing to find results using English text and aliases.
    • Settings destinations in the omnibar and referenced-resource rows now show localized titles and descriptions. Original English titles remain searchable.
  • Bug Fixes
    • Improved consistency of translated settings labels and descriptions across search results and navigation.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/7683 **Author:** [@ylli-selmani](https://github.com/ylli-selmani) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@ylli-selmani](https://github.com/ylli-selmani) **Base:** `staging` ← **Head:** `feat/settings-search-i18n` --- ### 📝 Commits (6) - [`a719e27`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a719e27f4e97a640caded606de142404f9b57e96) feat(settings): add localization keys to the settings search registry - [`681bb19`](https://github.com/Pasta-Devs/Marinara-Engine/commit/681bb19d132d7d16d1d14a7aea2ba4868eb25771) feat(settings): translate settings search results through registry keys - [`d636729`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d63672973f8be437435abb93ade2ac0723e9eb2b) test(settings): check settings registry keys against en.json - [`821a73a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/821a73a2f01f2c084d26dd0e162d34c325db98de) Merge remote-tracking branch 'upstream/staging' into feat/settings-search-i18n - [`a15c532`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a15c53281a25af136ee4ec9f4350704e8aecf2e8) fix(localization): decode single-quoted registry strings in one pass - [`90bf9d3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/90bf9d3478e394136c83bd2da3587b0d6015edfa) style(localization): format check-locales ### 📊 Changes **9 files changed** (+580 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/mari/CompactMariMessage.tsx` (+7 -3) 📝 `packages/client/src/components/layout/omnibar/use-omnibar-mari-arrival.ts` (+3 -3) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+9 -5) 📝 `packages/client/src/lib/omnibar-results.ts` (+9 -4) 📝 `packages/client/src/lib/omnibar-settings.ts` (+26 -2) 📝 `packages/client/src/lib/settings-registry.ts` (+313 -3) 📝 `packages/client/src/localization/locales/en.json` (+142 -0) 📝 `scripts/check-locales.mjs` (+42 -0) 📝 `scripts/regressions/command-center.regression.ts` (+29 -0) </details> ### 📄 Description ## Linked issue Closes #7680 ## Why this change - Settings search, the omnibar and Professor Mari read control labels and descriptions from `SETTINGS_SEARCHABLE_CONTROLS`, which was hard-coded English. It only translated when the exact English string happened to exist in `en.json` (118 of 143 labels, 26 of 143 descriptions), so 117 descriptions and 25 labels always showed in English and could drift from the real setting text. ## What changed - Every registry control now has `labelKey` and `descriptionKey`. Existing `settings.controls.*` / `settings.*` / `omnibar.settings.*` keys are reused when the English text matches exactly (118 labels, 27 descriptions); otherwise new `settings.search.<id>.label` / `.description` keys were added to `en.json` (142 keys). English text is unchanged. The English `label` / `description` stay on the entry as the `t()` fallback. - Settings panel search (`searchSettings`), omnibar settings rows (`omnibar-settings.ts`, `omnibar-results.ts`) and Professor Mari setting cards (`CompactMariMessage.tsx`, `use-omnibar-mari-arrival.ts`) translate through the keys. Search matches the translated text, the English text and aliases; the omnibar adds the English title as an alias when the translated title differs. - `pnpm localization:check` now fails when a registry control lacks a key, when a key is missing from `en.json`, or when the registry English no longer equals the `en.json` text. - No other locales were touched; missing translations fall back to English. - Not changed: `professor-mari-navigation.ts`, `state-navigation.ts`, `GlobalOmnibar.tsx` and `use-omnibar-local-results.ts` only use ids, types or `isOmnibarSettingsTarget`, or already pass `t`. Tab and section copy still goes through `useLocalizedUiText` (they live in `@marinara-engine/shared`). ## Slices - [x] Add `labelKey` / `descriptionKey` to every registry control and the matching `en.json` keys - [x] Translate Settings panel search, omnibar settings rows and Mari setting cards through the keys - [x] Fail `pnpm localization:check` on missing or drifted registry keys - [x] Regression coverage for translated, English and alias search ## Validation - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` Also run: `pnpm localization:check`; the `issue-sweep-settings`, `omnibar-settings-sync` and `command-palette` browser tests on desktop Chromium (21 passed, 2 skipped by design); and the `command-center`, `omnibar-home-commands`, `omnibar-row-lines`, `omnibar-question-shape`, `omnibar-message-groups`, `omnibar-excerpt`, `mari-polish`, `mari-permissions-mode`, `music-dj-and-floating-ui` and `issue-sweep-5371-5375` regressions via `node ./scripts/run-regressions.mjs --filter <file>`. All pass. ### Manual verification notes - Settings search ("queue") and the omnibar ("queue media") were checked in a headless browser against a production build; both show the same English text as before. No translated pack was tried, since no pack has the new keys yet. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) The `[ui-i18n]` follow-up #7684 covers the new `settings.search.*` keys. ## UI evidence (if applicable) Not applicable; no visible English change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Settings searches now match translated control names and descriptions, while continuing to find results using English text and aliases. * Settings destinations in the omnibar and referenced-resource rows now show localized titles and descriptions. Original English titles remain searchable. * **Bug Fixes** * Improved consistency of translated settings labels and descriptions across search results and navigation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:08:26 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#7880
No description provided.