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": "このブランチをオリジンに公開します",