Skip to content

fix(i18n): restore count separators in terminal theme picker for CJK locales - #9935

Merged
nwparker merged 1 commit into
stablyai:mainfrom
jeongph:fix/terminal-theme-count-separator
Jul 24, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
jeongph:fix/terminal-theme-count-separator

Conversation

@jeongph

@jeongph jeongph commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the terminal theme picker count row fusing the shown and total counts (e.g. 표시 중 3030 중) in Korean, Japanese, and Chinese locales.

ELI5

In the terminal theme settings, Korean/Japanese/Chinese users saw two numbers mashed together like "3030" instead of "30/30". This restores the missing separator so the count reads correctly.

Root cause & fix

The count row concatenates translated fragments directly after the visible count, and the English fragment carries a leading separator/space that the machine-translated ko/ja/zh values dropped — fusing the shown and total numbers (and, while searching, the count and quoted query). The fix pins locale overrides so repairTranslatedValue returns the separator-preserving values (/{{value0}} for the total, and a space-prefixed search-match fragment) and regenerates the ko/ja/zh catalogs to match. The change is data-only (translation strings + override table); no logic path is altered.

Evidence

Validated & rebased onto latest main during a bug-bash triage on 2026-07-23. Rebase was clean onto origin/main.

  • Test: config/scripts/locale-count-fragment-separator.test.mjs — 2 tests pass on branch.
  • Reverting the 5 fix files makes both tests fail, proving the test captures the bug.
  • Lint clean: oxlint on the changed .mjs and test file exits 0.
# On branch:
Test Files  1 passed (1) | Tests  2 passed (2)

# Fix files reverted to origin/main:
Tests  2 failed (2)
  - expected '/{{value0}}' received '{{value0}} 중'
  - expected ' "{{value0}}"과(와) 일치' received '"{{value0}}"과(와) 일치'

Trade-offs

None — pure fix.

Regression risk

Zero-regression: the change touches only translation catalog strings and the override table for ko/ja/zh; no code path or non-affected locale (e.g. es) is modified. Values flow unchanged through the existing repair pipeline, and the passing test guards against catalog regeneration re-dropping the separators.

Credit to @jeongph (JeongUk Park) for the original fix. Validated, rebased, and (where applicable) hardened via automated bug-bash review; original fix design preserved.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Updated Korean, Japanese, and Chinese settings-form translations and override mappings to preserve slash separators between count fragments and leading spaces before search-match fragments. Added Vitest coverage verifying repairTranslatedValue produces the required CJK formatting.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary and testing, but it omits required template sections like Screenshots, AI Review Report, Security Audit, and Notes. Add the missing template sections, especially Screenshots, AI Review Report, Security Audit, and Notes, and include the required testing checklist items.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title clearly matches the PR’s main change: restoring CJK count separators in the terminal theme picker.

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.

…locales

The theme picker count row concatenates "Showing {count}" directly with
the " of {{value0}}" fragment. The ko/ja/zh translations dropped the
fragment's leading separator, so the shown and total counts fused
(e.g. Korean rendered "표시 중 3030 중" instead of "표시 중 30/30").

Restore a slash separator for the total-count fragment and the leading
space for the search-match fragment in ko/ja/zh, in both the runtime
catalogs and the key-override sources so catalog regeneration keeps the
repaired values. Add a regression test covering both fragments.

🤖 Generated with Claude Code
@nwparker
nwparker force-pushed the fix/terminal-theme-count-separator branch from adaff5f to b10d0c5 Compare July 23, 2026 11:49
@nwparker
nwparker merged commit fc181a8 into stablyai:main Jul 24, 2026
@nwparker

Copy link
Copy Markdown
Contributor

Thanks so much for this, @jeongph — restore count separators in terminal theme picker for CJK locales. Verified (fail-on-main/pass-on-branch), rebased on latest main, reviewed, and merged. Really appreciate it! 🙏

@nwparker

Copy link
Copy Markdown
Contributor

Before/after for the CJK theme-picker count separator:

Terminal theme picker — CJK count separator fix (#9935)

The theme-picker count row renders Showing + space + {count} immediately
followed by a translated fragment. Machine-translated ko/ja/zh values dropped the
leading separator the English fragment carries (" of {{value0}}"), so the two
numbers fused into 3030.

BEFORE (broken) — total-count row, 30 of 30 themes

Locale Rendered Problem
ko 표시 중 3030 중 shown/total fuse → 3030
ja 表示中 3030の shown/total fuse → 3030
zh 显示中 3030 的 shown/total fuse → 3030

AFTER (fixed)

Locale Rendered
ko 표시 중 30/30
ja 表示中 30/30
zh 显示中 30/30

BEFORE / AFTER — search-match fragment (while filtering)

Locale Before (fused) After (space-separated)
ko 3"쿼리"과(와) 일치 3 "쿼리"과(와) 일치
ja 3「쿼리」に一致 3 「쿼리」に一致
zh 3匹配"쿼리" 3 匹配"쿼리"

Verification

config/scripts/locale-count-fragment-separator.test.mjs (2 tests):

  • On branch: 2 passed.
  • Reverting the fix (locale-cross-locale-key-overrides.mjs, locale-ko-key-overrides.json)
    to origin/main: 2 failed — proving the test captures the bug.

Data-only change (translation catalog strings + cross-locale override table);
no logic path altered. Clean rebase onto current origin/main.

enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…locales (stablyai#9935)

The theme picker count row concatenates "Showing {count}" directly with
the " of {{value0}}" fragment. The ko/ja/zh translations dropped the
fragment's leading separator, so the shown and total counts fused
(e.g. Korean rendered "표시 중 3030 중" instead of "표시 중 30/30").

Restore a slash separator for the total-count fragment and the leading
space for the search-match fragment in ko/ja/zh, in both the runtime
catalogs and the key-override sources so catalog regeneration keeps the
repaired values. Add a regression test covering both fragments.

🤖 Generated with Claude Code
@jeongph
jeongph deleted the fix/terminal-theme-count-separator branch October 17, 2026 13:13
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.

3 participants