Repository navigation
feat(settings): make Language setting findable by native-language search terms - #9967
Conversation
…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]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughExtended 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
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.jsonTraceback (most recent call last): 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. Comment |
…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]>
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):语言,語言(Traditional),언어,言語,Idioma. (English "Language" is already always-indexed as the title fallback.)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
appearance-search.test.ts): asserts every native word matches the Language entry under all five UI locales (en/zh/ko/ja/es), plusEspañol.语言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-catalogis already red on this branch for unrelated pre-existing missing keys (files not touched here); this change adds none.Made with Orca 🐋