feat(i18n): replace hardcoded Chinese in frontend components with i18n calls

Replace all user-visible hardcoded Chinese strings in 7 component files
with $t() / t() calls using vue-i18n:

- Step1GraphBuild: ontology generation, graph build, status badges
- Step2EnvSetup: simulation setup, agent personas, platform config,
  time config, initial activation, modal profile details
- Step3Simulation: report generation button
- Step4Report: section loading text, interaction button
- Step5Interaction: chat interface, survey UI, tool descriptions,
  error messages, agent selection
- GraphPanel: graph status hints, loading states, tooltips
- HistoryDatabase: history cards, modal, replay buttons

Added missing translation keys to both zh.json and en.json locale files.
Added useI18n imports to components that need script-level translations.
This commit is contained in:
ghostubborn
2026-04-01 15:43:11 +08:00
parent 70833821a2
commit fc47ae81b5
9 changed files with 253 additions and 208 deletions

View File

@@ -172,7 +172,9 @@
"genderMale": "Male",
"genderFemale": "Female",
"genderOther": "Other",
"yearsOld": "years old"
"yearsOld": "years old",
"initializing": "Initializing",
"generating": "Generating"
},
"step3": {
"startGenerateReport": "Generate Result Report",
@@ -201,7 +203,9 @@
"stoppingProcess": "Stopping simulation process...",
"checkStatusFailed": "Failed to check simulation status: {error}",
"forceStopSuccess": "Simulation force stopped",
"forceStopFailed": "Force stop failed: {error}"
"forceStopFailed": "Force stop failed: {error}",
"startGenerateReportBtn": "Generate Result Report",
"generatingReportBtn": "Starting..."
},
"step4": {
"generatingSection": "Generating {title}...",
@@ -237,7 +241,11 @@
"surveyResults": "Survey Results",
"surveyResultsCount": "{count} responses",
"selectAll": "Select All",
"clearSelection": "Clear"
"clearSelection": "Clear",
"errorOccurred": "Sorry, an error occurred: {error}",
"noResponse": "No response",
"requestFailed": "Request failed",
"selectAgentFirst": "Please select a simulated individual first"
},
"graph": {
"panelTitle": "Graph Relationship Visualization",
@@ -246,7 +254,11 @@
"realtimeUpdating": "Updating in real-time...",
"pendingContentHint": "Some content is still processing. Consider refreshing the graph manually later.",
"nodeDetails": "Node Details",
"relationship": "Relationship"
"relationship": "Relationship",
"graphDataLoading": "Loading graph data...",
"waitingOntology": "Waiting for ontology generation...",
"toggleMaximize": "Maximize/Restore",
"closeHint": "Close hint"
},
"history": {
"title": "Simulation History",
@@ -263,7 +275,11 @@
"step1Button": "Graph Build",
"step2Button": "Env Setup",
"step4Button": "Analysis Report",
"replayHint": "Step 3 'Run Simulation' and Step 5 'Deep Interaction' must be started during runtime and do not support history replay"
"replayHint": "Step 3 'Run Simulation' and Step 5 'Deep Interaction' must be started during runtime and do not support history replay",
"notStarted": "Not started",
"roundsProgress": "{current}/{total} rounds",
"untitledSimulation": "Untitled simulation",
"unknownFile": "Unknown file"
},
"api": {
"projectNotFound": "Project not found: {id}",

View File

@@ -172,7 +172,9 @@
"genderMale": "男",
"genderFemale": "女",
"genderOther": "其他",
"yearsOld": "岁"
"yearsOld": "岁",
"initializing": "初始化",
"generating": "生成中"
},
"step3": {
"startGenerateReport": "开始生成结果报告",
@@ -201,7 +203,9 @@
"stoppingProcess": "正在停止模拟进程...",
"checkStatusFailed": "检查模拟状态失败: {error}",
"forceStopSuccess": "模拟已强制停止",
"forceStopFailed": "强制停止失败: {error}"
"forceStopFailed": "强制停止失败: {error}",
"startGenerateReportBtn": "开始生成结果报告",
"generatingReportBtn": "启动中..."
},
"step4": {
"generatingSection": "正在生成{title}...",
@@ -237,7 +241,11 @@
"surveyResults": "调查结果",
"surveyResultsCount": "{count} 条回复",
"selectAll": "全选",
"clearSelection": "清空"
"clearSelection": "清空",
"errorOccurred": "抱歉,发生了错误: {error}",
"noResponse": "无响应",
"requestFailed": "请求失败",
"selectAgentFirst": "请先选择一个模拟个体"
},
"graph": {
"panelTitle": "Graph Relationship Visualization",
@@ -246,7 +254,11 @@
"realtimeUpdating": "实时更新中...",
"pendingContentHint": "还有少量内容处理中,建议稍后手动刷新图谱",
"nodeDetails": "Node Details",
"relationship": "Relationship"
"relationship": "Relationship",
"graphDataLoading": "图谱数据加载中...",
"waitingOntology": "等待本体生成...",
"toggleMaximize": "最大化/还原",
"closeHint": "关闭提示"
},
"history": {
"title": "推演记录",
@@ -263,7 +275,11 @@
"step1Button": "图谱构建",
"step2Button": "环境搭建",
"step4Button": "分析报告",
"replayHint": "Step3「开始模拟」与 Step5「深度互动」需在运行中启动不支持历史回放"
"replayHint": "Step3「开始模拟」与 Step5「深度互动」需在运行中启动不支持历史回放",
"notStarted": "未开始",
"roundsProgress": "{current}/{total} 轮",
"untitledSimulation": "未命名模拟",
"unknownFile": "未知文件"
},
"api": {
"projectNotFound": "项目不存在: {id}",