From 8dff555db45e121125da1ab9d6f46189725dc9a4 Mon Sep 17 00:00:00 2001 From: Yaosanqi137 Date: Mon, 6 Apr 2026 00:26:33 +0800 Subject: [PATCH] fix(web-task): localize task status labels --- apps/web/src/pages/todo-shell-page.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/apps/web/src/pages/todo-shell-page.tsx b/apps/web/src/pages/todo-shell-page.tsx index 9787504..9af63ad 100644 --- a/apps/web/src/pages/todo-shell-page.tsx +++ b/apps/web/src/pages/todo-shell-page.tsx @@ -66,6 +66,20 @@ const STATUS_OPTIONS: Array<{ value: LocalTaskStatus; label: string }> = [ { value: "ARCHIVED", label: "已归档" } ]; +const PRIORITY_LABEL_MAP: Record = { + LOW: "低", + MEDIUM: "中", + HIGH: "高", + URGENT: "紧急" +}; + +const STATUS_LABEL_MAP: Record = { + TODO: "待办", + IN_PROGRESS: "进行中", + DONE: "已完成", + ARCHIVED: "已归档" +}; + function toDatetimeLocalValue(timestamp: number | null): string { if (timestamp === null) { return ""; @@ -457,7 +471,8 @@ export function TodoShellPage({ session }: TodoShellPageProps) { >

{task.title}

- {task.status} · {task.priority} · 更新于 {formatUpdatedAt(task.updatedAt)} + {STATUS_LABEL_MAP[task.status]} · {PRIORITY_LABEL_MAP[task.priority]} · 更新于{" "} + {formatUpdatedAt(task.updatedAt)}

);