Skip to content

feat(settings): make Language setting findable by native-language search terms - #9967

Merged
AmethystLiang merged 1 commit into
mainfrom
add-native-words-into-language-settings-search
Jul 22, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
add-native-words-into-language-settings-search

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The Language setting was only findable in settings search by its native word (语言 / 언어 / 言語 / Idioma) when that language was already the active UI locale. translateSearchKeyword('settings.appearance.language.title', 'Language') emits the localized title only in the matching locale — in the default English UI it returns just ['Language'].

So a Chinese speaker on the default English install who typed 语言 could not find the Language setting to switch away from English — the exact discovery moment where native-word search matters most.

Fix

In getLanguageEntries (appearance-search.ts):

  1. Always-index the native word for "language" in every supported language as keywords, regardless of the active UI locale: 语言, 語言 (Traditional), 언어, 言語, Idioma. (English "Language" is already always-indexed as the title fallback.)
  2. Add the previously-omitted Spanish native name Español (chinese/korean/japanese names were already present).

Native words are locale-invariant constants, so they are plain keyword literals with reviewed entries in the localization-coverage allowlist rather than new translation keys.

Validation

  • Unit (appearance-search.test.ts): asserts every native word matches the Language entry under all five UI locales (en/zh/ko/ja/es), plus Español.
  • End-to-end in the Electron app (English UI): searching 语言 narrows Settings → Appearance to exactly the Language row (screenshot below). Spot-checked 언어, 言語, Idioma, 語言, and partial 语 all surface it; a nonsense query does not.

Notes

  • verify:localization-catalog is already red on this branch for unrelated pre-existing missing keys (files not touched here); this change adds none.

Made with Orca 🐋

…rch terms

The Language setting's native word (语言 / 언어 / 言語 / Idioma) only reached
settings search via the localized title in that word's own UI locale — so a
Chinese speaker on the default English UI could not find it by typing 语言.

Always-index the native word for 'language' in every supported language (plus
the previously-omitted Spanish native name Español), so speakers can locate and
switch to their language from any starting locale. Native words are
locale-invariant constants, so they are plain keyword literals with reviewed
localization-coverage allowlist entries.

Co-authored-by: Orca <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7f15ba0c-5404-4e63-8f84-ffd71eff5bf7

📥 Commits

Reviewing files that changed from the base of the PR and between 6ad6241 and 711b20e.

📒 Files selected for processing (3)
  • config/localization-coverage-allowlist.json
  • src/renderer/src/components/settings/appearance-search.test.ts
  • src/renderer/src/components/settings/appearance-search.ts

📝 Walkthrough

Walkthrough

Extended getLanguageEntries with Spanish and native-language search terms for Chinese, Traditional Chinese, Korean, Japanese, and Spanish. Added localization coverage allowlist entries for the new keywords. Added tests covering native-language matching across English, Chinese, Korean, Japanese, and Spanish UI locales.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change, but it does not follow the required template and is missing several required sections. Rewrite it to match the template with Summary, Screenshots, Testing, AI Review Report, Security Audit, and Notes sections.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: native-language search terms for the Language setting.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
config/localization-coverage-allowlist.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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.

@AmethystLiang
AmethystLiang merged commit 4c2bb50 into main Jul 22, 2026
2 checks passed
@AmethystLiang
AmethystLiang deleted the add-native-words-into-language-settings-search branch July 22, 2026 18:53
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…rch terms (stablyai#9967)

The Language setting's native word (语言 / 언어 / 言語 / Idioma) only reached
settings search via the localized title in that word's own UI locale — so a
Chinese speaker on the default English UI could not find it by typing 语言.

Always-index the native word for 'language' in every supported language (plus
the previously-omitted Spanish native name Español), so speakers can locate and
switch to their language from any starting locale. Native words are
locale-invariant constants, so they are plain keyword literals with reviewed
localization-coverage allowlist entries.

Co-authored-by: Orca <[email protected]>
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