From d4f2ae14540719749cc2ced55ec2799327bd00f0 Mon Sep 17 00:00:00 2001 From: Iris-Fla <103801589+Iris-Fla@users.noreply.github.com> Date: Tue, 4 Aug 2026 01:47:29 -0700 Subject: [PATCH] fix(i18n): correct ja Push/Pull button translations (#12301) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The source-control primary action rendered 押す ("press") and 引く ("pull a physical object") for Push/Pull. プッシュ/プル match the sibling フォースプッシュ and 同期 labels. A guard test pins both so bootstrap re-translation cannot silently regress them. Co-authored-by: Iris-Fla <103801589+Iris-Fla@users.noreply.github.com> --- ...-technical-literal-mistranslations.test.ts | 42 +++++++++++++++++++ src/renderer/src/i18n/locales/ja.json | 4 +- 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 src/renderer/src/i18n/ja-technical-literal-mistranslations.test.ts diff --git a/src/renderer/src/i18n/ja-technical-literal-mistranslations.test.ts b/src/renderer/src/i18n/ja-technical-literal-mistranslations.test.ts new file mode 100644 index 000000000..5067c0b8f --- /dev/null +++ b/src/renderer/src/i18n/ja-technical-literal-mistranslations.test.ts @@ -0,0 +1,42 @@ +/** + * Guards the source control "Push"/"Pull" button mistranslations so + * bootstrap re-translation cannot silently regress them. + */ +import { describe, expect, it } from 'vitest' +import ja from './locales/ja.json' + +function findByKey(node: unknown, key: string): string | undefined { + if (!node || typeof node !== 'object') { + return undefined + } + if (Array.isArray(node)) { + for (const item of node) { + const found = findByKey(item, key) + if (found !== undefined) { + return found + } + } + return undefined + } + const record = node as Record + if (typeof record[key] === 'string') { + return record[key] as string + } + for (const value of Object.values(record)) { + const found = findByKey(value, key) + if (found !== undefined) { + return found + } + } + return undefined +} + +describe('ja technical literal / sense fixes', () => { + it('translates the source control Push action as プッシュ, not 押す', () => { + expect(findByKey(ja, '95550cff15')).toBe('プッシュ') + }) + + it('translates the source control Pull action as プル, not 引く', () => { + expect(findByKey(ja, 'd64292a938')).toBe('プル') + }) +}) diff --git a/src/renderer/src/i18n/locales/ja.json b/src/renderer/src/i18n/locales/ja.json index 967b5a758..376e5a712 100644 --- a/src/renderer/src/i18n/locales/ja.json +++ b/src/renderer/src/i18n/locales/ja.json @@ -10998,8 +10998,8 @@ "ed93b4f14f": "Commit", "946a8a05ea": "このブランチの {{value0}} を作成します", "e7ffa46946": "{{value0}} を作成する", - "95550cff15": "押す", - "d64292a938": "引く", + "95550cff15": "プッシュ", + "d64292a938": "プル", "795f1509c5": "同期", "390abeab93": "フォースプッシュ", "1884cf34af": "このブランチをオリジンに公開します",