From 049da2297b3c270e7e8ac783687f5fa7ec38bb57 Mon Sep 17 00:00:00 2001 From: wangwei Date: Thu, 2 Jul 2026 17:06:13 +0800 Subject: [PATCH] feat: add i18n keys for AI Models card and fix missing .status.error CSS Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- frontend/src/locales/en.ts | 22 ++++++++++++++++++++++ frontend/src/locales/zh.ts | 11 +++++++++++ frontend/src/styles/globals.css | 2 ++ 3 files changed, 35 insertions(+) diff --git a/frontend/src/locales/en.ts b/frontend/src/locales/en.ts index 68cc932..3d4578c 100644 --- a/frontend/src/locales/en.ts +++ b/frontend/src/locales/en.ts @@ -131,6 +131,17 @@ export interface Translations { footerDegraded: string; footerChecking: string; totalChunks: string; + cardModels: string; + testConnectionBtn: string; + testingBtn: string; + roleMainLlm: string; + roleHydeLlm: string; + roleEmbedding: string; + roleReranker: string; + modelStatusNeverCalled: string; + modelStatusDisabled: string; + sharesUsageWithMain: string; + lastCalledNever: string; }; docs: { topbarTitle: string; @@ -361,6 +372,17 @@ export const en: Translations = { footerDegraded: 'Degraded', footerChecking: 'Checking…', totalChunks: 'Total vector chunks', + cardModels: 'AI Models', + testConnectionBtn: 'Test connection', + testingBtn: 'Testing…', + roleMainLlm: 'Main answer LLM', + roleHydeLlm: 'HyDE query expansion', + roleEmbedding: 'Embedding', + roleReranker: 'Reranker', + modelStatusNeverCalled: 'Not called yet', + modelStatusDisabled: 'Disabled', + sharesUsageWithMain: 'Shares usage with main LLM', + lastCalledNever: 'Never', }, docs: { topbarTitle: 'Document Management', diff --git a/frontend/src/locales/zh.ts b/frontend/src/locales/zh.ts index e3f3d16..341ba00 100644 --- a/frontend/src/locales/zh.ts +++ b/frontend/src/locales/zh.ts @@ -132,6 +132,17 @@ export const zh: Translations = { footerDegraded: '降级运行', footerChecking: '检查中…', totalChunks: '向量分块总数', + cardModels: 'AI 模型', + testConnectionBtn: '测试连接', + testingBtn: '测试中…', + roleMainLlm: '主问答 LLM', + roleHydeLlm: 'HyDE 查询增强', + roleEmbedding: 'Embedding', + roleReranker: 'Reranker', + modelStatusNeverCalled: '尚未调用', + modelStatusDisabled: '已禁用', + sharesUsageWithMain: '与主 LLM 共用统计', + lastCalledNever: '从未', }, docs: { topbarTitle: '文档管理', diff --git a/frontend/src/styles/globals.css b/frontend/src/styles/globals.css index 00d9192..b76b17c 100644 --- a/frontend/src/styles/globals.css +++ b/frontend/src/styles/globals.css @@ -136,6 +136,8 @@ body { .status.warn::before { background: var(--warn); } .status.risk { color: var(--danger); background: var(--danger-bg); } .status.risk::before { background: var(--danger); } +.status.error { color: var(--danger); background: var(--danger-bg); } +.status.error::before { background: var(--danger); } .status.info { color: var(--info); background: var(--info-bg); } .status.info::before { background: var(--info); }