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

+12 -12
View File
@@ -97,7 +97,7 @@ import { cn, formatBytes } from "~/lib/utils.ts";
const HEALTH_REASON: Record<string, string> = {
root_missing: "挂载点不存在",
sentinel_missing: "目录里没有哨兵文件,挂载可能没生效",
sentinel_missing: "目录里没有哨兵文件,挂载可能没生效",
timeout: "探测超时",
permission_denied: "没有读取权限",
};
@@ -365,7 +365,7 @@ export default function FilesPage() {
setQInput("");
};
const open = (e: FileEntry) => {
if (e.escape) return toast.error("链接指向登记目录之外,不能打开");
if (e.escape) return toast.error("链接指向登记目录之外,不能打开");
if (e.type === "dir") go({ root: rootId, path: e.path });
else patch({ sel: e.path, idf: null });
};
@@ -397,7 +397,7 @@ export default function FilesPage() {
{
onSuccess: (r) => {
const ok = r.items.filter((i) => i.status === "ok").length;
toast.success(`探测完成:${ok}/${r.items.length} 个读到媒体信息`, {
toast.success(`探测完成:${ok}/${r.items.length} 个读到媒体信息`, {
description: r.items.some((i) => i.savedToAsset) ? "媒体信息已写入资产" : "未登记文件的结果缓存 24 小时",
});
},
@@ -598,7 +598,7 @@ export default function FilesPage() {
<p className="mt-1.5 max-w-md text-caption text-muted-foreground">
{offline ? filesErrorText(list.error) : healthReasonText(root.healthReason)}。离线期间资产状态不变。
</p>
<p className="mt-1 text-meta text-muted-foreground">上次检查:{relTime(root.checkedAt)}</p>
<p className="mt-1 text-meta text-muted-foreground">上次检查:{relTime(root.checkedAt)}</p>
<Button
variant="outline"
size="sm"
@@ -629,7 +629,7 @@ export default function FilesPage() {
plain
icon={SearchX}
title="没有符合筛选的项"
description={q ? `没有匹配“${q}”的项。支持子串和 glob,如 *.mkv` : undefined}
description={q ? `没有匹配「${q}」的项。支持子串和 glob,如 *.mkv` : undefined}
action={
<Button variant="outline" size="sm" onClick={clearFilters}>
<X />
@@ -682,7 +682,7 @@ export default function FilesPage() {
const blockedTip = (op: Parameters<typeof opDisabledReason>[0]) => {
if (!root) return null;
const bad = selected.map((e) => opDisabledReason(op, e, root)).filter(Boolean) as string[];
return bad.length ? `${bad[0]}(${bad.length} 项)` : null;
return bad.length ? `${bad[0]}(${bad.length} 项)` : null;
};
const moreItems = (): MenuItem[] => {
const items: MenuItem[] = [];
@@ -706,7 +706,7 @@ export default function FilesPage() {
.filter((e) => opApplies("identify", e))
.map((e) => (root ? opDisabledReason("organize", e, root) : null))
.filter(Boolean) as string[];
return bad.length ? `${bad[0]}(${bad.length} 项)` : null;
return bad.length ? `${bad[0]}(${bad.length} 项)` : null;
})();
const moveTip = blockedTip("move");
const deleteTip = blockedTip("delete");
@@ -796,7 +796,7 @@ export default function FilesPage() {
}
if (e.key === "ArrowDown") gridRef.current?.focus();
}}
placeholder="名称或 glob,如 *.mkv"
placeholder="名称或 glob,如 *.mkv"
aria-label="搜索当前目录"
className="h-8 pl-9"
/>
@@ -819,7 +819,7 @@ export default function FilesPage() {
<Button
variant="ghost"
size="icon-sm"
aria-label={order === "asc" ? "升序,点此改为降序" : "降序,点此改为升序"}
aria-label={order === "asc" ? "升序,点此改为降序" : "降序,点此改为升序"}
title={order === "asc" ? "升序" : "降序"}
onClick={() => patch({ order: order === "asc" ? "desc" : null })}
>
@@ -861,7 +861,7 @@ export default function FilesPage() {
key: "mkdir",
label: "新建目录",
icon: FolderPlus,
disabled: root?.writable ? null : root?.kind === "download" ? "下载目录里不能新建目录" : "只读目录,不能新建",
disabled: root?.writable ? null : root?.kind === "download" ? "下载目录里不能新建目录" : "只读目录,不能新建",
onSelect: () => setDialog({ kind: "mkdir" }),
},
{
@@ -1046,7 +1046,7 @@ export default function FilesPage() {
? undefined
: root?.kind === "download"
? "下载目录里不能新建目录"
: "只读目录,不能新建"
: "只读目录,不能新建"
}
>
<Button
@@ -1070,7 +1070,7 @@ export default function FilesPage() {
{first?.truncated ? (
<div role="status" className="border-b border-warning/30 bg-warning/10 px-3 py-1.5 text-meta text-warning">
目录过大,只读了前 {first.total.toLocaleString("zh-CN")} 项。用搜索或进入子目录。
目录过大,只读了前 {first.total.toLocaleString("zh-CN")} 项。用搜索或进入子目录。
</div>
) : null}