diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 8c4fa710d..e29dbb914 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -11,6 +11,7 @@ "axios": "^1.13.2", "d3": "^7.9.0", "vue": "^3.5.24", + "vue-i18n": "^9.14.5", "vue-router": "^4.6.3" }, "devDependencies": { @@ -506,6 +507,50 @@ "node": ">=18" } }, + "node_modules/@intlify/core-base": { + "version": "9.14.5", + "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.14.5.tgz", + "integrity": "sha512-5ah5FqZG4pOoHjkvs8mjtv+gPKYU0zCISaYNjBNNqYiaITxW8ZtVih3GS/oTOqN8d9/mDLyrjD46GBApNxmlsA==", + "license": "MIT", + "dependencies": { + "@intlify/message-compiler": "9.14.5", + "@intlify/shared": "9.14.5" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/message-compiler": { + "version": "9.14.5", + "resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.14.5.tgz", + "integrity": "sha512-IHzgEu61/YIpQV5Pc3aRWScDcnFKWvQA9kigcINcCBXN8mbW+vk9SK+lDxA6STzKQsVJxUPg9ACC52pKKo3SVQ==", + "license": "MIT", + "dependencies": { + "@intlify/shared": "9.14.5", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/shared": { + "version": "9.14.5", + "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.14.5.tgz", + "integrity": "sha512-9gB+E53BYuAEMhbCAxVgG38EZrk59sxBtv3jSizNL2hEWlgjBjAw1AwpLHtNaeda12pe6W20OGEa0TwuMSRbyQ==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", @@ -1331,7 +1376,6 @@ "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", "license": "ISC", - "peer": true, "engines": { "node": ">=12" } @@ -1809,7 +1853,6 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -1943,7 +1986,6 @@ "integrity": "sha512-ITcnkFeR3+fI8P1wMgItjGrR10170d8auB4EpMLPqmx6uxElH3a/hHGQabSHKdqd4FXWO1nFIp9rRn7JQ34ACQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", @@ -2018,7 +2060,6 @@ "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.25.tgz", "integrity": "sha512-YLVdgv2K13WJ6n+kD5owehKtEXwdwXuj2TTyJMsO7pSeKw2bfRNZGjhB7YzrpbMYj5b5QsUebHpOqR3R3ziy/g==", "license": "MIT", - "peer": true, "dependencies": { "@vue/compiler-dom": "3.5.25", "@vue/compiler-sfc": "3.5.25", @@ -2035,6 +2076,27 @@ } } }, + "node_modules/vue-i18n": { + "version": "9.14.5", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.14.5.tgz", + "integrity": "sha512-0jQ9Em3ymWngyiIkj0+c/k7WgaPO+TNzjKSNq9BvBQaKJECqn9cd9fL4tkDhB5G1QBskGl9YxxbDAhgbFtpe2g==", + "deprecated": "v9 and v10 no longer supported. please migrate to v11. about maintenance status, see https://vue-i18n.intlify.dev/guide/maintenance.html", + "license": "MIT", + "dependencies": { + "@intlify/core-base": "9.14.5", + "@intlify/shared": "9.14.5", + "@vue/devtools-api": "^6.5.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, "node_modules/vue-router": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.6.3.tgz", diff --git a/frontend/package.json b/frontend/package.json index f7e995a14..7e05e8918 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -12,6 +12,7 @@ "axios": "^1.13.2", "d3": "^7.9.0", "vue": "^3.5.24", + "vue-i18n": "^9.14.5", "vue-router": "^4.6.3" }, "devDependencies": { diff --git a/frontend/src/App.vue b/frontend/src/App.vue index b7cd71ca6..e7b962728 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,12 +1,47 @@ diff --git a/frontend/src/components/Step1GraphBuild.vue b/frontend/src/components/Step1GraphBuild.vue index de33a3fd1..7d04b01d7 100644 --- a/frontend/src/components/Step1GraphBuild.vue +++ b/frontend/src/components/Step1GraphBuild.vue @@ -6,25 +6,25 @@
01 - 本体生成 + {{ $t('step1.step01Title') }}
- 已完成 - 生成中 - 等待 + {{ $t('step1.badgeDone') }} + {{ $t('step1.badgeGen') }} + {{ $t('step1.badgeWait') }}

POST /api/graph/ontology/generate

- LLM分析文档内容与模拟需求,提取出现实种子,自动生成合适的本体结构 + {{ $t('step1.descOntology') }}

- {{ ontologyProgress.message || '正在分析文档...' }} + {{ ontologyProgress.message || $t('step1.analyzing') }}
@@ -75,7 +75,7 @@
- GENERATED ENTITY TYPES + {{ $t('step1.genEntityTypes') }}
- GENERATED RELATION TYPES + {{ $t('step1.genRelationTypes') }}
02 - GraphRAG构建 + {{ $t('step1.step02Title') }}
- 已完成 + {{ $t('step1.badgeDone') }} {{ buildProgress?.progress || 0 }}% - 等待 + {{ $t('step1.badgeWait') }}

POST /api/graph/build

- 基于生成的本体,将文档自动分块后调用 Zep 构建知识图谱,提取实体和关系,并形成时序记忆与社区摘要 + {{ $t('step1.descBuild') }}

{{ graphStats.nodes }} - 实体节点 + {{ $t('step1.statNodes') }}
{{ graphStats.edges }} - 关系边 + {{ $t('step1.statEdges') }}
{{ graphStats.types }} - SCHEMA类型 + {{ $t('step1.statSchema') }}
@@ -148,23 +148,23 @@
03 - 构建完成 + {{ $t('step1.step03Title') }}
- 进行中 + {{ $t('step1.badgeInProgress') }}

POST /api/simulation/create

-

图谱构建已完成,请进入下一步进行模拟环境搭建

+

{{ $t('step1.descComplete') }}

@@ -173,8 +173,8 @@
- SYSTEM DASHBOARD - {{ projectData?.project_id || 'NO_PROJECT' }} + {{ $t('common.systemDashboard') }} + {{ projectData?.project_id || $t('common.noProject') }}
@@ -188,10 +188,12 @@ diff --git a/frontend/src/views/MainView.vue b/frontend/src/views/MainView.vue index 6ff299112..957488ed9 100644 --- a/frontend/src/views/MainView.vue +++ b/frontend/src/views/MainView.vue @@ -15,14 +15,14 @@ :class="{ active: viewMode === mode }" @click="viewMode = mode" > - {{ { graph: '图谱', split: '双栏', workbench: '工作台' }[mode] }} + {{ $t(`common.viewMode.${mode}`) }}
- Step {{ currentStep }}/5 + {{ $t('common.stepWithTotal', { current: currentStep, total: 5 }) }} {{ stepNames[currentStep - 1] }}
@@ -76,6 +76,7 @@ diff --git a/frontend/src/views/SimulationRunView.vue b/frontend/src/views/SimulationRunView.vue index 14ebc5f9d..01d07477c 100644 --- a/frontend/src/views/SimulationRunView.vue +++ b/frontend/src/views/SimulationRunView.vue @@ -15,15 +15,15 @@ :class="{ active: viewMode === mode }" @click="viewMode = mode" > - {{ { graph: '图谱', split: '双栏', workbench: '工作台' }[mode] }} + {{ $t(`common.viewMode.${mode}`) }}
- Step 3/5 - 开始模拟 + {{ $t('common.stepWithTotal', { current: 3, total: 5 }) }} + {{ $t('common.workflow.simulation') }}
@@ -68,6 +68,7 @@