Repository navigation
fix(i18n): translate the file explorer's search field into Korean - #49909
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
stablyai#49637 gave the file explorer one search field for file names and text. Its 11 strings had no Korean, so the Korean UI showed them in English: the field's placeholder (and "Search {{path}}" in a sparse checkout), the Files and Text section headers (and "Files in {{path}}" and "Text in workspace" in a sparse checkout), Show all, No results, the row for too many matches, the "Not available here" row, and the scope popover's line on what search covers. stablyai#49574 also added a screen reader note for the chat HTML view's disabled Preview toggle, with no Korean. Add the 12 keys in en.json's order, using the catalog's existing wording where it has one: 검색, 파일, 텍스트, 결과 없음, 미리보기, 스파스 체크아웃, "{{value0}}에서 검색" for Search {{value0}}, and "…개 모두 표시" for Show all. Fixes stablyai#49908
33c05ee to
0943e4c
Compare
ELI5
The file explorer now has one search box for both file names and text, but in Korean its placeholder, section headers and status rows still showed up in English. This adds the Korean text for them. It also adds Korean for a screen reader note in the chat's HTML view.
What Changed
src/renderer/src/i18n/locales/ko.jsongets the 12 missing leaves, inen.json's order:fileExplorer.combinedSearch.*(9),fileExplorer.root.combinedSearchExplanation,fileSearch.unavailableandcomponents.native-chat.htmlViewPreviewWaiting. Nothing else changes: +16/-2, and the 2 removed lines only gain a trailing comma.Why
These keys were missing from the Korean catalog, so i18next fell back to English. Where the catalog already has Korean for the same English, the new strings reuse it: 검색 (Search), 파일 (Files), 텍스트 (Text), 결과 없음 (No results), 미리보기 (Preview), 스파스 체크아웃 (sparse checkout) and 일치하는 항목 (matches). The two templates follow existing ones: "Search {{value0}}" is already "{{value0}}에서 검색", and "Show all {{value0}} plugins" is already "플러그인 {{value0}}개 모두 표시". Each new string keeps the same
{{path}}/{{count}}placeholders as English.Linked Issue
Fixes #49908
Visual Proof
N/A: this only changes catalog text, and there is no layout or interaction change. The table below shows each key rendered with Orca's
translateagainst the Korean catalog ofmain(which falls back to English) and of this branch, withcount= 37 andpath=src/components:maincomponents.native-chat.htmlViewPreviewWaitingfileExplorer.root.combinedSearchExplanationfileExplorer.combinedSearch.textfileExplorer.combinedSearch.filesInfileExplorer.combinedSearch.filesfileExplorer.combinedSearch.showAllfileExplorer.combinedSearch.noResultsfileExplorer.combinedSearch.placeholderfileExplorer.combinedSearch.placeholderScopedfileExplorer.combinedSearch.textInWorkspacefileExplorer.combinedSearch.refinefileSearch.unavailableTesting
Run on macOS, with this commit squashed onto current
main:en.jsonandko.json, and that each Korean value has the same{{…}}placeholders as the English one.pnpm verify:localization-catalogpasses.vitest run config/scripts/localization config/scripts/locale-catalogpasses (4 files, 8 tests).oxfmt --checkpasses onko.json. The anti-slop and code-quality oxlint configs,ast-grep scanand the changed-code quality gate have nothing to flag, because no JS/TS changed.Performance
None, because the change only adds 12 strings (about 800 bytes, +0.045%) to the Korean catalog, which is already loaded. A
JSON.parsebenchmark of the old and newko.json(order-balanced, 60 runs each) showed no difference beyond machine noise. No code path runs differently.Risk
Level: Low
This affects only the Korean locale, only text, and only new keys. The worst case is a Korean line that reads awkwardly. A plain revert backs it out.
Review
Agent skill upstream boundary
Notes
Original fix by @dbsghdz1 in #49909. Their commit is squashed onto current
mainwith authorship preserved.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)