全局中文化

This commit is contained in:
Cheng Zhou
2026-01-12 11:14:04 +08:00
parent 9021c7fe2b
commit 1338fa7e2b
103 changed files with 2443 additions and 1533 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
import { usePermission } from "../utils/permission";
import { canDoAction, type StateMachine } from "../state-machine";
import { TEXT } from "../locales";
export interface ActionContext {
actorRole?: string | null;
@@ -27,7 +28,7 @@ export const evaluateAction = (context: ActionContext): ActionDecision => {
return {
allowed: false,
severity: "violation",
reason: "无权限执行该操作",
reason: TEXT.common.messages.noPermission,
auditType: "UNAUTHORIZED_ACTION_ATTEMPT",
};
}
@@ -36,7 +37,7 @@ export const evaluateAction = (context: ActionContext): ActionDecision => {
return {
allowed: false,
severity: "warning",
reason: "当前状态不允许该操作",
reason: TEXT.common.messages.invalidStateAction,
auditType: "INVALID_STATE_TRANSITION_ATTEMPT",
};
}