From ed6011a2be9ebc29d789b5904ccb7690ac59475e Mon Sep 17 00:00:00 2001 From: advent259141 <2968474907@qq.com> Date: Fri, 27 Jun 2025 18:46:02 +0800 Subject: [PATCH] =?UTF-8?q?=09modified:=20=20=20dashboard/src/i18n/loader.?= =?UTF-8?q?ts=20=09modified:=20=20=20dashboard/src/i18n/locales/en-US/core?= =?UTF-8?q?/navigation.json=20=E5=A2=9E=E5=8A=A0=E4=BC=9A=E8=AF=9D?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E8=8B=B1=E6=96=87=E9=A1=B5=E9=9D=A2=20=09mod?= =?UTF-8?q?ified:=20=20=20dashboard/src/i18n/locales/zh-CN/core/navigation?= =?UTF-8?q?.json=20=E5=A2=9E=E5=8A=A0=E4=BC=9A=E8=AF=9D=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=B8=AD=E6=96=87=E9=A1=B5=E9=9D=A2=20=09modified:=20=20=20das?= =?UTF-8?q?hboard/src/i18n/translations.ts=20=09modified:=20=20=20dashboar?= =?UTF-8?q?d/src/layouts/full/vertical-sidebar/sidebarItem.ts=20=09modifie?= =?UTF-8?q?d:=20=20=20dashboard/src/views/SessionManagementPage.vue=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BC=9A=E8=AF=9D=E7=AE=A1=E7=90=86=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard/src/i18n/loader.ts | 1 + .../i18n/locales/en-US/core/navigation.json | 1 + .../en-US/features/session-management.json | 68 +++++++++ .../i18n/locales/zh-CN/core/navigation.json | 1 + .../zh-CN/features/session-management.json | 68 +++++++++ dashboard/src/i18n/translations.ts | 4 + .../full/vertical-sidebar/sidebarItem.ts | 2 +- dashboard/src/views/SessionManagementPage.vue | 134 ++++++++++-------- 8 files changed, 218 insertions(+), 61 deletions(-) create mode 100644 dashboard/src/i18n/locales/en-US/features/session-management.json create mode 100644 dashboard/src/i18n/locales/zh-CN/features/session-management.json diff --git a/dashboard/src/i18n/loader.ts b/dashboard/src/i18n/loader.ts index a7c1137a3..275110ddc 100644 --- a/dashboard/src/i18n/loader.ts +++ b/dashboard/src/i18n/loader.ts @@ -38,6 +38,7 @@ export class I18nLoader { { name: 'features/chat', path: 'features/chat.json' }, { name: 'features/extension', path: 'features/extension.json' }, { name: 'features/conversation', path: 'features/conversation.json' }, + { name: 'features/session-management', path: 'features/session-management.json' }, { name: 'features/tooluse', path: 'features/tool-use.json' }, { name: 'features/provider', path: 'features/provider.json' }, { name: 'features/platform', path: 'features/platform.json' }, diff --git a/dashboard/src/i18n/locales/en-US/core/navigation.json b/dashboard/src/i18n/locales/en-US/core/navigation.json index ce289e84e..501383020 100644 --- a/dashboard/src/i18n/locales/en-US/core/navigation.json +++ b/dashboard/src/i18n/locales/en-US/core/navigation.json @@ -8,6 +8,7 @@ "extensionMarketplace": "Extension Market", "chat": "Chat", "conversation": "Conversations", + "sessionManagement": "Session Management", "console": "Console", "alkaid": "Alkaid Lab", "about": "About", diff --git a/dashboard/src/i18n/locales/en-US/features/session-management.json b/dashboard/src/i18n/locales/en-US/features/session-management.json new file mode 100644 index 000000000..d25e79f8f --- /dev/null +++ b/dashboard/src/i18n/locales/en-US/features/session-management.json @@ -0,0 +1,68 @@ +{ + "title": "Session Management", + "subtitle": "Manage active sessions and configurations", + "buttons": { + "refresh": "Refresh", + "edit": "Edit", + "apply": "Apply Batch Settings" + }, + "sessions": { + "activeSessions": "Active Sessions", + "sessionCount": "sessions", + "noActiveSessions": "No active sessions", + "noActiveSessionsDesc": "Sessions will appear here when users interact with the bot" + }, + "search": { + "placeholder": "Search sessions...", + "platformFilter": "Platform Filter" + }, + "table": { + "headers": { + "sessionInfo": "Session Info", + "persona": "Persona", + "chatProvider": "Chat Provider", + "sttProvider": "STT Provider", + "ttsProvider": "TTS Provider", + "llmStatus": "LLM Status", + "ttsStatus": "TTS Status", + "mcpStatus": "MCP Status", + "pluginManagement": "Plugin Management" + } + }, + "status": { + "enabled": "Enabled", + "disabled": "Disabled" + }, + "persona": { + "none": "No Persona" + }, + "batchOperations": { + "title": "Batch Operations", + "setPersona": "Batch Set Persona", + "setChatProvider": "Batch Set Chat Provider" + }, + "pluginManagement": { + "title": "Plugin Management", + "noPlugins": "No available plugins", + "noPluginsDesc": "Currently no active plugins", + "loading": "Loading plugin list...", + "author": "Author" + }, + "messages": { + "refreshSuccess": "Session list refreshed", + "personaUpdateSuccess": "Persona updated successfully", + "personaUpdateError": "Failed to update persona", + "providerUpdateSuccess": "Provider updated successfully", + "providerUpdateError": "Failed to update provider", + "llmStatusSuccess": "LLM {status}", + "ttsStatusSuccess": "TTS {status}", + "mcpStatusSuccess": "MCP {status}", + "statusUpdateError": "Failed to update status", + "loadSessionsError": "Failed to load session list", + "batchUpdateSuccess": "Successfully batch updated {count} settings", + "batchUpdatePartial": "Batch update completed, {success} successful, {error} failed", + "loadPluginsError": "Failed to load plugin list", + "pluginStatusSuccess": "Plugin {name} {status}", + "pluginStatusError": "Failed to update plugin status" + } +} diff --git a/dashboard/src/i18n/locales/zh-CN/core/navigation.json b/dashboard/src/i18n/locales/zh-CN/core/navigation.json index 23a129ae5..d0ed8453a 100644 --- a/dashboard/src/i18n/locales/zh-CN/core/navigation.json +++ b/dashboard/src/i18n/locales/zh-CN/core/navigation.json @@ -8,6 +8,7 @@ "extensionMarketplace": "插件市场", "chat": "聊天", "conversation": "对话数据库", + "sessionManagement": "会话管理", "console": "控制台", "alkaid": "Alkaid", "about": "关于", diff --git a/dashboard/src/i18n/locales/zh-CN/features/session-management.json b/dashboard/src/i18n/locales/zh-CN/features/session-management.json new file mode 100644 index 000000000..431e3fd08 --- /dev/null +++ b/dashboard/src/i18n/locales/zh-CN/features/session-management.json @@ -0,0 +1,68 @@ +{ + "title": "会话管理", + "subtitle": "管理活跃会话和配置", + "buttons": { + "refresh": "刷新", + "edit": "编辑", + "apply": "应用批量设置" + }, + "sessions": { + "activeSessions": "活跃会话", + "sessionCount": "个会话", + "noActiveSessions": "暂无活跃会话", + "noActiveSessionsDesc": "当有用户与机器人交互时,会话将会显示在这里" + }, + "search": { + "placeholder": "搜索会话...", + "platformFilter": "平台筛选" + }, + "table": { + "headers": { + "sessionInfo": "会话信息", + "persona": "人格", + "chatProvider": "Chat Provider", + "sttProvider": "STT Provider", + "ttsProvider": "TTS Provider", + "llmStatus": "LLM启停", + "ttsStatus": "TTS启停", + "mcpStatus": "MCP启停", + "pluginManagement": "插件管理" + } + }, + "status": { + "enabled": "已启用", + "disabled": "已禁用" + }, + "persona": { + "none": "无人格" + }, + "batchOperations": { + "title": "批量操作", + "setPersona": "批量设置人格", + "setChatProvider": "批量设置 Chat Provider" + }, + "pluginManagement": { + "title": "插件管理", + "noPlugins": "暂无可用插件", + "noPluginsDesc": "目前没有激活的插件", + "loading": "加载插件列表中...", + "author": "作者" + }, + "messages": { + "refreshSuccess": "会话列表已刷新", + "personaUpdateSuccess": "人格更新成功", + "personaUpdateError": "人格更新失败", + "providerUpdateSuccess": "Provider 更新成功", + "providerUpdateError": "Provider 更新失败", + "llmStatusSuccess": "LLM {status}", + "ttsStatusSuccess": "TTS {status}", + "mcpStatusSuccess": "MCP {status}", + "statusUpdateError": "状态更新失败", + "loadSessionsError": "加载会话列表失败", + "batchUpdateSuccess": "成功批量更新 {count} 项设置", + "batchUpdatePartial": "批量更新完成,{success} 项成功,{error} 项失败", + "loadPluginsError": "加载插件列表失败", + "pluginStatusSuccess": "插件 {name} {status}", + "pluginStatusError": "插件状态更新失败" + } +} diff --git a/dashboard/src/i18n/translations.ts b/dashboard/src/i18n/translations.ts index 59d4b0568..c46ca4d0d 100644 --- a/dashboard/src/i18n/translations.ts +++ b/dashboard/src/i18n/translations.ts @@ -11,6 +11,7 @@ import zhCNHeader from './locales/zh-CN/core/header.json'; import zhCNChat from './locales/zh-CN/features/chat.json'; import zhCNExtension from './locales/zh-CN/features/extension.json'; import zhCNConversation from './locales/zh-CN/features/conversation.json'; +import zhCNSessionManagement from './locales/zh-CN/features/session-management.json'; import zhCNToolUse from './locales/zh-CN/features/tool-use.json'; import zhCNProvider from './locales/zh-CN/features/provider.json'; import zhCNPlatform from './locales/zh-CN/features/platform.json'; @@ -39,6 +40,7 @@ import enUSHeader from './locales/en-US/core/header.json'; import enUSChat from './locales/en-US/features/chat.json'; import enUSExtension from './locales/en-US/features/extension.json'; import enUSConversation from './locales/en-US/features/conversation.json'; +import enUSSessionManagement from './locales/en-US/features/session-management.json'; import enUSToolUse from './locales/en-US/features/tool-use.json'; import enUSProvider from './locales/en-US/features/provider.json'; import enUSPlatform from './locales/en-US/features/platform.json'; @@ -71,6 +73,7 @@ export const translations = { chat: zhCNChat, extension: zhCNExtension, conversation: zhCNConversation, + 'session-management': zhCNSessionManagement, tooluse: zhCNToolUse, provider: zhCNProvider, platform: zhCNPlatform, @@ -105,6 +108,7 @@ export const translations = { chat: enUSChat, extension: enUSExtension, conversation: enUSConversation, + 'session-management': enUSSessionManagement, tooluse: enUSToolUse, provider: enUSProvider, platform: enUSPlatform, diff --git a/dashboard/src/layouts/full/vertical-sidebar/sidebarItem.ts b/dashboard/src/layouts/full/vertical-sidebar/sidebarItem.ts index e2acd288e..43f062d1c 100644 --- a/dashboard/src/layouts/full/vertical-sidebar/sidebarItem.ts +++ b/dashboard/src/layouts/full/vertical-sidebar/sidebarItem.ts @@ -59,7 +59,7 @@ const sidebarItem: menu[] = [ to: '/conversation' }, { - title: '会话管理', + title: 'core.navigation.sessionManagement', icon: 'mdi-account-group', to: '/session-management' }, diff --git a/dashboard/src/views/SessionManagementPage.vue b/dashboard/src/views/SessionManagementPage.vue index 5e29ce1ef..1e46e9164 100644 --- a/dashboard/src/views/SessionManagementPage.vue +++ b/dashboard/src/views/SessionManagementPage.vue @@ -1,24 +1,24 @@ @@ -236,8 +236,8 @@ @@ -248,7 +248,7 @@ mdi-cog-outline - 批量操作 + {{ tm('batchOperations.title') }} @@ -259,7 +259,7 @@ :items="personaOptions" item-title="label" item-value="value" - label="批量设置人格" + :label="tm('batchOperations.setPersona')" hide-details clearable variant="outlined" @@ -272,7 +272,7 @@ :items="chatProviderOptions" item-title="label" item-value="value" - label="批量设置 Chat Provider" + :label="tm('batchOperations.setChatProvider')" hide-details clearable variant="outlined" @@ -287,7 +287,7 @@ :disabled="!batchPersona && !batchChatProvider" :loading="batchUpdating" > - 应用批量设置 + {{ tm('buttons.apply') }} @@ -299,7 +299,7 @@ mdi-pencil - 插件管理 - {{ selectedSessionForPlugin.session_name }} + {{ tm('pluginManagement.title') }} - {{ selectedSessionForPlugin.session_name }} mdi-close @@ -309,8 +309,8 @@
mdi-puzzle-outline -
暂无可用插件
-
目前没有激活的插件
+
{{ tm('pluginManagement.noPlugins') }}
+
{{ tm('pluginManagement.noPluginsDesc') }}
@@ -330,7 +330,7 @@ - 作者: {{ plugin.author }} + {{ tm('pluginManagement.author') }}: {{ plugin.author }}