Skip to content

fix(i18n): localize chat font search keywords to repair main CI - #33711

Closed
brennanb2025 wants to merge 1 commit into
mainfrom
brennanb2025/main-fix-chat-font-l10n
Closed

brennanb2025 wants to merge 1 commit into
mainfrom
brennanb2025/main-fix-chat-font-l10n

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​42 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​41

Problem

Main's CI fails the "Verify localization coverage" step on every PR. #33687 (chat font family setting) added six strings the audit sees as unlocalized: the five Settings search keywords for the new Font family row (chat, font, family, typeface, typography) and the fontFamily code sample shown after the font preview sentence.

Change

  • The Font family search keywords now go through translate(), one key per keyword, the same way other Settings search entries localize keywords. Chat reuses the existing settings.appearance.chat.title key; the other four get new keys with translations in all seven locale catalogs, so searching Settings in any language finds the row.
  • fontFamily in the preview is the CSS property name shown as code, not prose, so it gets a reviewed entry in config/localization-coverage-allowlist.json instead of a translation.

No behavior change beyond search keywords matching in the user's language. bun config/scripts/audit-localization-coverage.mjs --check passes locally.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The chat font-family search entry now gets its keywords from localization strings instead of hard-coded English text. The English, Spanish, French, Japanese, Korean, Portuguese, and Chinese locale files add translated keywords. The localization coverage allowlist also includes the static fontFamily text entry.

Priority: Normal

Merge Risk: Low · up to 88f61

Some users searching in English may no longer find the chat font setting in non-English locales; restore the shared keyword behavior before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the problem, the implementation, and the local verification command. However, it omits most required template sections, including ELI5, Why, Linked Issue with an actual issue … Complete the required template sections. Add an actual linked issue, provide visual proof or state N/A with a reason, document testing and platform coverage, complete the checklist, and address the remaining review and compatibility section…
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: localizing chat font search keywords to fix localization-related CI failures.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (8 skipped: 8 unsupported.)

Full details: Description check

Explanation

The description explains the problem, the implementation, and the local verification command. However, it omits most required template sections, including ELI5, Why, Linked Issue with an actual issue link, Visual Proof or N/A, Testing checkboxes, Review, Notes, Agent skill upstream boundary, and Checklist.

Resolution

Complete the required template sections. Add an actual linked issue, provide visual proof or state N/A with a reason, document testing and platform coverage, complete the checklist, and address the remaining review and compatibility sections.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e58a1d8b-48b4-4ab2-b08b-8b2af0025aac
Commits

Reviewing files that changed from the base of the PR and between bd2f463 and 88f61a7.

Files selected for processing: 9
  • config/localization-coverage-allowlist.json
  • src/renderer/src/components/settings/chat-appearance-search.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/zh.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

Comment on lines +56 to +62
keywords: [
translate('settings.appearance.chat.title', 'Chat'),
translate('settings.appearance.chat.fontKeyword', 'font'),
translate('settings.appearance.chat.familyKeyword', 'family'),
translate('settings.appearance.chat.typefaceKeyword', 'typeface'),
translate('settings.appearance.chat.typographyKeyword', 'typography')
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

🔎 Supported by static analysis

Script executed:

git diff --no-ext-diff bd2f46359d1ebf22d7806d5eadab8bce75f6e937 88f61a7bf88f58ec7d1abf713beb69342a19eb13 -- src/renderer/src/components/settings/chat-appearance-search.ts
rg -n "keywords|SearchableSetting|translateSearchKeyword|settings.*search|search.*keyword" src/renderer/src/components/settings src/renderer/src | head -240
rg -n "fontKeyword|familyKeyword|typefaceKeyword|typographyKeyword|chat-appearance-search" src tests config

Repository: stablyai/orca

Length of output: 36468


Script executed:

set -o pipefail
printf '%s\n' '--- relevant files ---'
rg -n -F --glob '*.ts' --glob '*.tsx' --glob '*.test.ts' --glob '*.test.tsx' \
  -e 'function translateSearchKeyword' \
  -e 'const translateSearchKeyword' \
  -e 'translateSearchKeyword' \
  -e 'SearchableSetting' \
  -e 'keywords' \
  -e 'getChatAppearanceSearchEntries' \
  src/renderer/src/components/settings src/renderer/src/hooks | head -320
printf '%s\n' '--- keyword helper ---'
helper=$(rg -l -F --glob '*.ts' 'function translateSearchKeyword' src/renderer/src/components/settings | head -1)
if [ -n "$helper" ]; then
  nl -ba "$helper"
else
  helper=$(rg -l -F --glob '*.ts' 'translateSearchKeyword' src/renderer/src/components/settings | head -1)
  [ -n "$helper" ] && nl -ba "$helper"
fi
printf '%s\n' '--- searchable setting and matcher ---'
rg -l -F --glob '*.ts' --glob '*.tsx' 'export function SearchableSetting' src/renderer/src/components/settings | while read -r f; do nl -ba "$f"; done
rg -n -F --glob '*.ts' --glob '*.tsx' \
  -e 'keywords.some' -e 'keyword.toLowerCase' -e 'entry.keywords' -e 'searchEntries' -e 'searchQuery' \
  src/renderer/src/components/settings src/renderer/src/hooks | head -240
printf '%s\n' '--- chat search and tests ---'
nl -ba src/renderer/src/components/settings/chat-appearance-search.ts
for f in src/renderer/src/components/settings/*Chat*test.tsx src/renderer/src/components/settings/*chat*test.tsx; do
  [ -f "$f" ] && { echo "### $f"; nl -ba "$f"; }
done
printf '%s\n' '--- repository guidance relevant to search/localization ---'
rg -n -i -F --glob 'AGENTS.md' --glob 'CONTRIBUTING*' --glob '*guid*' --glob '*.md' \
  -e 'settings search' -e 'search keyword' -e 'translateSearchKeyword' -e 'localiz' . | head -240 || true

Repository: stablyai/orca

Length of output: 42230


Script executed:

set -o pipefail
printf '%s\n' '--- settings-search-keywords.ts ---'
nl -ba src/renderer/src/components/settings/settings-search-keywords.ts
printf '%s\n' '--- SearchableSetting.tsx ---'
nl -ba src/renderer/src/components/settings/SearchableSetting.tsx
printf '%s\n' '--- settings search consumers ---'
rg -n -F --glob '*.ts' --glob '*.tsx' --glob '*.test.ts' --glob '*.test.tsx' \
  -e 'matchesSettingsSearch' -e 'settingsSearchQuery' -e 'keywords.some' -e 'entry.keywords' \
  src/renderer/src/components/settings src/renderer/src/hooks | head -180
printf '%s\n' '--- chat search exact block ---'
nl -ba src/renderer/src/components/settings/chat-appearance-search.ts | sed -n '1,115p'
printf '%s\n' '--- chat search tests and keyword assertions ---'
rg -n -C 8 -F --glob '*test.ts' --glob '*test.tsx' \
  -e 'getChatAppearanceSearchEntries' -e 'typeface' -e 'font' -e 'family' \
  src/renderer/src/components/settings src/renderer/src/hooks | head -260
printf '%s\n' '--- localization guidance exact relevant lines ---'
nl -ba config/localization-audit.md | sed -n '10,30p;90,105p;120,130p'

Repository: stablyai/orca

Length of output: 41665


Preserve English aliases for localized settings search.

Keyword arrays are not required to remain English-only. Use translateSearchKeyword() so each chat font keyword includes both its localized value and its English fallback.

Suggested fix
+import { translateSearchKeyword } from './settings-search-keywords'
...
-          translate('settings.appearance.chat.fontKeyword', 'font'),
-          translate('settings.appearance.chat.familyKeyword', 'family'),
-          translate('settings.appearance.chat.typefaceKeyword', 'typeface'),
-          translate('settings.appearance.chat.typographyKeyword', 'typography')
+          ...translateSearchKeyword('settings.appearance.chat.fontKeyword', 'font'),
+          ...translateSearchKeyword('settings.appearance.chat.familyKeyword', 'family'),
+          ...translateSearchKeyword('settings.appearance.chat.typefaceKeyword', 'typeface'),
+          ...translateSearchKeyword('settings.appearance.chat.typographyKeyword', 'typography')

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate: #33715 landed the same repair (allowlisted code sample, font search keywords localized while English terms still match).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant