优化: CR-08 i18n batch2全量(ProjectDetail5处+TaskDetail16key+AiChat3处+store error fallback 23处+useAiSend 3处)+@/i18n路径统一+vite别名

This commit is contained in:
2026-06-15 15:06:21 +08:00
parent d6eb8551da
commit 6254d06c7a
24 changed files with 181 additions and 34 deletions

View File

@@ -12,5 +12,7 @@ export default {
errorNetwork: 'Network connection failed. Please check your network.',
streamInterruptedAfterTool: '⚠ The tool finished, but the following reply was interrupted (no data stream for a long time). You can click Continue to retry.',
streamInterrupted: '⚠ The response was interrupted (no data stream for a long time). This may be due to a network disconnection or a backend error. Please try again.',
queueFull: 'Send queue is full (max {limit} items)',
approvalNotDelivered: 'Approval operation failed to reach the backend: {error}',
},
}

View File

@@ -60,5 +60,8 @@ export default {
// ── Confirm dialog ──
confirmDeleteConversation: 'Delete chat "{title}"? This cannot be undone.',
clearChat: 'Clear',
confirmClearChat: 'Are you sure you want to clear all messages in this chat? This cannot be undone.',
toastSendFail: 'Send failed: {msg}',
},
}

View File

@@ -76,5 +76,11 @@ export default {
confirmDelete: 'Delete idea "{title}"? This cannot be undone.',
promoteFailed: 'Promotion failed',
evalFailed: 'Evaluation failed',
// Error fallbacks (user-visible via state.error)
err: {
loadFailed: 'Failed to load ideas',
createFailed: 'Failed to create idea',
deleteFailed: 'Failed to delete idea',
},
},
}

View File

@@ -74,5 +74,17 @@ export default {
deployment_note: 'Deployment Note',
workflow_optimization: 'Workflow Optimization',
},
// Error fallbacks (user-visible via state.error)
err: {
loadFailed: 'Failed to load knowledge base',
loadInboxFailed: 'Failed to load inbox',
searchFailed: 'Search failed',
createFailed: 'Failed to create knowledge',
updateStatusFailed: 'Failed to update status',
archiveFailed: 'Failed to archive',
loadConfigFailed: 'Failed to load config',
saveConfigFailed: 'Failed to save config',
extractFailed: 'Extraction failed',
},
},
}

View File

@@ -55,6 +55,14 @@ export default {
relocateConfirmRelocate: 'Relocate project directory to:\n{dir}\n\nTech stack will be re-detected. Confirm?',
relocateConfirmBind: 'Bind project directory to:\n{dir}\n\nTech stack will be re-detected. Confirm?',
relocateFailed: 'Relocate failed: {msg}',
// Import directory
importDir: 'Import Directory',
importConfirm: 'Import as new project?\n{dir}\n\nThe directory name will be used as project name, tech stack will be detected, and README first section will fill description.',
importSuccess: 'Imported project "{name}"',
importFailed: 'Import failed: {msg}',
// Approval actions
approvalConfirm: 'Confirm ({count})',
approvalCancel: 'Cancel',
// Tech stack
techStackLabel: 'Tech Stack',
},

View File

@@ -45,5 +45,16 @@ export default {
cancelled: '❌ Cancelled',
active: '🚀 In Progress',
},
// Error fallbacks (user-visible via state.error)
err: {
loadFailed: 'Failed to load projects',
createFailed: 'Failed to create project',
importFailed: 'Failed to import project',
deleteFailed: 'Failed to delete project',
loadTrashFailed: 'Failed to load trash',
restoreFailed: 'Failed to restore project',
purgeFailed: 'Failed to delete permanently',
loadWorkflowFailed: 'Failed to load workflow records',
},
},
}

24
src/i18n/en/taskDetail.ts Normal file
View File

@@ -0,0 +1,24 @@
export default {
taskDetail: {
// Header
backToList: '← Back to Tasks',
refresh: 'Refresh',
// Status hints
loading: 'Loading...',
loadFailed: 'Failed to load',
// Panel
infoTitle: 'Task Info',
// Field labels
title: 'Title',
description: 'Description',
status: 'Status',
priority: 'Priority',
project: 'Project',
branch: 'Branch',
assignee: 'Assignee',
baseBranch: 'Base Branch',
workflowDef: 'Workflow Definition',
createdAt: 'Created At',
updatedAt: 'Updated At',
},
}

View File

@@ -52,5 +52,11 @@ export default {
merged: '✅ Merged',
abandoned: '🗑️ Abandoned',
},
// Error fallbacks (user-visible via state.error)
err: {
loadFailed: 'Failed to load tasks',
createFailed: 'Failed to create task',
deleteFailed: 'Failed to delete task',
},
},
}

View File

@@ -12,5 +12,7 @@ export default {
errorNetwork: '网络连接失败,请检查网络',
streamInterruptedAfterTool: '⚠ 工具已执行完成,后续回复中断(长时间无数据流)。可点继续重试。',
streamInterrupted: '⚠ 响应中断(长时间无数据流)。可能是网络断连或后端异常,请重试。',
queueFull: '待发送队列已满(最多 {limit} 条)',
approvalNotDelivered: '审批操作未送达后端:{error}',
},
}

View File

@@ -60,5 +60,8 @@ export default {
// ── 确认弹层 ──
confirmDeleteConversation: '确定删除对话「{title}」?该操作不可恢复。',
clearChat: '清空',
confirmClearChat: '确定清空当前对话的所有消息?此操作不可恢复。',
toastSendFail: '发送失败:{msg}',
},
}

View File

@@ -76,5 +76,11 @@ export default {
confirmDelete: '确定删除灵感「{title}」?此操作不可撤销。',
promoteFailed: '立项失败',
evalFailed: '评估失败',
// 错误回退(state.error 用户可见)
err: {
loadFailed: '加载灵感失败',
createFailed: '创建灵感失败',
deleteFailed: '删除灵感失败',
},
},
}

View File

@@ -90,5 +90,17 @@ export default {
deployment_note: '部署经验',
workflow_optimization: '工作流优化',
},
// 错误回退(state.error 用户可见)
err: {
loadFailed: '加载知识库失败',
loadInboxFailed: '加载收件箱失败',
searchFailed: '检索失败',
createFailed: '创建知识失败',
updateStatusFailed: '更新状态失败',
archiveFailed: '归档失败',
loadConfigFailed: '加载配置失败',
saveConfigFailed: '保存配置失败',
extractFailed: '立即抽取失败',
},
},
}

View File

@@ -55,6 +55,14 @@ export default {
relocateConfirmRelocate: '将项目目录重定位到:\n{dir}\n\n技术栈将重新探测。确认?',
relocateConfirmBind: '将项目目录绑定到:\n{dir}\n\n技术栈将重新探测。确认?',
relocateFailed: '重定位失败: {msg}',
// 导入目录
importDir: '导入目录',
importConfirm: '导入目录为新项目?\n{dir}\n\n将自动用目录名作项目名,探测技术栈,并读 README 首段填描述。',
importSuccess: '已导入项目「{name}」',
importFailed: '导入失败: {msg}',
// 审批操作
approvalConfirm: '确认({count})',
approvalCancel: '取消',
// 技术栈
techStackLabel: '技术栈',
},

View File

@@ -44,5 +44,16 @@ export default {
cancelled: '❌ 已取消',
active: '🚀 进行中',
},
// 错误回退(state.error 用户可见)
err: {
loadFailed: '加载项目失败',
createFailed: '创建项目失败',
importFailed: '导入项目失败',
deleteFailed: '删除项目失败',
loadTrashFailed: '加载回收站失败',
restoreFailed: '恢复项目失败',
purgeFailed: '彻底删除失败',
loadWorkflowFailed: '加载工作流记录失败',
},
},
}

View File

@@ -0,0 +1,24 @@
export default {
taskDetail: {
// 头部
backToList: '← 返回任务列表',
refresh: '刷新',
// 状态提示
loading: '加载中...',
loadFailed: '加载失败',
// 面板
infoTitle: '任务信息',
// 字段标签
title: '标题',
description: '描述',
status: '状态',
priority: '优先级',
project: '关联项目',
branch: '分支',
assignee: '负责人',
baseBranch: '基础分支',
workflowDef: '工作流定义',
createdAt: '创建时间',
updatedAt: '更新时间',
},
}

View File

@@ -52,5 +52,11 @@ export default {
merged: '✅ 已合并',
abandoned: '🗑️ 已放弃',
},
// 错误回退(state.error 用户可见)
err: {
loadFailed: '加载任务失败',
createFailed: '创建任务失败',
deleteFailed: '删除任务失败',
},
},
}