From 5dfaee07b1a80f4e879be11f7c007603263ad596 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Sun, 25 Oct 2026 17:54:29 -0700 Subject: [PATCH] fix(ci): localize the chat font family search keywords (#33715) #33687 added English-only search keywords and a code sample to the chat font setting, which fails main's localization coverage check. --- config/localization-coverage-allowlist.json | 7 +++++++ .../src/components/settings/chat-appearance-search.ts | 8 +++++++- src/renderer/src/i18n/locales/en.json | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/config/localization-coverage-allowlist.json b/config/localization-coverage-allowlist.json index a9ec45d54dd..068a29dd87d 100644 --- a/config/localization-coverage-allowlist.json +++ b/config/localization-coverage-allowlist.json @@ -96,5 +96,12 @@ "text": "fixtures ยท files named *.fixture.tsx under src/renderer/src", "dynamic": false, "count": 1 + }, + { + "filePath": "src/renderer/src/components/settings/ChatFontFamilySetting.tsx", + "kind": "jsx-text", + "text": "fontFamily", + "dynamic": false, + "count": 1 } ] diff --git a/src/renderer/src/components/settings/chat-appearance-search.ts b/src/renderer/src/components/settings/chat-appearance-search.ts index 9a6c783056d..0e5aa82034d 100644 --- a/src/renderer/src/components/settings/chat-appearance-search.ts +++ b/src/renderer/src/components/settings/chat-appearance-search.ts @@ -1,5 +1,6 @@ import { translate } from '@/i18n/i18n' import { createLocalizedCatalog } from '@/i18n/localized-catalog' +import { translateSearchKeyword } from './settings-search-keywords' import type { SettingsSearchEntry } from './settings-search' import { formatPrimaryShortcutLabel } from '@/hooks/useShortcutLabel' @@ -53,7 +54,12 @@ const getChatAppearanceCatalog = createLocalizedCatalog( 'settings.appearance.chat.fontFamilyDescription', 'Font used for messages, activity, and the message box.' ), - keywords: ['chat', 'font', 'family', 'typeface', 'typography'] + keywords: [ + ...translateSearchKeyword('settings.appearance.chat.title', 'Chat'), + ...translateSearchKeyword('settings.appearance.chat.fontFamily', 'Font family'), + ...translateSearchKeyword('settings.appearance.chat.fontKeywordTypeface', 'typeface'), + ...translateSearchKeyword('settings.appearance.chat.fontKeywordTypography', 'typography') + ] }, textSize: { targetSectionId: 'chat-text-size', diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index d25614b16da..6c67422bb7b 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -362,6 +362,8 @@ "chat": { "fontFamily": "Font family", "fontFamilyDescription": "Font used for messages, activity, and the message box.", + "fontKeywordTypeface": "typeface", + "fontKeywordTypography": "typography", "inheritFont": "Same as IDE font", "fontPreviewLabel": "Chat font preview", "fontPreview": "The quick brown fox jumps over the lazy dog.",