feat(i18n): Approval 审批模块全量国际化 — 11 文件硬编码中文改翻译键 + approval 命名空间(136 键)

迁移文件:
- pages/approval/: ApprovalWorkflowPage + ApprovalCategoryPage + 3 子页面(Resource/App/Permission)
- components/approval/: ApprovalFlow + ApprovalProcessTab + ApprovalCreateDialog + ApprovalDetailDialog + ApprovalTemplateTab + helpers

翻译键: approval 命名空间 136 键 (8 子组: category/step/status/col/editor/detail/flow/type/msg)
复用 common.* 通用键 (approve/reject/cancel/save/create/delete/edit/detail/close/loading 等)
zh-CN/en-US 完全对齐, 8 命名空间 (common/menu/header/login/dashboard/server/alert/approval)

模式: 组件内 useTranslation() + t(); 模块级常量/helpers 用 i18n.t()
labelKey 模式: STATUS_TABS/statusMap 从 label:string 改为 labelKey:string + i18n.t(config.labelKey)
This commit is contained in:
attacker committed 2026-06-29 18:25:29 +08:00
1 parent 61a1f32e64
commit fef4997391
13 files changed
+649 -292

No files matched your search

+156
View File
@@ -389,5 +389,161 @@
"minutesShort": "{{count}}m",
"prevPage": "Previous",
"nextPage": "Next"
},
"approval": {
"workflowTitle": "Approval Workflow Config",
"workflowSubtitle": "Configure multi-level approval workflows for resource, application, and permission requests",
"resourceTitle": "Resource Request",
"appTitle": "Application Request",
"permissionTitle": "Permission Approval",
"resourceDesc": "Request cloud servers, storage, network and other infrastructure resources",
"appDesc": "Request application deployment, version release, pipeline configuration",
"permissionDesc": "Request bastion, VPN, log query, database query and other ops permissions",
"newRequest": "New Request",
"newWorkflow": "New Workflow",
"createFirst": "Create your first workflow",
"submitRequest": "Submit Request",
"submitting": "Submitting...",
"retry": "Retry",
"noWorkflows": "No approval workflows",
"noRecords": "No request records",
"applyNow": "Apply Now",
"noTodo": "No pending tasks",
"noTodoDesc": "No approvals waiting for you",
"noInstances": "No approval workflows",
"noInstancesDesc": "No matching workflow instances under current filters",
"noTemplates": "No workflow templates",
"noTemplatesDesc": "No matching templates under current filters",
"noFlowNodes": "No flow nodes",
"category": {
"resource": "Resource Request",
"app": "Application Request",
"permission": "Permission Approval"
},
"step": {
"submit": "Submit Stage",
"audit": "Review Stage",
"execute": "Execute Stage",
"submitDesc": "Ticket submitter",
"auditDesc": "Reviewer approval",
"executeDesc": "Executor operation",
"submitShort": "Submit",
"auditShort": "Review",
"executeShort": "Execute",
"name": "Step name",
"number": "Step {{count}}",
"addHint": "Click the buttons above to add workflow steps"
},
"status": {
"approved": "Approved",
"rejected": "Rejected",
"pending": "Pending",
"enabled": "Enabled",
"disabled": "Disabled",
"default": "Default",
"passed": "Passed",
"waiting": "Waiting",
"notStarted": "Not started"
},
"col": {
"submitTime": "Submitted",
"submitAccount": "Submitter",
"currentApprover": "Current Reviewer",
"status": "Status",
"actions": "Actions"
},
"editor": {
"editTitle": "Edit Approval Workflow",
"newTitle": "New Approval Workflow",
"workflowName": "Workflow name",
"workflowCategory": "Category",
"workflowDesc": "Description",
"workflowSteps": "Workflow steps",
"auditUser": "Reviewer",
"executeUser": "Executor",
"pleaseSelect": "Please select",
"selectAll": "Select all",
"deselectAll": "Deselect all",
"enterName": "Enter workflow name",
"nameRequired": "Please enter a workflow name",
"addStepRequired": "Please add at least one step",
"stepNeedsApprover": "Step \"{{name}}\" needs at least one approver",
"saveFailed": "Save failed",
"people": "{{count}} people"
},
"detail": {
"title": "Request Details",
"approvalDetail": "Approval Details",
"approvalDetailDesc": "View approval workflow details",
"operationTimeline": "Operation Timeline",
"submitNode": "Submit Request",
"assignee": "Assignee",
"adminPending": "Admin (unassigned)",
"admin": "Admin",
"requestContent": "Request Content",
"approvalProgress": "Approval Progress",
"requestForm": "Request Form",
"operationLog": "Operation Log",
"applicant": "Applicant",
"submittedAt": "Submitted at",
"noApproverLinked": "No approver linked",
"stepProgress": "Step {{current}}/{{total}}",
"statusLabel": "Status: "
},
"flow": {
"title": "Resource Request",
"subtitle": "Cloud server request · Application deployment request",
"pendingApproval": "Pending Approval",
"myTodo": "My Tasks",
"tabInstances": "Instances",
"tabTemplates": "Templates",
"tabMyApprovals": "My Approvals",
"searchPlaceholder": "Search title/applicant...",
"searchRequest": "Search requests...",
"filterType": "Filter type: ",
"allTypes": "All types",
"newResourceRequest": "New Resource Request",
"selectType": "Please select request type",
"fillInfo": "Please fill in the request info",
"backToSelect": "← Back to type selection",
"noTemplateAvailable": "No template available",
"fieldCount": "{{count}} fields",
"nodeCount": "{{count}} nodes",
"createdOn": "Created on",
"approvalPassed": "Approval passed",
"pleaseSelectType": "Please select a request type first",
"pleaseFillField": "Please fill in {{label}}",
"approveTitle": "Approve",
"rejectTitle": "Reject",
"commentPlaceholder": "Enter approval comment (optional)",
"approveConfirm": "Confirm Approve",
"rejectConfirm": "Confirm Reject",
"loadFailed": "Failed to load approval data"
},
"type": {
"serverApply": "Cloud Server Request",
"appDeploy": "Application Deployment Request",
"deploy": "Deploy Approval",
"server": "Server Operation",
"permission": "Permission Request",
"general": "General Approval"
},
"msg": {
"fetchFailed": "Failed to load approval workflows",
"submitSuccess": "Request submitted",
"submitFailed": "Submit failed",
"approveSuccess": "Approved",
"rejectSuccess": "Rejected",
"approveFailed": "Approval failed",
"deleted": "Deleted",
"deleteFailed": "Delete failed",
"setDefaultSuccess": "Set as default",
"disabled": "Disabled",
"enabled": "Enabled",
"deleteTitle": "Delete Approval Workflow",
"deleteConfirm": "Are you sure to delete workflow \"{{name}}\"? This cannot be undone.",
"templateNotLoaded": "Template not loaded",
"pleaseFill": "Please fill in \"{{label}}\""
}
}
}