feat(i18n): replace hardcoded Chinese in frontend views with i18n calls
This commit is contained in:
parent
74f673a238
commit
70833821a2
|
|
@ -6,7 +6,7 @@
|
|||
<div class="nav-links">
|
||||
<LanguageSwitcher dark />
|
||||
<a href="https://github.com/666ghj/MiroFish" target="_blank" class="github-link">
|
||||
访问我们的Github主页 <span class="arrow">↗</span>
|
||||
{{ $t('nav.visitGithub') }} <span class="arrow">↗</span>
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
@ -16,21 +16,25 @@
|
|||
<section class="hero-section">
|
||||
<div class="hero-left">
|
||||
<div class="tag-row">
|
||||
<span class="orange-tag">简洁通用的群体智能引擎</span>
|
||||
<span class="version-text">/ v0.1-预览版</span>
|
||||
<span class="orange-tag">{{ $t('home.tagline') }}</span>
|
||||
<span class="version-text">{{ $t('home.version') }}</span>
|
||||
</div>
|
||||
|
||||
<h1 class="main-title">
|
||||
上传任意报告<br>
|
||||
<span class="gradient-text">即刻推演未来</span>
|
||||
{{ $t('home.heroTitle1') }}<br>
|
||||
<span class="gradient-text">{{ $t('home.heroTitle2') }}</span>
|
||||
</h1>
|
||||
|
||||
<div class="hero-desc">
|
||||
<div class=”hero-desc”>
|
||||
<p>
|
||||
即使只有一段文字,<span class="highlight-bold">MiroFish</span> 也能基于其中的现实种子,全自动生成与之对应的至多<span class="highlight-orange">百万级Agent</span>构成的平行世界。通过上帝视角注入变量,在复杂的群体交互中寻找动态环境下的<span class="highlight-code">“局部最优解”</span>
|
||||
<i18n-t keypath=”home.heroDesc” tag=”span”>
|
||||
<template #brand><span class=”highlight-bold”>{{ $t('home.heroDescBrand') }}</span></template>
|
||||
<template #agentScale><span class=”highlight-orange”>{{ $t('home.heroDescAgentScale') }}</span></template>
|
||||
<template #optimalSolution><span class=”highlight-code”>{{ $t('home.heroDescOptimalSolution') }}</span></template>
|
||||
</i18n-t>
|
||||
</p>
|
||||
<p class="slogan-text">
|
||||
让未来在 Agent 群中预演,让决策在百战后胜出<span class="blinking-cursor">_</span>
|
||||
<p class=”slogan-text”>
|
||||
{{ $t('home.slogan') }}<span class=”blinking-cursor”>_</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
@ -54,65 +58,65 @@
|
|||
<!-- 左栏:状态与步骤 -->
|
||||
<div class="left-panel">
|
||||
<div class="panel-header">
|
||||
<span class="status-dot">■</span> 系统状态
|
||||
<span class="status-dot">■</span> {{ $t('home.systemStatus') }}
|
||||
</div>
|
||||
|
||||
<h2 class="section-title">准备就绪</h2>
|
||||
<h2 class="section-title">{{ $t('home.systemReady') }}</h2>
|
||||
<p class="section-desc">
|
||||
预测引擎待命中,可上传多份非结构化数据以初始化模拟序列
|
||||
{{ $t('home.systemReadyDesc') }}
|
||||
</p>
|
||||
|
||||
<!-- 数据指标卡片 -->
|
||||
<div class="metrics-row">
|
||||
<div class="metric-card">
|
||||
<div class="metric-value">低成本</div>
|
||||
<div class="metric-label">常规模拟平均5$/次</div>
|
||||
<div class="metric-value">{{ $t('home.metricLowCost') }}</div>
|
||||
<div class="metric-label">{{ $t('home.metricLowCostDesc') }}</div>
|
||||
</div>
|
||||
<div class="metric-card">
|
||||
<div class="metric-value">高可用</div>
|
||||
<div class="metric-label">最多百万级Agent模拟</div>
|
||||
<div class="metric-value">{{ $t('home.metricHighAvail') }}</div>
|
||||
<div class="metric-label">{{ $t('home.metricHighAvailDesc') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 项目模拟步骤介绍 (新增区域) -->
|
||||
<div class="steps-container">
|
||||
<div class="steps-header">
|
||||
<span class="diamond-icon">◇</span> 工作流序列
|
||||
<span class="diamond-icon">◇</span> {{ $t('home.workflowSequence') }}
|
||||
</div>
|
||||
<div class="workflow-list">
|
||||
<div class="workflow-item">
|
||||
<span class="step-num">01</span>
|
||||
<div class="step-info">
|
||||
<div class="step-title">图谱构建</div>
|
||||
<div class="step-desc">现实种子提取 & 个体与群体记忆注入 & GraphRAG构建</div>
|
||||
<div class="step-title">{{ $t('home.step01Title') }}</div>
|
||||
<div class="step-desc">{{ $t('home.step01Desc') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="workflow-item">
|
||||
<span class="step-num">02</span>
|
||||
<div class="step-info">
|
||||
<div class="step-title">环境搭建</div>
|
||||
<div class="step-desc">实体关系抽取 & 人设生成 & 环境配置Agent注入仿真参数</div>
|
||||
<div class="step-title">{{ $t('home.step02Title') }}</div>
|
||||
<div class="step-desc">{{ $t('home.step02Desc') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="workflow-item">
|
||||
<span class="step-num">03</span>
|
||||
<div class="step-info">
|
||||
<div class="step-title">开始模拟</div>
|
||||
<div class="step-desc">双平台并行模拟 & 自动解析预测需求 & 动态更新时序记忆</div>
|
||||
<div class="step-title">{{ $t('home.step03Title') }}</div>
|
||||
<div class="step-desc">{{ $t('home.step03Desc') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="workflow-item">
|
||||
<span class="step-num">04</span>
|
||||
<div class="step-info">
|
||||
<div class="step-title">报告生成</div>
|
||||
<div class="step-desc">ReportAgent拥有丰富的工具集与模拟后环境进行深度交互</div>
|
||||
<div class="step-title">{{ $t('home.step04Title') }}</div>
|
||||
<div class="step-desc">{{ $t('home.step04Desc') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="workflow-item">
|
||||
<span class="step-num">05</span>
|
||||
<div class="step-info">
|
||||
<div class="step-title">深度互动</div>
|
||||
<div class="step-desc">与模拟世界中的任意一位进行对话 & 与ReportAgent进行对话</div>
|
||||
<div class="step-title">{{ $t('home.step05Title') }}</div>
|
||||
<div class="step-desc">{{ $t('home.step05Desc') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -125,8 +129,8 @@
|
|||
<!-- 上传区域 -->
|
||||
<div class="console-section">
|
||||
<div class="console-header">
|
||||
<span class="console-label">01 / 现实种子</span>
|
||||
<span class="console-meta">支持格式: PDF, MD, TXT</span>
|
||||
<span class="console-label">{{ $t('home.realitySeed') }}</span>
|
||||
<span class="console-meta">{{ $t('home.supportedFormats') }}</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
|
|
@ -149,8 +153,8 @@
|
|||
|
||||
<div v-if="files.length === 0" class="upload-placeholder">
|
||||
<div class="upload-icon">↑</div>
|
||||
<div class="upload-title">拖拽文件上传</div>
|
||||
<div class="upload-hint">或点击浏览文件系统</div>
|
||||
<div class="upload-title">{{ $t('home.dragToUpload') }}</div>
|
||||
<div class="upload-hint">{{ $t('home.orBrowse') }}</div>
|
||||
</div>
|
||||
|
||||
<div v-else class="file-list">
|
||||
|
|
@ -165,23 +169,23 @@
|
|||
|
||||
<!-- 分割线 -->
|
||||
<div class="console-divider">
|
||||
<span>输入参数</span>
|
||||
<span>{{ $t('home.inputParams') }}</span>
|
||||
</div>
|
||||
|
||||
<!-- 输入区域 -->
|
||||
<div class="console-section">
|
||||
<div class="console-header">
|
||||
<span class="console-label">>_ 02 / 模拟提示词</span>
|
||||
<span class="console-label">{{ $t('home.simulationPrompt') }}</span>
|
||||
</div>
|
||||
<div class="input-wrapper">
|
||||
<textarea
|
||||
v-model="formData.simulationRequirement"
|
||||
class="code-input"
|
||||
placeholder="// 用自然语言输入模拟或预测需求(例.武大若发布撤销肖某处分的公告,会引发什么舆情走向)"
|
||||
:placeholder="$t('home.promptPlaceholder')"
|
||||
rows="6"
|
||||
:disabled="loading"
|
||||
></textarea>
|
||||
<div class="model-badge">引擎: MiroFish-V1.0</div>
|
||||
<div class="model-badge">{{ $t('home.engineBadge') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -192,8 +196,8 @@
|
|||
@click="startSimulation"
|
||||
:disabled="!canSubmit || loading"
|
||||
>
|
||||
<span v-if="!loading">启动引擎</span>
|
||||
<span v-else>初始化中...</span>
|
||||
<span v-if="!loading">{{ $t('home.startEngine') }}</span>
|
||||
<span v-else>{{ $t('home.initializing') }}</span>
|
||||
<span class="btn-arrow">→</span>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
:class="{ active: viewMode === mode }"
|
||||
@click="viewMode = mode"
|
||||
>
|
||||
{{ { graph: '图谱', split: '双栏', workbench: '工作台' }[mode] }}
|
||||
{{ { graph: $t('main.layoutGraph'), split: $t('main.layoutSplit'), workbench: $t('main.layoutWorkbench') }[mode] }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
<div class="step-divider"></div>
|
||||
<div class="workflow-step">
|
||||
<span class="step-num">Step 5/5</span>
|
||||
<span class="step-name">深度互动</span>
|
||||
<span class="step-name">{{ $tm('main.stepNames')[4] }}</span>
|
||||
</div>
|
||||
<div class="step-divider"></div>
|
||||
<span class="status-indicator" :class="statusClass">
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
:class="{ active: viewMode === mode }"
|
||||
@click="viewMode = mode"
|
||||
>
|
||||
{{ { graph: '图谱', split: '双栏', workbench: '工作台' }[mode] }}
|
||||
{{ { graph: $t('main.layoutGraph'), split: $t('main.layoutSplit'), workbench: $t('main.layoutWorkbench') }[mode] }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
<div class="step-divider"></div>
|
||||
<div class="workflow-step">
|
||||
<span class="step-num">Step {{ currentStep }}/5</span>
|
||||
<span class="step-name">{{ stepNames[currentStep - 1] }}</span>
|
||||
<span class="step-name">{{ $tm('main.stepNames')[currentStep - 1] }}</span>
|
||||
</div>
|
||||
<div class="step-divider"></div>
|
||||
<span class="status-indicator" :class="statusClass">
|
||||
|
|
@ -79,6 +79,7 @@
|
|||
<script setup>
|
||||
import { ref, computed, onMounted, onUnmounted, nextTick } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import GraphPanel from '../components/GraphPanel.vue'
|
||||
import Step1GraphBuild from '../components/Step1GraphBuild.vue'
|
||||
import Step2EnvSetup from '../components/Step2EnvSetup.vue'
|
||||
|
|
@ -88,13 +89,14 @@ import LanguageSwitcher from '../components/LanguageSwitcher.vue'
|
|||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const { t, tm } = useI18n()
|
||||
|
||||
// Layout State
|
||||
const viewMode = ref('split') // graph | split | workbench
|
||||
|
||||
// Step State
|
||||
const currentStep = ref(1) // 1: 图谱构建, 2: 环境搭建, 3: 开始模拟, 4: 报告生成, 5: 深度互动
|
||||
const stepNames = ['图谱构建', '环境搭建', '开始模拟', '报告生成', '深度互动']
|
||||
const stepNames = computed(() => tm('main.stepNames'))
|
||||
|
||||
// Data State
|
||||
const currentProjectId = ref(route.params.projectId)
|
||||
|
|
@ -162,7 +164,7 @@ const toggleMaximize = (target) => {
|
|||
const handleNextStep = (params = {}) => {
|
||||
if (currentStep.value < 5) {
|
||||
currentStep.value++
|
||||
addLog(`进入 Step ${currentStep.value}: ${stepNames[currentStep.value - 1]}`)
|
||||
addLog(`进入 Step ${currentStep.value}: ${stepNames.value[currentStep.value - 1]}`)
|
||||
|
||||
// 如果是从 Step 2 进入 Step 3,记录模拟轮数配置
|
||||
if (currentStep.value === 3 && params.maxRounds) {
|
||||
|
|
@ -174,7 +176,7 @@ const handleNextStep = (params = {}) => {
|
|||
const handleGoBack = () => {
|
||||
if (currentStep.value > 1) {
|
||||
currentStep.value--
|
||||
addLog(`返回 Step ${currentStep.value}: ${stepNames[currentStep.value - 1]}`)
|
||||
addLog(`返回 Step ${currentStep.value}: ${stepNames.value[currentStep.value - 1]}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
:class="{ active: viewMode === mode }"
|
||||
@click="viewMode = mode"
|
||||
>
|
||||
{{ { graph: '图谱', split: '双栏', workbench: '工作台' }[mode] }}
|
||||
{{ { graph: $t('main.layoutGraph'), split: $t('main.layoutSplit'), workbench: $t('main.layoutWorkbench') }[mode] }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
<div class="step-divider"></div>
|
||||
<div class="workflow-step">
|
||||
<span class="step-num">Step 4/5</span>
|
||||
<span class="step-name">报告生成</span>
|
||||
<span class="step-name">{{ $tm('main.stepNames')[3] }}</span>
|
||||
</div>
|
||||
<div class="step-divider"></div>
|
||||
<span class="status-indicator" :class="statusClass">
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
:class="{ active: viewMode === mode }"
|
||||
@click="viewMode = mode"
|
||||
>
|
||||
{{ { graph: '图谱', split: '双栏', workbench: '工作台' }[mode] }}
|
||||
{{ { graph: $t('main.layoutGraph'), split: $t('main.layoutSplit'), workbench: $t('main.layoutWorkbench') }[mode] }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
<div class="step-divider"></div>
|
||||
<div class="workflow-step">
|
||||
<span class="step-num">Step 3/5</span>
|
||||
<span class="step-name">开始模拟</span>
|
||||
<span class="step-name">{{ $tm('main.stepNames')[2] }}</span>
|
||||
</div>
|
||||
<div class="step-divider"></div>
|
||||
<span class="status-indicator" :class="statusClass">
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
:class="{ active: viewMode === mode }"
|
||||
@click="viewMode = mode"
|
||||
>
|
||||
{{ { graph: '图谱', split: '双栏', workbench: '工作台' }[mode] }}
|
||||
{{ { graph: $t('main.layoutGraph'), split: $t('main.layoutSplit'), workbench: $t('main.layoutWorkbench') }[mode] }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
<div class="step-divider"></div>
|
||||
<div class="workflow-step">
|
||||
<span class="step-num">Step 2/5</span>
|
||||
<span class="step-name">环境搭建</span>
|
||||
<span class="step-name">{{ $tm('main.stepNames')[1] }}</span>
|
||||
</div>
|
||||
<div class="step-divider"></div>
|
||||
<span class="status-indicator" :class="statusClass">
|
||||
|
|
|
|||
Loading…
Reference in New Issue