docs: 中文 README 与英文版同步
Some checks failed
Tests / test (push) Has been cancelled

中文版一直是上游的旧内容,和英文版已经完全对不上:虾盘云首选卡片、
10 个中国技能、QQ 列为预装、还夹着上游另一个产品的推广段落。312 → 165 行。

现在两版讲同一个产品,面向新加坡的华语用户,而不是中国市场。

顺带修掉一条和事实相反的建议:中文版原来写着「U 盘请用 NTFS 格式(不要
exFAT/FAT32)」。macOS 对 NTFS 只读 —— 照做的话「配置跟着盘走」在 Mac 上
直接失效,首次启动连配置都写不进去。这和 release.yml 里那条是同一个错误,
两处都改了。

英文版补上 fork 说明(原来只写在 CLAUDE.md 里),两版现在都写明这是
dongsheng123132/u-claw 的分支、且不向上游提交。

新增断言 tests/i18n-pages.test.mjs:两版必须互链、必须都写明是 fork、
必须都建议 exFAT 且不得出现推荐 NTFS 的措辞、中文版不得再出现英文版
已经删掉的那批上游内容。这条断言的存在是因为它们上次就是这么漂开的。
This commit is contained in:
2026-08-17 19:29:03 +08:00
parent 45026b9d35
commit d2cd9d4528
3 changed files with 137 additions and 246 deletions

View File

@@ -310,3 +310,32 @@ test('persona skills install through the one shared installer', () => {
assert.match(server, /'\.\.', '\.\.', 'lib', 'install-skills\.mjs'/, 'the checkout fallback path is missing');
assert.match(server, /'--persona', persona/, 'it should filter by persona');
});
test('the two READMEs describe the same product', () => {
// They drifted badly before: the English one had been rewritten for the fork
// while the Chinese one still pitched the upstream China-market build —
// relay service first, ten China-platform skills, QQ pre-installed.
const en = read('README.md');
const zh = read('README.zh-CN.md');
for (const [name, body] of [['README.md', en], ['README.zh-CN.md', zh]]) {
// Both must link to the other, or half the audience is stranded.
assert.match(body, name === 'README.md' ? /README\.zh-CN\.md/ : /README\.md/, `${name} should link to the other language`);
// Both must say this is a fork. Claiming otherwise misrepresents whose work it is.
assert.match(body, /dongsheng123132\/u-claw/, `${name} should name the upstream project`);
// The file-system guidance is a correctness issue, not a preference:
// macOS cannot write NTFS, so an NTFS drive breaks the whole premise.
assert.match(body, /exFAT/, `${name} should say to format the drive exFAT`);
assert.doesNotMatch(
body,
/(use|请用|格式化).{0,12}NTFS/i,
`${name} appears to recommend NTFS, which macOS cannot write to`,
);
}
// Anything the English one dropped for being upstream's pitch must be gone
// from the Chinese one too.
for (const stale of ['虾盘云', '免翻墙', '国内镜像', '小红书', 'hecare888']) {
assert.ok(!zh.includes(stale), `README.zh-CN.md still carries upstream's "${stale}"`);
}
});