feat(playground): enhance SSE debugging and add image paste support with i18n

- Add SSEViewer component for interactive SSE message inspection
  * Display SSE data stream with collapsible panels
  * Show parsed JSON with syntax highlighting
  * Display key information badges (content, tokens, finish reason)
  * Support copy individual or all SSE messages
  * Show error messages with detailed information

- Support Ctrl+V to paste images in chat input
  * Enable image paste in CustomInputRender component
  * Auto-detect and add pasted images to image list
  * Show toast notifications for paste results

- Add complete i18n support for 6 languages
  * Chinese (zh): Complete translations
  * English (en): Complete translations
  * Japanese (ja): Add 28 new translations
  * French (fr): Add 28 new translations
  * Russian (ru): Add 28 new translations
  * Vietnamese (vi): Add 32 new translations

- Update .gitignore to exclude data directory
This commit is contained in:
ImogeneOctaviap794
2025-11-26 16:54:11 +08:00
parent a6a20a2069
commit 9140dee70c
20 changed files with 810 additions and 65 deletions

View File

@@ -407,7 +407,7 @@
"共 {{count}} 个密钥_other": "{{count}} keys",
"共 {{count}} 个模型": "{{count}} models",
"共 {{total}} 项,当前显示 {{start}}-{{end}} 项": "{{total}} items total, showing {{start}}-{{end}} items",
"关": "close",
"关": "Off",
"关于": "About",
"关于我们": "About Us",
"关于系统的详细信息": "Detailed information about the system",
@@ -788,7 +788,7 @@
"应用覆盖": "Apply overwrite",
"建立连接时发生错误": "Error occurred while establishing connection",
"建议在生产环境中使用 MySQL 或 PostgreSQL 数据库,或确保 SQLite 数据库文件已映射到宿主机的持久化存储。": "It is recommended to use MySQL or PostgreSQL databases in production environments, or ensure that the SQLite database file is mapped to the persistent storage of the host machine.",
"开": "open",
"开": "On",
"开启之后会清除用户提示词中的": "After enabling, the user prompt will be cleared",
"开启之后将上游地址替换为服务器地址": "After enabling, the upstream address will be replaced with the server address",
"开启后,仅\"消费\"和\"错误\"日志将记录您的客户端IP地址": "After enabling, only \"consumption\" and \"error\" logs will record your client IP address",
@@ -2004,7 +2004,7 @@
"重试": "Retry",
"钱包管理": "Wallet Management",
"链接中的{key}将自动替换为sk-xxxx{address}将自动替换为系统设置的服务器地址,末尾不带/和/v1": "The {key} in the link will be automatically replaced with sk-xxxx, the {address} will be automatically replaced with the server address in system settings, and the end will not have / and /v1",
"错误": "Error",
"错误": "errors",
"键为分组名称,值为另一个 JSON 对象,键为分组名称,值为该分组的用户的特殊分组倍率,例如:{\"vip\": {\"default\": 0.5, \"test\": 1}},表示 vip 分组的用户在使用default分组的令牌时倍率为0.5使用test分组时倍率为1": "The key is the group name, and the value is another JSON object. The key is the group name, and the value is the special group ratio for users in that group. For example: {\"vip\": {\"default\": 0.5, \"test\": 1}} means that users in the vip group have a ratio of 0.5 when using tokens from the default group, and a ratio of 1 when using tokens from the test group",
"键为原状态码,值为要复写的状态码,仅影响本地判断": "The key is the original status code, and the value is the status code to override, only affects local judgment",
"键为端点类型,值为路径和方法对象": "The key is the endpoint type, the value is the path and method object",
@@ -2113,6 +2113,46 @@
"统一的": "The Unified",
"大模型接口网关": "LLM API Gateway",
"正在跳转 GitHub...": "Redirecting to GitHub...",
"请求超时,请刷新页面后重新发起 GitHub 登录": "Request timed out, please refresh and restart GitHub login"
"请求超时,请刷新页面后重新发起 GitHub 登录": "Request timed out, please refresh and restart GitHub login",
"请先在设置中启用图片功能": "Please enable image function in settings first",
"图片已添加": "Image added",
"无法添加图片": "Cannot add image",
"粘贴图片失败": "Failed to paste image",
"支持 Ctrl+V 粘贴图片": "Support Ctrl+V to paste image",
"已复制全部数据": "All data copied",
"流式响应完成": "Stream completed",
"图片地址": "Image URL",
"已在自定义模式中忽略": "Ignored in custom mode",
"停用": "Disable",
"图片功能在自定义请求体模式下不可用": "Image function is not available in custom request mode",
"启用后可添加图片URL进行多模态对话": "Enable to add image URLs for multimodal conversation",
"点击 + 按钮添加图片URL进行多模态对话": "Click + to add image URLs for multimodal conversation",
"已添加": "Added",
"张图片": "images",
"自定义模式下不可用": "Not available in custom mode",
"控制输出的随机性和创造性": "Controls randomness and creativity of output",
"核采样,控制词汇选择的多样性": "Nucleus sampling, controls diversity of vocabulary selection",
"频率惩罚,减少重复词汇的出现": "Frequency penalty, reduces repetition of words",
"存在惩罚,鼓励讨论新话题": "Presence penalty, encourages new topics",
"流式输出": "Stream Output",
"暂无SSE响应数据": "No SSE response data",
"SSE数据流": "SSE Data Stream",
"解析错误": "Parse Error",
"有 Reasoning": "Has Reasoning",
"全部收起": "Collapse All",
"全部展开": "Expand All",
"SSE 事件": "SSE Event",
"JSON格式错误": "JSON Format Error",
"自定义请求体模式": "Custom Request Body Mode",
"启用此模式后将使用您自定义的请求体发送API请求模型配置面板的参数设置将被忽略。": "When enabled, your custom request body will be used for API requests, and parameter settings in the model configuration panel will be ignored.",
"请求体 JSON": "Request Body JSON",
"格式正确": "Valid Format",
"格式错误": "Invalid Format",
"格式化": "Format",
"请输入有效的JSON格式的请求体。您可以参考预览面板中的默认请求体格式。": "Please enter a valid JSON format request body. You can refer to the default request body format in the preview panel.",
"默认用户消息": "Hello",
"默认助手消息": "Hello! How can I help you today?",
"可选,用于复现结果": "Optional, for reproducible results",
"随机种子 (留空为随机)": "Random seed (leave empty for random)"
}
}
}