From 8978a9f65bdeea5fbd0c066fee8d88758bedb489 Mon Sep 17 00:00:00 2001 From: Evgenii Date: Mon, 12 Oct 2026 20:12:09 +0700 Subject: [PATCH] fix(i18n): name commits in Korean in the compare-summary tooltip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Korean pair for the "commits ahead" tooltip was copied from compareBaseCommitsAheadOne/Other, which keep the English "commit" and "commits". Both sentences now say 커밋 with the 개 counter, the form #27907 uses for its Korean count sentences, so the tooltip no longer carries an English plural. The locale test also requires ja, ko and zh to use one sentence for both counts. It fails on the previous Korean pair. --- src/renderer/src/i18n/count-sentence-locales.test.ts | 12 ++++++++++++ src/renderer/src/i18n/locales/ko.json | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/i18n/count-sentence-locales.test.ts b/src/renderer/src/i18n/count-sentence-locales.test.ts index a7604878bfc..1d1606702a0 100644 --- a/src/renderer/src/i18n/count-sentence-locales.test.ts +++ b/src/renderer/src/i18n/count-sentence-locales.test.ts @@ -58,4 +58,16 @@ describe('count sentences in the bundled locales', () => { expect(renderCountSentence(baseKey, 3, values), baseKey).not.toMatch(LATIN_S_AFTER_CJK) } }) + + // Why: these languages do not inflect for number, so a pair that differs carries an + // English plural inside the sentence ("commit"/"commits"). + it.each(['ja', 'ko', 'zh'])('%s uses one sentence for one and several', async (locale) => { + await i18n.changeLanguage(locale) + for (const [baseKey, values] of COUNT_SENTENCES) { + const options = { ...values, count: 3, defaultValue: '' } + expect(i18n.t(`${baseKey}Plural`, options), baseKey).toBe( + i18n.t(`${baseKey}Singular`, options) + ) + } + }) }) diff --git a/src/renderer/src/i18n/locales/ko.json b/src/renderer/src/i18n/locales/ko.json index 6695ae57f26..230a275744a 100644 --- a/src/renderer/src/i18n/locales/ko.json +++ b/src/renderer/src/i18n/locales/ko.json @@ -13492,8 +13492,8 @@ "compare": { "summary": { "dd72a6fd37": "{{value0}}은 {{value2}}보다 먼저 {{value1}}을 커밋합니다.", - "commitsAheadSingular": "{{ref}}보다 {{count}} commit 앞서 있음", - "commitsAheadPlural": "{{ref}}보다 {{count}} commits 앞서 있음" + "commitsAheadSingular": "{{ref}}보다 커밋 {{count}}개 앞서 있음", + "commitsAheadPlural": "{{ref}}보다 커밋 {{count}}개 앞서 있음" } }, "conflict": {