style(copy): punctuation rules and site-wide fix with a CI check (QA U11)

- glossary: 10 punctuation rules (full-width in Chinese, CJK/Latin spacing,
  full-width parens around Chinese, single ellipsis, 「」 quotes, period rules)
- scripts/check-copy-punctuation.mjs: checks string literals, templates and JSX
  text (not comments, types, keys, match/compare strings); --fix, --strict,
  --by-file; wired into deno task ci as check:copy in warn mode
- --fix applied to web, server and contracts; files other lanes were editing
  (subscriptions, sites, browser, agent, auth/account, inventory) left for them
- tests updated for the changed messages

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-28 20:09:29 +08:00
1 parent 9b017906cf
commit 52402864d6
143 files changed
+985 -606

No files matched your search

+15
View File
@@ -54,3 +54,18 @@
10. 标题、按钮、标签、Toast 末尾不加句号。
11. 订阅登录的条款提示只陈述事实:借用哪个官方客户端身份、可能违反条款、账号可能被限流或封禁;不劝阻,不美化。
12. 给模型看的文字(巡检目标、调查提示)同样适用:具体、短,用界面同一套术语。
## 标点
界面文字、错误信息、给模型看的提示都按这一节写。`deno task check:copy`(`scripts/check-copy-punctuation.mjs`)检查源码里的字符串字面量与 JSX 文本,`--fix` 自动改能确定的项;确需例外的行写 `copy-allow: 原因`。
1. 中文句子用全角标点:`,。;:?!、`。半角 `, ; : ? !` 只出现在代码、路径、URL、键值、时间(`12:30`)和整句英文里。
2. 全角标点前后不加空格;不叠用标点(不写 `,。`、`!!`、`?!`)。
3. 括号里有中文用全角 `()`,紧贴前后文字;括号里只有英文、数字、代码时用半角 `()`,前面是英文时空一格:`Oppenheimer (2023)`、`读取失败(ENOTCONN)`。
4. 中文与英文、数字之间空一个半角空格:`3 个作品`、`打开 Agent`、`TMDB 不可用`;行首行尾和全角标点旁不加。
5. 数字与单位:`%`、`°` 紧贴数字(`80%`);英文单位空一格,与 `formatBytes` 输出一致(`1.1 TB`、`15 s`);数字和字母组成的记号连写(`1080p`、`S01E02`、`H.265`、`4K`)。
6. 省略号只用一个 `…`(U+2026),不用 `...` 或 `……`;进行中状态写 `加载中…`,菜单项"需要再选一步"写 `移动到…`。
7. 标题、按钮、标签、表头、列表项、Toast 末尾不加句号(同文案规则 10)。
8. 说明文字(空态描述、表单说明、段落)每句以句号结尾;只有一句短语时可以不加。
9. 错误信息:一句不加句号;两句("发生了什么。怎么办")句间用句号,末尾不加。
10. 引用界面上的词、用户起的名字用直角引号 `「」`(`勾选「同时退役资产」`、`删除「默认规则」?`),不用 `“”` 或 `""`;代码、命令、键名用代码样式,不加引号。