From bde392762f665c038c843fff619f0122129e761a Mon Sep 17 00:00:00 2001 From: seandoesdev <122565412+seandoesdev@users.noreply.github.com> Date: Tue, 21 Jul 2026 11:43:16 +0900 Subject: [PATCH] fix(i18n): localize browser link-routing description The Link Routing setting description was a hardcoded English template literal, so it bypassed the i18n catalog and stayed English in every non-English UI. Route it through translate() with a {{shortcut}} interpolation (the platform keybinding stays literal) and add the key to all locale catalogs (ko curated, ja/es/zh included) plus the ko key-override so regeneration preserves it. --- config/scripts/locale-ko-key-overrides.json | 3 +++ src/renderer/src/components/settings/browser-search.test.ts | 2 ++ src/renderer/src/components/settings/browser-search.ts | 6 +++++- src/renderer/src/i18n/locales/en.json | 3 ++- src/renderer/src/i18n/locales/es.json | 3 ++- src/renderer/src/i18n/locales/ja.json | 3 ++- src/renderer/src/i18n/locales/ko.json | 3 ++- src/renderer/src/i18n/locales/zh.json | 3 ++- 8 files changed, 20 insertions(+), 6 deletions(-) diff --git a/config/scripts/locale-ko-key-overrides.json b/config/scripts/locale-ko-key-overrides.json index 953eb8a21fcf..3b2d8ee715e6 100644 --- a/config/scripts/locale-ko-key-overrides.json +++ b/config/scripts/locale-ko-key-overrides.json @@ -3101,6 +3101,9 @@ "auto.components.settings.auto.rename.branch.search.a482f6a423": { "ko": "슬러그" }, + "auto.components.settings.browser.search.00f82a4c3d": { + "ko": "터미널, 마크다운, 편집기에서 http(s) 링크를 Orca 내장 브라우저로 엽니다. {{shortcut}}은(는) 항상 시스템 브라우저를 사용합니다." + }, "auto.components.settings.browser.search.0732ebe6fb": { "ko": "비공개" }, diff --git a/src/renderer/src/components/settings/browser-search.test.ts b/src/renderer/src/components/settings/browser-search.test.ts index 5d6e4255047a..53c45bf438ad 100644 --- a/src/renderer/src/components/settings/browser-search.test.ts +++ b/src/renderer/src/components/settings/browser-search.test.ts @@ -12,6 +12,7 @@ describe('browser settings search copy', () => { const description = getBrowserLinkRoutingDescription({ isMac: true }) expect(description).toContain('⇧⌘-click') expect(description).not.toContain('Cmd/Ctrl') + expect(description).not.toContain('{{shortcut}}') const linkRoutingEntry = getBrowserPaneSearchEntries({ isMac: true }).find( (entry) => entry.title === 'Link Routing' @@ -32,6 +33,7 @@ describe('browser settings search copy', () => { const description = getBrowserLinkRoutingDescription({ isMac: false }) expect(description).toContain('Shift+Ctrl+click') expect(description).not.toContain('Cmd/Ctrl') + expect(description).not.toContain('{{shortcut}}') const linkRoutingEntry = getBrowserPaneSearchEntries({ isMac: false }).find( (entry) => entry.title === 'Link Routing' diff --git a/src/renderer/src/components/settings/browser-search.ts b/src/renderer/src/components/settings/browser-search.ts index 4cd99f7fa77a..f814f84d50ca 100644 --- a/src/renderer/src/components/settings/browser-search.ts +++ b/src/renderer/src/components/settings/browser-search.ts @@ -17,7 +17,11 @@ export function getBrowserLinkRoutingShortcutLabel(platform: BrowserShortcutPlat } export function getBrowserLinkRoutingDescription(platform: BrowserShortcutPlatform): string { - return `Open http(s) links in Orca's built-in browser — from the terminal, markdown, and the editor. ${getBrowserLinkRoutingShortcutLabel(platform)} always uses your system browser.` + return translate( + 'auto.components.settings.browser.search.00f82a4c3d', + "Open http(s) links in Orca's built-in browser — from the terminal, markdown, and the editor. {{shortcut}} always uses your system browser.", + { shortcut: getBrowserLinkRoutingShortcutLabel(platform) } + ) } export function getBrowserPaneSearchEntries( diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index e5f93b0bcb0a..6a24e6b2b435 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -7488,7 +7488,8 @@ "a942905148": "URL opened when creating a new browser tab. Leave empty to open a blank tab.", "c3903322d2": "Default Home Page", "19ea5607cf": "Localhost Worktree Labels", - "4e0fdf0a3f": "Open workspace ports as worktree-specific Orca localhost URLs so browser tabs are easier to tell apart." + "4e0fdf0a3f": "Open workspace ports as worktree-specific Orca localhost URLs so browser tabs are easier to tell apart.", + "00f82a4c3d": "Open http(s) links in Orca's built-in browser — from the terminal, markdown, and the editor. {{shortcut}} always uses your system browser." }, "use": { "search": { diff --git a/src/renderer/src/i18n/locales/es.json b/src/renderer/src/i18n/locales/es.json index de5d52e3224a..ff779de4777c 100644 --- a/src/renderer/src/i18n/locales/es.json +++ b/src/renderer/src/i18n/locales/es.json @@ -7428,7 +7428,8 @@ "a942905148": "URL abierta al crear una nueva pestaña del navegador. Déjelo vacío para abrir una pestaña en blanco.", "c3903322d2": "Página de inicio predeterminada", "19ea5607cf": "Etiquetas de localhost para worktrees", - "4e0fdf0a3f": "Abre los puertos del workspace como URL localhost de Orca específicas del worktree para que las pestañas del navegador sean más fáciles de distinguir." + "4e0fdf0a3f": "Abre los puertos del workspace como URL localhost de Orca específicas del worktree para que las pestañas del navegador sean más fáciles de distinguir.", + "00f82a4c3d": "Abre enlaces http(s) en el navegador integrado de Orca, desde el terminal, Markdown y el editor. {{shortcut}} siempre usa el navegador del sistema." }, "use": { "search": { diff --git a/src/renderer/src/i18n/locales/ja.json b/src/renderer/src/i18n/locales/ja.json index b356273ee0a6..8de47aeee0de 100644 --- a/src/renderer/src/i18n/locales/ja.json +++ b/src/renderer/src/i18n/locales/ja.json @@ -7450,7 +7450,8 @@ "a942905148": "新規ブラウザ タブを作成するときに開かれる URL。空白のタブを開くには、空白のままにします。", "c3903322d2": "デフォルトのホームページ", "19ea5607cf": "ローカルホストのワークツリーのラベル", - "4e0fdf0a3f": "ワークスペース ポートをワークツリー固有の Orca localhost URL として開くと、ブラウザーのタブを区別しやすくなります。" + "4e0fdf0a3f": "ワークスペース ポートをワークツリー固有の Orca localhost URL として開くと、ブラウザーのタブを区別しやすくなります。", + "00f82a4c3d": "ターミナル、Markdown、エディターからの http(s) リンクを Orca の内蔵ブラウザーで開きます。{{shortcut}} は常にシステムブラウザーを使用します。" }, "use": { "search": { diff --git a/src/renderer/src/i18n/locales/ko.json b/src/renderer/src/i18n/locales/ko.json index 12e2c9b75a3d..033e75095f0f 100644 --- a/src/renderer/src/i18n/locales/ko.json +++ b/src/renderer/src/i18n/locales/ko.json @@ -7413,7 +7413,8 @@ "a942905148": "새 브라우저 탭을 만들 때 열리는 URL입니다. 빈 탭을 열려면 비워 두세요.", "c3903322d2": "기본 홈 페이지", "19ea5607cf": "로컬호스트 작업 트리 레이블", - "4e0fdf0a3f": "브라우저 탭을 더 쉽게 구분할 수 있도록 작업 트리별 Orca 로컬 호스트 URL로 워크스페이스 포트를 엽니다." + "4e0fdf0a3f": "브라우저 탭을 더 쉽게 구분할 수 있도록 작업 트리별 Orca 로컬 호스트 URL로 워크스페이스 포트를 엽니다.", + "00f82a4c3d": "터미널, 마크다운, 편집기에서 http(s) 링크를 Orca 내장 브라우저로 엽니다. {{shortcut}}은(는) 항상 시스템 브라우저를 사용합니다." }, "use": { "search": { diff --git a/src/renderer/src/i18n/locales/zh.json b/src/renderer/src/i18n/locales/zh.json index 93edb6ba3a16..372b447c18b1 100644 --- a/src/renderer/src/i18n/locales/zh.json +++ b/src/renderer/src/i18n/locales/zh.json @@ -7413,7 +7413,8 @@ "a942905148": "创建新浏览器选项卡时打开的 URL。留空以打开空白选项卡。", "c3903322d2": "默认主页", "19ea5607cf": "本地主机工作区标签", - "4e0fdf0a3f": "将工作区端口打开为特定于工作区的 Orca localhost URL,便于区分浏览器标签页。" + "4e0fdf0a3f": "将工作区端口打开为特定于工作区的 Orca localhost URL,便于区分浏览器标签页。", + "00f82a4c3d": "在 Orca 内置浏览器中打开来自终端、Markdown 和编辑器的 http(s) 链接。{{shortcut}} 始终使用系统浏览器。" }, "use": { "search": {