fix(i18n): restore count separators in terminal theme picker for CJK locales (#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
This commit is contained in:
JeongUk Park 2026-07-24 16:26:39 +09:00 committed by GitHub
parent e3cc08f185
commit fc181a8496
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 61 additions and 7 deletions

View File

@ -0,0 +1,39 @@
import { describe, expect, it } from 'vitest'
import { repairTranslatedValue } from './locale-translation-policy.mjs'
// The theme-picker count row renders "Showing {count}" immediately followed by one of these
// fragments, so translations must keep a leading separator or the numbers fuse ("표시 중 3030 중").
describe('locale-count-fragment-separator', () => {
it('keeps a slash between shown and total theme counts in CJK locales', () => {
const brokenByLocale = { ko: '{{value0}} 중', ja: '{{value0}}の', zh: '{{value0}} 的' }
for (const [locale, localeValue] of Object.entries(brokenByLocale)) {
expect(
repairTranslatedValue({
key: 'auto.components.settings.SettingsFormControls.cb330ef7f8',
enValue: ' of {{value0}}',
localeValue,
locale
})
).toBe('/{{value0}}')
}
})
it('keeps a leading space before the search-match fragment in CJK locales', () => {
const cases = [
['ko', '"{{value0}}"과(와) 일치', ' "{{value0}}"과(와) 일치'],
['ja', '「{{value0}}」に一致', ' 「{{value0}}」に一致'],
['zh', '匹配“{{value0}}”', ' 匹配“{{value0}}”']
]
for (const [locale, localeValue, repaired] of cases) {
expect(
repairTranslatedValue({
key: 'auto.components.settings.SettingsFormControls.c822571b2e',
enValue: ' matching "{{value0}}"',
localeValue,
locale
})
).toBe(repaired)
}
})
})

View File

@ -19,6 +19,18 @@ export const CROSS_LOCALE_KEY_OVERRIDES = {
zh: '集成',
ja: '連携'
},
// Search-match fragment concatenated flush after the visible theme count; MT dropped the
// en leading space that separates it from the count.
'auto.components.settings.SettingsFormControls.c822571b2e': {
zh: ' 匹配“{{value0}}”',
ja: ' 「{{value0}}」に一致'
},
// Total-count fragment on the same row; without the separator "Showing 30 of 30"
// rendered as "表示中 3030の" / "显示中 3030 的".
'auto.components.settings.SettingsFormControls.cb330ef7f8': {
zh: '/{{value0}}',
ja: '/{{value0}}'
},
'auto.components.settings.TasksPane.6b23a34f6d': {
zh: 'Jira',
ja: 'Jira'

View File

@ -2667,7 +2667,10 @@
"ko": "SSH를 통해 기존 머신의 파일, terminals, Git, 워크스페이스를 사용합니다."
},
"auto.components.settings.SettingsFormControls.c822571b2e": {
"ko": "\"{{value0}}\"과(와) 일치"
"ko": " \"{{value0}}\"과(와) 일치"
},
"auto.components.settings.SettingsFormControls.cb330ef7f8": {
"ko": "/{{value0}}"
},
"auto.components.settings.SettingsFormControls.fbb428db98": {
"ko": "선택됨:"

View File

@ -6634,8 +6634,8 @@
"fbb428db98": "選択済み:",
"fac59213fc": "組み込みテーマを検索する",
"search_terminal_themes": "terminal テーマを検索",
"cb330ef7f8": "{{value0}}",
"c822571b2e": "「{{value0}}」に一致",
"cb330ef7f8": "/{{value0}}",
"c822571b2e": " 「{{value0}}」に一致",
"3119c012a5": "文字列"
},
"SettingsSidebar": {

View File

@ -6593,8 +6593,8 @@
"4e11f87ca6": "표시 중",
"fbb428db98": "선택됨:",
"fac59213fc": "내장 테마 검색",
"cb330ef7f8": "{{value0}}",
"c822571b2e": "\"{{value0}}\"과(와) 일치",
"cb330ef7f8": "/{{value0}}",
"c822571b2e": " \"{{value0}}\"과(와) 일치",
"3119c012a5": "문자열",
"builtin_themes": "기본 제공",
"imported_from": "{{value0}}에서 가져옴",

View File

@ -6593,8 +6593,8 @@
"4e11f87ca6": "显示中",
"fbb428db98": "已选择:",
"fac59213fc": "搜索内置主题",
"cb330ef7f8": "{{value0}}",
"c822571b2e": "匹配“{{value0}}”",
"cb330ef7f8": "/{{value0}}",
"c822571b2e": " 匹配“{{value0}}”",
"3119c012a5": "字符串",
"builtin_themes": "内置",
"imported_from": "从 {{value0}} 导入",