Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions frontend/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!doctype html>
<html lang="zh">
<html lang="en">
<head>
<script>document.documentElement.lang = localStorage.getItem('locale') || 'zh'</script>
<script>document.documentElement.lang = localStorage.getItem('locale') || 'en'</script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@100..800&family=Noto+Sans+SC:wght@300;400;500;700;800;900&family=Space+Grotesk:wght@300..700&display=swap" rel="stylesheet">
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="MiroFish - 社交媒体舆论模拟系统" />
<title>MiroFish - 预测万物</title>
<meta name="description" content="MiroFish - Social Media Opinion Simulation System" />
<title>MiroFish - Predict Everything</title>
</head>
<body>
<div id="app"></div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Step3Simulation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ const doStartSimulation = async () => {
startStatusPolling()
startDetailPolling()
} else {
startError.value = res.error || '启动失败'
startError.value = res.error || t('step3.startFailedShort')
addLog(t('log.startFailed', { error: res.error || t('common.unknownError') }))
emit('update-status', 'error')
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Step4Report.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1471,7 +1471,7 @@ const InterviewDisplay = {

// Selection Reason - 选择理由
props.result.interviews[activeIndex.value]?.selectionReason && h('div', { class: 'selection-reason' }, [
h('div', { class: 'reason-label' }, '选择理由'),
h('div', { class: 'reason-label' }, t('step4.selectionReason')),
h('div', { class: 'reason-content' }, props.result.interviews[activeIndex.value].selectionReason)
]),

Expand Down Expand Up @@ -1781,7 +1781,7 @@ const activeStep = computed(() => {
if (doneSteps.length > 0) return doneSteps[doneSteps.length - 1]

// 否则返回第一个步骤
return steps[0] || { noLabel: '--', title: '等待开始', status: 'todo', meta: '' }
return steps[0] || { noLabel: '--', title: t('step4.waitingToStart'), status: 'todo', meta: '' }
})

const workflowSteps = computed(() => {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Step5Interaction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -722,9 +722,9 @@ const sendToAgent = async (message) => {
const historyContext = chatHistory.value
.filter(msg => msg.content !== message)
.slice(-6)
.map(msg => `${msg.role === 'user' ? '提问者' : '你'}:${msg.content}`)
.map(msg => `${msg.role === 'user' ? t('step5.roleQuestioner') : t('step5.roleYou')}: ${msg.content}`)
.join('\n')
prompt = `以下是我们之前的对话:\n${historyContext}\n\n现在我的新问题是:${message}`
prompt = t('step5.chatHistoryPrompt', { history: historyContext, message })
}

const res = await interviewAgents({
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/i18n/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ for (const path in localeFiles) {
}
}

const savedLocale = localStorage.getItem('locale') || 'zh'
const savedLocale = localStorage.getItem('locale') || 'en'

const i18n = createI18n({
legacy: false,
locale: savedLocale,
fallbackLocale: 'zh',
fallbackLocale: 'en',
messages
})

Expand Down
Loading