Repository navigation
fix(i18n): correct mistranslated Korean settings search keywords - #46947
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Severity of issue fixed: Medium Merge Risk:
|
Korean settings search keywords that machine translation got wrong (tray as 쟁반, permission as 허가, dialog as 대화, loudness as 큰 소리, opt out as 탈퇴, and others) or left half in English (repos 아이콘, commit 메시지, 모노 repo) now use the term the Korean UI shows, so a Korean query reaches the setting. Values that were already valid Korean are left alone. The new values are pinned in the Korean search keyword table and the ko key overrides so a catalog repair keeps them. Fixes stablyai#46946 Co-authored-by: Neil <[email protected]>
a292346 to
2c7e6a3
Compare
ELI5
With Orca set to Korean, Settings search also looks for a Korean keyword for each setting. Some of those keywords were bad machine translations: "tray" was a serving tray (쟁반) and "permission" was a permit (허가). Others were half in English (repos 아이콘). So typing the normal Korean word did not find the setting. This fixes those keywords and leaves every keyword that was already valid Korean alone.
What Changed
src/renderer/src/i18n/locales/ko.json, and they are pinned so a catalog repair keeps them. 13 entries go into the Korean table oflocale-search-keyword-overrides.mjs, whichrepairTranslatedValueapplies to.search.keys. 5 entries go intolocale-ko-key-overrides.jsonfor keys that table cannot reach: the three artifact keywords and the coordinator-approvals permission keyword (none of these are.search.keys), andrate limiton the GLM coding plan. No keys, English strings, app code or other locales change. English queries are not affected, because the English fallback is indexed next to the localized keyword.Every value considered (35 keys: 19 changed, 16 left as on main)
The rule: change a value only if the old one was wrong (wrong sense, half English, or junk punctuation) and no valid Korean query that matched the setting on
mainstops matching. A swap of one valid Korean word for a synonym or another form of it is left alone, even when the new word reads better, because it loses the old word as a query. "Other searchable text" is the setting's Korean title, description and other keywords. Matching is a lowercase substring test (scoreSettingsSearchText).auto.components.settings.unless noted)appearance.search.tray.traybrowser.search.linkRoutingModifier.modifierbrowser.search.clientHostedRemote.placementgeneral.search.ca86dd6e27(x4 entries)notifications.search.ecdeff4993privacy.search.27a27b2f63(x2 entries)artifacts.keywordPublishartifacts.keywordPublicartifacts.keywordPermissionOrchestrationPane.coordinatorApprovalsKeywordPermissionagents.search.permissionnotifications.search.b8bf5471d1components.settings.terminal.clipboard.search.marginrepository.search.cc876ca5f2repositorystill matchesrepos.repository.search.b2546efab5repository.search.cd73b976d7repository.search.eec39b3de6repository.search.4b9a18a56daccounts.search.zcodePlan.kw.rateLimitgeneral.search.5250cf0e48mobile.settings.search.6cf5f54ce1general.search.afa37a34e1general.search.closeterminal.search.close_terminalappearance.search.tray.closeappearance.search.tray.minimizeagents.search.skipgeneral.search.replacegit.search.diffBaserepository.search.fastForwardterminal.search.781f49d942(x3 entries)terminal.search.minimumContrast.minimumprivacy.search.83a6cd79b3privacy.search.b021b9cb81(x2 entries)repository.search.19f58d6d89Why
Search keywords are single words with no context. That is where machine translation most often picks the wrong sense, and since nobody sees keywords on screen, they stay wrong.
repair-locale-catalog.mjs --locale kodoes not touch any of these 19 onmain.Each keyword was read against the title, description and other keywords of its own setting. A value changes only when the old one was wrong and the change loses no valid Korean query. Where the old value was valid Korean (핀, 단추, 닫다, 바꾸다, 분할기, 빨리감기 and others) it stays, even if the new word would match the title. The new word already matches through the title, so changing it would only remove a Korean word users can type.
Original fix by @dbsghdz1 in #46947. The branch is now one squashed commit on current
main, authored by @dbsghdz1, with the review follow-ups folded in.Linked Issue
If you do not have one and are an outside contributor, your PR will be ignored. Refs is not sufficient. Link an actual issue
Fixes #46946
Visual Proof
N/A. Search keywords are never drawn on screen, so there is nothing to screenshot. What changes is which settings a Korean query matches, and that list is under What Changed and Testing.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns (no tests added)
pnpm verify:localization-catalogsandpnpm verify:localization-catalogpass.Changed-code gates pass on the touched files: oxfmt, oxlint, anti-slop, native-plugin oxlint, ast-grep, and
check-changed-code-quality.mjs(0 findings).Ran the ko repair (
repair-locale-catalog.mjs, localeko) on copies and compared the results. With this branch's policy on this branch'sko.json, it makes the same 185 pre-existing drift updates asmainand keeps all 19 changed values. Compared with the repair output onmain, exactly these 19 keys differ, so the 13 new table entries change no other key. Withmain'sko.jsonand this branch's pins, the repair produces all 19 new values (185 + 19 = 204 updates). The repair output was discarded each time.For each of the 35 keys above, I checked whether the old and new values match the setting's other Korean text, using the same lowercase substring rule as
scoreSettingsSearchText. 11 changed values are new to their entry and 8 were already matched.No tests added: only catalog values and override tables change, and the catalog verification covers them.
Re-checked after squashing onto current
main(f18e4eb): the landed diff is line-for-line identical to the reviewed change, both catalog verifiers exit 0, and every static gate passes on the touched files.Not done: the app was not run and nothing was typed into Settings search. macOS only.
Performance
None, because only catalog values and the build-time override tables change. The same keys load the same way.
ko.jsongrows by 9 bytes (1683250 to 1683259). The medianJSON.parsetime is about 2.5 ms before and after, and a substring scan of all 2165 search keyword values for 8 queries (including 2 KB adversarial ones) takes about 0.11 ms on both.Risk
Level: Low
If a term is off, a Korean query misses a setting it could have matched, which is where these 19 are today. English queries are not affected. The riskiest part is the search keyword table, because an entry applies to every
.search.key with that English word. The repair diff above shows no key outside these 19 changes. A plain revert backs it out.Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Follow-up to the note in #46929. Left out on purpose:
opt inis already pinned to 수신 동의 in the Korean key overrides, so I did not change it. I also left the threedesktopkeywords (데스크탑) alone: one means the macOS Desktop folder, which macOS itself labels 데스크탑, and another sits on a setting whose own option text says 데스크탑. Brand names written in Hangul (그로크, 젤리즈) and the 작업 트리 / 워크트리 split are separate questions.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred). I ranpnpm check:changedlocally and CI covers the rest.