From f8bfcc2d0b7cf978523dd04d2d0e29307693d038 Mon Sep 17 00:00:00 2001 From: CharAznable <38402730+CharAznable98@users.noreply.github.com> Date: Wed, 3 Jun 2026 21:14:22 +0800 Subject: [PATCH] Guard Chinese locale Claude brand wording --- .../renderer/zhBrandTerms.test.ts | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/features/localization/renderer/zhBrandTerms.test.ts diff --git a/test/features/localization/renderer/zhBrandTerms.test.ts b/test/features/localization/renderer/zhBrandTerms.test.ts new file mode 100644 index 00000000..bc921ec7 --- /dev/null +++ b/test/features/localization/renderer/zhBrandTerms.test.ts @@ -0,0 +1,24 @@ +import { readdirSync, readFileSync } from 'node:fs'; +import path from 'node:path'; +import { describe, expect, it } from 'vitest'; + +const zhLocaleDirectory = path.join( + process.cwd(), + 'src/features/localization/renderer/locales/zh' +); + +const zhLocaleFiles = readdirSync(zhLocaleDirectory) + .filter((fileName) => fileName.endsWith('.json')) + .sort(); + +describe('zh locale brand terms', () => { + it('keeps Claude untranslated in Chinese locale copy', () => { + for (const fileName of zhLocaleFiles) { + const contents = readFileSync(path.join(zhLocaleDirectory, fileName), 'utf8'); + + expect(contents, `${fileName} should use Claude instead of 克劳德`).not.toContain( + '克劳德' + ); + } + }); +});