merge: ui2/u-organize-terms
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
commit
19969c9b0b
78 files changed
+855
-345
No files matched your search
@@ -44,9 +44,35 @@ function findIssues(text) {
|
||||
push("省略号应为 …", /\.\.\.|……/g);
|
||||
push("括号内有中文应用全角括号", new RegExp(`\\([^()]*[${CJK}][^()]*\\)`, "g"));
|
||||
push("引号应为「」", /[“”]/g);
|
||||
if (termScope) push("处理状态写「整理」不写「入库」(见 glossary)", TERM_RUKU);
|
||||
return out;
|
||||
}
|
||||
|
||||
// 术语:我们只负责整理(元数据、NFO、图片、归到目录),媒体服务器有没有扫到不归本工具判断,
|
||||
// 所以表示处理状态的「已入库 / 未入库 / 入库方式 / 入库后…」一律写「整理」。只抓处理状态语境的搭配,
|
||||
// 单独的「入库」(如搜索关键词)不算。
|
||||
const TERM_RUKU =
|
||||
/(已|未|部分|核验|验证|整理|登记|原地|复制|移动|最近|新|没有|没|不|补|按集|临时作品)入库|入库(失败|中|方式|后|版本|时间|文件|位置|状态|任务)/g;
|
||||
// 其它线负责、术语替换待协调者合并的文件(清单见 .local/term-replacements.md);替换完成后删掉这一项。
|
||||
const TERM_PENDING = new Set([
|
||||
"apps/web/app/components/agent/agent-conversation.tsx",
|
||||
"apps/web/app/components/agent/mock.ts",
|
||||
"apps/web/app/components/agent/quick-goals.ts",
|
||||
"apps/web/app/api/agent.ts",
|
||||
"apps/web/app/api/tasks.ts",
|
||||
"apps/web/app/components/console/nav.ts",
|
||||
"apps/web/app/components/downloads/business-tasks.tsx",
|
||||
"apps/web/app/components/settings/automation.tsx",
|
||||
"apps/web/app/components/settings/instances.tsx",
|
||||
"apps/web/app/components/settings/library.tsx",
|
||||
"apps/web/app/components/settings/organize-sources.tsx",
|
||||
"apps/web/app/components/tasks/labels.ts",
|
||||
"apps/web/app/routes/console/home.tsx",
|
||||
"apps/web/app/routes/console/tasks.$id.tsx",
|
||||
"apps/server/src/modules/agent/report.ts",
|
||||
]);
|
||||
let termScope = true;
|
||||
|
||||
/** 能确定的自动修正;占位符 PH 视为非中文、非字母数字 */
|
||||
function fixText(text) {
|
||||
if (!CJK_RE.test(text)) return text;
|
||||
@@ -195,6 +221,7 @@ function allowed(lines, line) {
|
||||
|
||||
function processFile(file) {
|
||||
const src = readFileSync(file, "utf8");
|
||||
termScope = !TERM_PENDING.has(relative(ROOT, file));
|
||||
if (/copy-allow-file/.test(src.split("\n").slice(0, 5).join("\n"))) return { issues: [], changed: false };
|
||||
let ast;
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user