Guard Chinese locale Claude brand wording
This commit is contained in:
parent
4b59ca1c8b
commit
f8bfcc2d0b
1 changed files with 24 additions and 0 deletions
24
test/features/localization/renderer/zhBrandTerms.test.ts
Normal file
24
test/features/localization/renderer/zhBrandTerms.test.ts
Normal file
|
|
@ -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(
|
||||||
|
'克劳德'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
Loading…
Reference in a new issue