fix(downloads): humanized reasons and TechInfo on the download panel (DL-2b)
- board organize hint uses DEAI-2 reasonLine; add transfer_failed, blocked, blocked_by_conflict, main_failed, not_imported_kind, target_root_not_managed, download_removed to the reason table with tests - download detail / plans tab: internal ids, raw codes and JSON moved into TechInfo - library versions tech block switched to TechInfo (TODO(DEAI-2)) - copy: glossary terms (no 接管/候选), plan reason codes no longer shown raw Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
8315ece4d1
commit
3f1c4d6c3b
11 files changed
+105
-65
No files matched your search
@@ -10,6 +10,14 @@ describe("reasonText(DEAI-2 原因码人话化)", () => {
|
||||
expect(reasonText("below_min_size")?.text).toContain("最小体积");
|
||||
});
|
||||
|
||||
it("下载面板用到的码(DL-2b):整理失败、冲突、下载被删", () => {
|
||||
expect(reasonSentence("transfer_failed")).toBe("文件没有整理成功。在整理记录里查看失败的文件");
|
||||
expect(reasonSentence("blocked")).toBe("有冲突要先处理。去待处理");
|
||||
expect(reasonText("download_removed")?.text).toBe("下载任务已从下载器删除");
|
||||
expect(reasonText("target_root_not_managed")?.text).toContain("本工具管理");
|
||||
for (const c of ["blocked_by_conflict", "main_failed", "not_imported_kind"]) expect(reasonText(c)).not.toBeNull();
|
||||
});
|
||||
|
||||
it("不认识的码返回 null;句子兜底不把码原样给人看", () => {
|
||||
expect(reasonText("some_new_code")).toBeNull();
|
||||
expect(reasonSentence("some_new_code")).toBe("处理失败");
|
||||
|
||||
Reference in new issue
Block a user