fix(ai): 更新提示信息为本地化文本

This commit is contained in:
kuaifan 2026-01-21 15:56:03 +00:00
parent 801d0b24ab
commit f68f759418
6 changed files with 55 additions and 23 deletions

View File

@ -368,7 +368,6 @@ class AiTaskSuggestion
'profession' => $user->profession ?? '',
'in_progress_count' => $inProgressCount,
'completed_count' => $completedCount,
'similar_count' => 0, // TODO: 计算相似任务数量
];
}

View File

@ -946,6 +946,20 @@ URL格式不正确
认可成功
选择模型
请先配置 AI 助手
请先在「AI 助手」设置中配置 OpenAI
请先在「AI 助手」设置中配置 (*)
今日未完成的工作
本周未完成的工作
本周未完成的工作
无效的建议类型
任务不存在或无权限
建议不存在
建议内容为空
AI建议指派给 (*)
AI建议关联任务 (*)
AI建议采纳(*)建议
已采纳
已忽略
消息内容格式错误
AI 调用失败
AI 返回内容为空

View File

@ -2309,4 +2309,23 @@ AI 消息助手
至任务负责人
连接失败,请重试
最多上传(*)张图片
松开以上传图片
松开以上传图片
清空历史会话
确定要清空当前场景的所有历史会话吗?
文件读取失败
无效的图片数据
图片加载失败
应用成功
请选择负责人
未知的建议类型
没有有效的子任务
已忽略
已采纳
已创建
已指派
已关联
采纳描述
指派
关联
采纳

View File

@ -213,7 +213,7 @@ export default {
task_id: taskId,
content: MarkdownConver(result.content),
}).then(() => {
$A.messageSuccess(this.$L('应用成功'));
$A.messageSuccess('应用成功');
}).catch(({msg}) => {
$A.modalError(msg);
});
@ -228,7 +228,7 @@ export default {
//
const userid = params.get('userid');
if (!userid || isNaN(parseInt(userid, 10))) {
$A.modalError(this.$L('请选择负责人'));
$A.modalError('请选择负责人');
return;
}
const newUserId = parseInt(userid, 10);
@ -241,7 +241,7 @@ export default {
task_id: taskId,
owner: owners,
}).then(() => {
$A.messageSuccess(this.$L('应用成功'));
$A.messageSuccess('应用成功');
}).catch(({msg}) => {
$A.modalError(msg);
});
@ -249,11 +249,11 @@ export default {
case 'similar':
//
$A.messageSuccess(this.$L('应用成功'));
$A.messageSuccess('应用成功');
break;
default:
$A.modalError(this.$L('未知的建议类型'));
$A.modalError('未知的建议类型');
}
},
@ -262,7 +262,7 @@ export default {
*/
createSubtasksSequentially(taskId, subtasks) {
if (!subtasks || subtasks.length === 0) {
$A.modalError(this.$L('没有有效的子任务'));
$A.modalError('没有有效的子任务');
return;
}
@ -271,7 +271,7 @@ export default {
const createNext = (index) => {
if (index >= total) {
$A.messageSuccess(this.$L('应用成功'));
$A.messageSuccess('应用成功');
return;
}
const name = subtasks[index];

View File

@ -31,12 +31,12 @@ const MarkdownUtils = {
// 如果有 status显示状态文字
if (status) {
const statusLabels = {
description: { applied: '已采纳', dismissed: '已忽略' },
subtasks: { applied: '已创建', dismissed: '已忽略' },
assignee: { applied: '已指派', dismissed: '已忽略' },
similar: { applied: '已关联', dismissed: '已忽略' },
description: { applied: `${$A.L('已采纳')}`, dismissed: `${$A.L('已忽略')}` },
subtasks: { applied: `${$A.L('已创建')}`, dismissed: `${$A.L('已忽略')}` },
assignee: { applied: `${$A.L('已指派')}`, dismissed: `${$A.L('已忽略')}` },
similar: { applied: `${$A.L('已关联')}`, dismissed: `${$A.L('已忽略')}` },
};
const label = statusLabels[type]?.[status] || (status === 'applied' ? '已采纳' : '已忽略');
const label = statusLabels[type]?.[status] || (status === 'applied' ? `${$A.L('已采纳')}` : `${$A.L('已忽略')}`);
const statusClass = status === 'applied' ? 'ai-status-applied' : 'ai-status-dismissed';
return `<span class="ai-status ${statusClass}">${label}</span>`;
}
@ -48,12 +48,12 @@ const MarkdownUtils = {
// 根据类型生成按钮文案
const buttonLabels = {
description: ['采纳描述', '忽略'],
subtasks: ['创建子任务', '忽略'],
assignee: ['指派', '忽略'],
similar: ['关联', '忽略'],
description: [$A.L('采纳描述'), $A.L('忽略')],
subtasks: [$A.L('创建子任务'), $A.L('忽略')],
assignee: [$A.L('指派'), $A.L('忽略')],
similar: [$A.L('关联'), $A.L('忽略')],
};
const [applyLabel, dismissLabel] = buttonLabels[type] || ['采纳', '忽略'];
const [applyLabel, dismissLabel] = buttonLabels[type] || [$A.L('采纳'), $A.L('忽略')];
// 构建 URL 查询参数
let queryParams = [];

View File

@ -669,8 +669,8 @@
fill: #ffffff;
svg {
width: 20px;
height: 20px;
width: 18px;
height: 18px;
}
}
}