Unverified Commit dbb83f98 authored by Timothy Jaeryang Baek's avatar Timothy Jaeryang Baek Committed by GitHub
Browse files

Merge pull request #2856 from open-webui/dev

0.2.5
parents f28877f4 e1889b0c
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
"About": "Giới thiệu", "About": "Giới thiệu",
"Account": "Tài khoản", "Account": "Tài khoản",
"Accurate information": "Thông tin chính xác", "Accurate information": "Thông tin chính xác",
"Active Users": "",
"Add": "Thêm", "Add": "Thêm",
"Add a model id": "Thêm model id", "Add a model id": "Thêm model id",
"Add a short description about what this model does": "Thêm mô tả ngắn về những khả năng của model", "Add a short description about what this model does": "Thêm mô tả ngắn về những khả năng của model",
...@@ -225,7 +226,6 @@ ...@@ -225,7 +226,6 @@
"Followed instructions perfectly": "Tuân theo chỉ dẫn một cách hoàn hảo", "Followed instructions perfectly": "Tuân theo chỉ dẫn một cách hoàn hảo",
"Format your variables using square brackets like this:": "Định dạng các biến của bạn bằng cách sử dụng dấu ngoặc vuông như thế này:", "Format your variables using square brackets like this:": "Định dạng các biến của bạn bằng cách sử dụng dấu ngoặc vuông như thế này:",
"Frequency Penalty": "Hình phạt tần số", "Frequency Penalty": "Hình phạt tần số",
"Full Screen Mode": "Chế độ Toàn màn hình",
"General": "Cài đặt chung", "General": "Cài đặt chung",
"General Settings": "Cấu hình chung", "General Settings": "Cấu hình chung",
"Generating search query": "Tạo truy vấn tìm kiếm", "Generating search query": "Tạo truy vấn tìm kiếm",
...@@ -378,6 +378,7 @@ ...@@ -378,6 +378,7 @@
"Reranking Model": "Reranking Model", "Reranking Model": "Reranking Model",
"Reranking model disabled": "Reranking model disabled", "Reranking model disabled": "Reranking model disabled",
"Reranking model set to \"{{reranking_model}}\"": "Reranking model set to \"{{reranking_model}}\"", "Reranking model set to \"{{reranking_model}}\"": "Reranking model set to \"{{reranking_model}}\"",
"Reset Upload Directory": "",
"Reset Vector Storage": "Cài đặt lại Vector Storage", "Reset Vector Storage": "Cài đặt lại Vector Storage",
"Response AutoCopy to Clipboard": "Tự động Sao chép Phản hồi vào clipboard", "Response AutoCopy to Clipboard": "Tự động Sao chép Phản hồi vào clipboard",
"Role": "Vai trò", "Role": "Vai trò",
...@@ -524,6 +525,7 @@ ...@@ -524,6 +525,7 @@
"What’s New in": "Thông tin mới về", "What’s New in": "Thông tin mới về",
"When history is turned off, new chats on this browser won't appear in your history on any of your devices.": "Khi chế độ lịch sử chat đã tắt, các nội dung chat mới trên trình duyệt này sẽ không xuất hiện trên bất kỳ thiết bị nào của bạn.", "When history is turned off, new chats on this browser won't appear in your history on any of your devices.": "Khi chế độ lịch sử chat đã tắt, các nội dung chat mới trên trình duyệt này sẽ không xuất hiện trên bất kỳ thiết bị nào của bạn.",
"Whisper (Local)": "Whisper (Local)", "Whisper (Local)": "Whisper (Local)",
"Widescreen Mode": "",
"Workspace": "Workspace", "Workspace": "Workspace",
"Write a prompt suggestion (e.g. Who are you?)": "Hãy viết một prompt (vd: Bạn là ai?)", "Write a prompt suggestion (e.g. Who are you?)": "Hãy viết một prompt (vd: Bạn là ai?)",
"Write a summary in 50 words that summarizes [topic or keyword].": "Viết một tóm tắt trong vòng 50 từ cho [chủ đề hoặc từ khóa].", "Write a summary in 50 words that summarizes [topic or keyword].": "Viết một tóm tắt trong vòng 50 từ cho [chủ đề hoặc từ khóa].",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"'s', 'm', 'h', 'd', 'w' or '-1' for no expiration.": "'s', 'm', 'h', 'd', 'w' 或 '-1' 表示无过期时间。", "'s', 'm', 'h', 'd', 'w' or '-1' for no expiration.": "'s', 'm', 'h', 'd', 'w' 或 '-1' 表示无过期时间。",
"(Beta)": "(测试版)", "(Beta)": "(测试版)",
"(e.g. `sh webui.sh --api`)": "(例如 `sh webui.sh --api`)", "(e.g. `sh webui.sh --api`)": "(例如 `sh webui.sh --api`)",
"(latest)": "(正式版)", "(latest)": "(最新版)",
"{{ models }}": "{{ models }}", "{{ models }}": "{{ models }}",
"{{ owner }}: You cannot delete a base model": "{{ owner }}:您不能删除基础模型", "{{ owner }}: You cannot delete a base model": "{{ owner }}:您不能删除基础模型",
"{{modelName}} is thinking...": "{{modelName}} 正在思考...", "{{modelName}} is thinking...": "{{modelName}} 正在思考...",
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
"a user": "用户", "a user": "用户",
"About": "关于", "About": "关于",
"Account": "账号", "Account": "账号",
"Accurate information": "准确的信息", "Accurate information": "提供的信息很准确",
"Active Users": "当前在线用户",
"Add": "添加", "Add": "添加",
"Add a model id": "添加一个模型 ID", "Add a model id": "添加一个模型 ID",
"Add a short description about what this model does": "添加有关该模型功能的简短描述", "Add a short description about what this model does": "添加有关该模型功能的简短描述",
...@@ -37,7 +38,7 @@ ...@@ -37,7 +38,7 @@
"All Users": "所有用户", "All Users": "所有用户",
"Allow": "允许", "Allow": "允许",
"Allow Chat Deletion": "允许删除聊天记录", "Allow Chat Deletion": "允许删除聊天记录",
"Allow non-local voices": "", "Allow non-local voices": "允许调用非本地音色",
"alphanumeric characters and hyphens": "字母数字字符和连字符", "alphanumeric characters and hyphens": "字母数字字符和连字符",
"Already have an account?": "已经拥有账号了?", "Already have an account?": "已经拥有账号了?",
"an assistant": "助手", "an assistant": "助手",
...@@ -61,9 +62,9 @@ ...@@ -61,9 +62,9 @@
"Auto-send input after 3 sec.": "3 秒后自动发送输入框内容", "Auto-send input after 3 sec.": "3 秒后自动发送输入框内容",
"AUTOMATIC1111 Base URL": "AUTOMATIC1111 基础地址", "AUTOMATIC1111 Base URL": "AUTOMATIC1111 基础地址",
"AUTOMATIC1111 Base URL is required.": "需要 AUTOMATIC1111 基础地址。", "AUTOMATIC1111 Base URL is required.": "需要 AUTOMATIC1111 基础地址。",
"available!": "可用!", "available!": "版本可用!",
"Back": "返回", "Back": "返回",
"Bad Response": "较差回复", "Bad Response": "点踩回复",
"Banners": "公告横幅", "Banners": "公告横幅",
"Base Model (From)": "基础模型 (来自)", "Base Model (From)": "基础模型 (来自)",
"before": "对话", "before": "对话",
...@@ -147,7 +148,7 @@ ...@@ -147,7 +148,7 @@
"Deleted {{deleteModelTag}}": "已删除 {{deleteModelTag}}", "Deleted {{deleteModelTag}}": "已删除 {{deleteModelTag}}",
"Deleted {{name}}": "已删除 {{name}}", "Deleted {{name}}": "已删除 {{name}}",
"Description": "描述", "Description": "描述",
"Didn't fully follow instructions": "没有完全遵循指令", "Didn't fully follow instructions": "没有完全遵照指示",
"Discover a model": "发现更多模型", "Discover a model": "发现更多模型",
"Discover a prompt": "发现更多提示词", "Discover a prompt": "发现更多提示词",
"Discover, download, and explore custom prompts": "发现、下载并探索更多自定义提示词", "Discover, download, and explore custom prompts": "发现、下载并探索更多自定义提示词",
...@@ -155,7 +156,7 @@ ...@@ -155,7 +156,7 @@
"Display the username instead of You in the Chat": "在对话中显示用户名而不是“你”", "Display the username instead of You in the Chat": "在对话中显示用户名而不是“你”",
"Document": "文档", "Document": "文档",
"Document Settings": "文档设置", "Document Settings": "文档设置",
"Documentation": "", "Documentation": "帮助文档",
"Documents": "文档", "Documents": "文档",
"does not make any external connections, and your data stays securely on your locally hosted server.": "不会与外部建立任何连接,您的数据会安全地存储在本地托管的服务器上。", "does not make any external connections, and your data stays securely on your locally hosted server.": "不会与外部建立任何连接,您的数据会安全地存储在本地托管的服务器上。",
"Don't Allow": "不允许", "Don't Allow": "不允许",
...@@ -169,8 +170,8 @@ ...@@ -169,8 +170,8 @@
"Edit": "编辑", "Edit": "编辑",
"Edit Doc": "编辑文档", "Edit Doc": "编辑文档",
"Edit User": "编辑用户", "Edit User": "编辑用户",
"Email": "邮箱地址", "Email": "电子邮箱",
"Embedding Batch Size": "", "Embedding Batch Size": "嵌入层批处理大小 (Embedding Batch Size)",
"Embedding Model": "语义向量模型", "Embedding Model": "语义向量模型",
"Embedding Model Engine": "语义向量模型引擎", "Embedding Model Engine": "语义向量模型引擎",
"Embedding model set to \"{{embedding_model}}\"": "语义向量模型设置为 \"{{embedding_model}}\"", "Embedding model set to \"{{embedding_model}}\"": "语义向量模型设置为 \"{{embedding_model}}\"",
...@@ -178,7 +179,7 @@ ...@@ -178,7 +179,7 @@
"Enable Community Sharing": "启用分享至社区", "Enable Community Sharing": "启用分享至社区",
"Enable New Sign Ups": "允许新用户注册", "Enable New Sign Ups": "允许新用户注册",
"Enable Web Search": "启用网络搜索", "Enable Web Search": "启用网络搜索",
"Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "确保您的 CSV 文件按以下顺序包含 4 列: 姓名、邮箱地址、密码、角色。", "Ensure your CSV file includes 4 columns in this order: Name, Email, Password, Role.": "确保您的 CSV 文件按以下顺序包含 4 列: 姓名、电子邮箱、密码、角色。",
"Enter {{role}} message here": "在此处输入 {{role}} 信息", "Enter {{role}} message here": "在此处输入 {{role}} 信息",
"Enter a detail about yourself for your LLMs to recall": "输入 LLM 可以记住的信息", "Enter a detail about yourself for your LLMs to recall": "输入 LLM 可以记住的信息",
"Enter Brave Search API Key": "输入 Brave Search API 密钥", "Enter Brave Search API Key": "输入 Brave Search API 密钥",
...@@ -199,7 +200,7 @@ ...@@ -199,7 +200,7 @@
"Enter Top K": "输入 Top K", "Enter Top K": "输入 Top K",
"Enter URL (e.g. http://127.0.0.1:7860/)": "输入地址 (例如:http://127.0.0.1:7860/)", "Enter URL (e.g. http://127.0.0.1:7860/)": "输入地址 (例如:http://127.0.0.1:7860/)",
"Enter URL (e.g. http://localhost:11434)": "输入地址 (例如:http://localhost:11434)", "Enter URL (e.g. http://localhost:11434)": "输入地址 (例如:http://localhost:11434)",
"Enter Your Email": "输入您的邮箱地址", "Enter Your Email": "输入您的电子邮箱",
"Enter Your Full Name": "输入您的名称", "Enter Your Full Name": "输入您的名称",
"Enter Your Password": "输入您的密码", "Enter Your Password": "输入您的密码",
"Enter Your Role": "输入您的权限组", "Enter Your Role": "输入您的权限组",
...@@ -207,14 +208,14 @@ ...@@ -207,14 +208,14 @@
"Experimental": "实验性", "Experimental": "实验性",
"Export": "导出", "Export": "导出",
"Export All Chats (All Users)": "导出所有用户对话", "Export All Chats (All Users)": "导出所有用户对话",
"Export chat (.json)": "", "Export chat (.json)": "JSON 文件 (.json)",
"Export Chats": "导出对话", "Export Chats": "导出对话",
"Export Documents Mapping": "导出文档映射", "Export Documents Mapping": "导出文档映射",
"Export Models": "导出模型", "Export Models": "导出模型",
"Export Prompts": "导出提示词", "Export Prompts": "导出提示词",
"Failed to create API Key.": "无法创建 API 密钥。", "Failed to create API Key.": "无法创建 API 密钥。",
"Failed to read clipboard contents": "无法读取剪贴板内容", "Failed to read clipboard contents": "无法读取剪贴板内容",
"Failed to update settings": "", "Failed to update settings": "无法更新设置",
"February": "二月", "February": "二月",
"Feel free to add specific details": "欢迎补充具体细节", "Feel free to add specific details": "欢迎补充具体细节",
"File Mode": "文件模式", "File Mode": "文件模式",
...@@ -222,18 +223,17 @@ ...@@ -222,18 +223,17 @@
"Fingerprint spoofing detected: Unable to use initials as avatar. Defaulting to default profile image.": "检测到指纹伪造:无法使用姓名缩写作为头像。默认使用默认个人形象。", "Fingerprint spoofing detected: Unable to use initials as avatar. Defaulting to default profile image.": "检测到指纹伪造:无法使用姓名缩写作为头像。默认使用默认个人形象。",
"Fluidly stream large external response chunks": "流畅地传输外部大型响应块数据", "Fluidly stream large external response chunks": "流畅地传输外部大型响应块数据",
"Focus chat input": "聚焦对话输入", "Focus chat input": "聚焦对话输入",
"Followed instructions perfectly": "完全遵循指令", "Followed instructions perfectly": "完全按照指示执行",
"Format your variables using square brackets like this:": "使用这样的方括号格式化你的变量:", "Format your variables using square brackets like this:": "使用这样的方括号格式化你的变量:",
"Frequency Penalty": "频率惩罚", "Frequency Penalty": "频率惩罚",
"Full Screen Mode": "宽屏模式",
"General": "通用", "General": "通用",
"General Settings": "通用设置", "General Settings": "通用设置",
"Generating search query": "生成搜索查询", "Generating search query": "生成搜索查询",
"Generation Info": "生成信息", "Generation Info": "生成信息",
"Good Response": "优秀回复", "Good Response": "点赞回复",
"Google PSE API Key": "Google PSE API 密钥", "Google PSE API Key": "Google PSE API 密钥",
"Google PSE Engine Id": "Google PSE 引擎 ID", "Google PSE Engine Id": "Google PSE 引擎 ID",
"h:mm a": "h:mm a", "h:mm a": "HH:mm",
"has no conversations.": "没有对话。", "has no conversations.": "没有对话。",
"Hello, {{name}}": "你好,{{name}}", "Hello, {{name}}": "你好,{{name}}",
"Help": "帮助", "Help": "帮助",
...@@ -286,8 +286,8 @@ ...@@ -286,8 +286,8 @@
"Mirostat": "Mirostat", "Mirostat": "Mirostat",
"Mirostat Eta": "Mirostat Eta", "Mirostat Eta": "Mirostat Eta",
"Mirostat Tau": "Mirostat Tau", "Mirostat Tau": "Mirostat Tau",
"MMMM DD, YYYY": "YYYY年 M月 D日", "MMMM DD, YYYY": "YYYY年 MM月 DD日",
"MMMM DD, YYYY HH:mm": "YYYY年 M月 D日 HH:mm", "MMMM DD, YYYY HH:mm": "YYYY年 MM月 DD日 HH:mm",
"Model '{{modelName}}' has been successfully downloaded.": "模型'{{modelName}}'已成功下载。", "Model '{{modelName}}' has been successfully downloaded.": "模型'{{modelName}}'已成功下载。",
"Model '{{modelTag}}' is already in queue for downloading.": "模型'{{modelTag}}'已在下载队列中。", "Model '{{modelTag}}' is already in queue for downloading.": "模型'{{modelTag}}'已在下载队列中。",
"Model {{modelId}} not found": "未找到模型 {{modelId}}", "Model {{modelId}} not found": "未找到模型 {{modelId}}",
...@@ -311,7 +311,7 @@ ...@@ -311,7 +311,7 @@
"No search query generated": "未生成搜索查询", "No search query generated": "未生成搜索查询",
"No source available": "没有可用来源", "No source available": "没有可用来源",
"None": "无", "None": "无",
"Not factually correct": "事实不符", "Not factually correct": "事实并非如此",
"Note: If you set a minimum score, the search will only return documents with a score greater than or equal to the minimum score.": "注意:如果设置了最低分数,搜索只会返回分数大于或等于最低分数的文档。", "Note: If you set a minimum score, the search will only return documents with a score greater than or equal to the minimum score.": "注意:如果设置了最低分数,搜索只会返回分数大于或等于最低分数的文档。",
"Notifications": "桌面通知", "Notifications": "桌面通知",
"November": "十一月", "November": "十一月",
...@@ -351,7 +351,7 @@ ...@@ -351,7 +351,7 @@
"Pipelines Valves": "Pipeline 值", "Pipelines Valves": "Pipeline 值",
"Plain text (.txt)": "TXT 文档 (.txt)", "Plain text (.txt)": "TXT 文档 (.txt)",
"Playground": "AI 对话游乐场", "Playground": "AI 对话游乐场",
"Positive attitude": "较为积极的态度", "Positive attitude": "积极的态度",
"Previous 30 days": "过去 30 天", "Previous 30 days": "过去 30 天",
"Previous 7 days": "过去 7 天", "Previous 7 days": "过去 7 天",
"Profile Image": "用户头像", "Profile Image": "用户头像",
...@@ -367,7 +367,7 @@ ...@@ -367,7 +367,7 @@
"Read Aloud": "朗读", "Read Aloud": "朗读",
"Record voice": "录音", "Record voice": "录音",
"Redirecting you to OpenWebUI Community": "正在将您重定向到 OpenWebUI 社区", "Redirecting you to OpenWebUI Community": "正在将您重定向到 OpenWebUI 社区",
"Refused when it shouldn't have": "在不应拒绝时拒绝", "Refused when it shouldn't have": "无理拒绝",
"Regenerate": "重新生成", "Regenerate": "重新生成",
"Release Notes": "更新日志", "Release Notes": "更新日志",
"Remove": "移除", "Remove": "移除",
...@@ -378,6 +378,7 @@ ...@@ -378,6 +378,7 @@
"Reranking Model": "重排模型", "Reranking Model": "重排模型",
"Reranking model disabled": "重排模型已禁用", "Reranking model disabled": "重排模型已禁用",
"Reranking model set to \"{{reranking_model}}\"": "重排模型设置为 \"{{reranking_model}}\"", "Reranking model set to \"{{reranking_model}}\"": "重排模型设置为 \"{{reranking_model}}\"",
"Reset Upload Directory": "重置上传目录",
"Reset Vector Storage": "重置向量存储", "Reset Vector Storage": "重置向量存储",
"Response AutoCopy to Clipboard": "自动复制回复到剪贴板", "Response AutoCopy to Clipboard": "自动复制回复到剪贴板",
"Role": "权限组", "Role": "权限组",
...@@ -398,7 +399,7 @@ ...@@ -398,7 +399,7 @@
"Search Models": "搜索模型", "Search Models": "搜索模型",
"Search Prompts": "搜索提示词", "Search Prompts": "搜索提示词",
"Search Result Count": "搜索结果数量", "Search Result Count": "搜索结果数量",
"Searched {{count}} sites_other": "搜索 {{count}} 个网站", "Searched {{count}} sites_other": "检索到 {{count}} 个网站",
"Searching the web for '{{searchQuery}}'": "在网络中搜索 '{{searchQuery}}' ", "Searching the web for '{{searchQuery}}'": "在网络中搜索 '{{searchQuery}}' ",
"Searxng Query URL": "Searxng 查询 URL", "Searxng Query URL": "Searxng 查询 URL",
"See readme.md for instructions": "查看 readme.md 以获取说明", "See readme.md for instructions": "查看 readme.md 以获取说明",
...@@ -413,7 +414,7 @@ ...@@ -413,7 +414,7 @@
"Select model": "选择模型", "Select model": "选择模型",
"Selected model(s) do not support image inputs": "已选择的模型不支持发送图像", "Selected model(s) do not support image inputs": "已选择的模型不支持发送图像",
"Send": "发送", "Send": "发送",
"Send a Message": "发送消息", "Send a Message": "输入消息",
"Send message": "发送消息", "Send message": "发送消息",
"September": "九月", "September": "九月",
"Serper API Key": "Serper API 密钥", "Serper API Key": "Serper API 密钥",
...@@ -430,15 +431,15 @@ ...@@ -430,15 +431,15 @@
"Set Voice": "设置音色", "Set Voice": "设置音色",
"Settings": "设置", "Settings": "设置",
"Settings saved successfully!": "设置已保存", "Settings saved successfully!": "设置已保存",
"Settings updated successfully": "", "Settings updated successfully": "设置成功更新",
"Share": "分享", "Share": "分享",
"Share Chat": "分享对话", "Share Chat": "分享对话",
"Share to OpenWebUI Community": "分享到 OpenWebUI 社区", "Share to OpenWebUI Community": "分享到 OpenWebUI 社区",
"short-summary": "简短总结", "short-summary": "简短总结",
"Show": "显示", "Show": "显示",
"Show Admin Details in Account Pending Overlay": "", "Show Admin Details in Account Pending Overlay": "在用户待定界面中显示管理员邮箱等详细信息",
"Show shortcuts": "显示快捷方式", "Show shortcuts": "显示快捷方式",
"Showcased creativity": "显示出较强的创造力", "Showcased creativity": "很有创意",
"sidebar": "侧边栏", "sidebar": "侧边栏",
"Sign in": "登录", "Sign in": "登录",
"Sign Out": "登出", "Sign Out": "登出",
...@@ -469,7 +470,7 @@ ...@@ -469,7 +470,7 @@
"Theme": "主题", "Theme": "主题",
"This ensures that your valuable conversations are securely saved to your backend database. Thank you!": "这将确保您的宝贵对话被安全地保存到后台数据库中。感谢!", "This ensures that your valuable conversations are securely saved to your backend database. Thank you!": "这将确保您的宝贵对话被安全地保存到后台数据库中。感谢!",
"This setting does not sync across browsers or devices.": "此设置不会在浏览器或设备之间同步。", "This setting does not sync across browsers or devices.": "此设置不会在浏览器或设备之间同步。",
"Thorough explanation": "详尽的解释", "Thorough explanation": "解释较为详细",
"Tip: Update multiple variable slots consecutively by pressing the tab key in the chat input after each replacement.": "提示:在每次替换后,在对话输入中按 Tab 键可以连续更新多个变量。", "Tip: Update multiple variable slots consecutively by pressing the tab key in the chat input after each replacement.": "提示:在每次替换后,在对话输入中按 Tab 键可以连续更新多个变量。",
"Title": "标题", "Title": "标题",
"Title (e.g. Tell me a fun fact)": "标题(例如 给我讲一个有趣的事实)", "Title (e.g. Tell me a fun fact)": "标题(例如 给我讲一个有趣的事实)",
...@@ -524,6 +525,7 @@ ...@@ -524,6 +525,7 @@
"What’s New in": "最近更新内容于", "What’s New in": "最近更新内容于",
"When history is turned off, new chats on this browser won't appear in your history on any of your devices.": "当关闭历史记录功能时,在此浏览器上新的对话记录将不会同步到您其他设备的历史记录中。", "When history is turned off, new chats on this browser won't appear in your history on any of your devices.": "当关闭历史记录功能时,在此浏览器上新的对话记录将不会同步到您其他设备的历史记录中。",
"Whisper (Local)": "Whisper(本地)", "Whisper (Local)": "Whisper(本地)",
"Widescreen Mode": "宽屏模式",
"Workspace": "工作空间", "Workspace": "工作空间",
"Write a prompt suggestion (e.g. Who are you?)": "写一个提示词建议(例如:你是谁?)", "Write a prompt suggestion (e.g. Who are you?)": "写一个提示词建议(例如:你是谁?)",
"Write a summary in 50 words that summarizes [topic or keyword].": "用 50 个字写一个总结 [主题或关键词]。", "Write a summary in 50 words that summarizes [topic or keyword].": "用 50 个字写一个总结 [主题或关键词]。",
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
"About": "關於", "About": "關於",
"Account": "帳號", "Account": "帳號",
"Accurate information": "準確信息", "Accurate information": "準確信息",
"Active Users": "",
"Add": "新增", "Add": "新增",
"Add a model id": "新增模型 ID", "Add a model id": "新增模型 ID",
"Add a short description about what this model does": "為這個模型添加一個簡短描述", "Add a short description about what this model does": "為這個模型添加一個簡短描述",
...@@ -225,7 +226,6 @@ ...@@ -225,7 +226,6 @@
"Followed instructions perfectly": "完全遵循指示", "Followed instructions perfectly": "完全遵循指示",
"Format your variables using square brackets like this:": "像這樣使用方括號來格式化你的變數:", "Format your variables using square brackets like this:": "像這樣使用方括號來格式化你的變數:",
"Frequency Penalty": "頻率懲罰", "Frequency Penalty": "頻率懲罰",
"Full Screen Mode": "全螢幕模式",
"General": "常用", "General": "常用",
"General Settings": "常用設定", "General Settings": "常用設定",
"Generating search query": "生成搜索查詢", "Generating search query": "生成搜索查詢",
...@@ -378,6 +378,7 @@ ...@@ -378,6 +378,7 @@
"Reranking Model": "重新排序模型", "Reranking Model": "重新排序模型",
"Reranking model disabled": "重新排序模型已禁用", "Reranking model disabled": "重新排序模型已禁用",
"Reranking model set to \"{{reranking_model}}\"": "重新排序模型設定為 \"{{reranking_model}}\"", "Reranking model set to \"{{reranking_model}}\"": "重新排序模型設定為 \"{{reranking_model}}\"",
"Reset Upload Directory": "",
"Reset Vector Storage": "重置向量儲存空間", "Reset Vector Storage": "重置向量儲存空間",
"Response AutoCopy to Clipboard": "自動複製回答到剪貼簿", "Response AutoCopy to Clipboard": "自動複製回答到剪貼簿",
"Role": "Role", "Role": "Role",
...@@ -524,6 +525,7 @@ ...@@ -524,6 +525,7 @@
"What’s New in": "全新內容", "What’s New in": "全新內容",
"When history is turned off, new chats on this browser won't appear in your history on any of your devices.": "當歷史被關閉時,這個瀏覽器上的新聊天將不會出現在任何裝置的歷史記錄中", "When history is turned off, new chats on this browser won't appear in your history on any of your devices.": "當歷史被關閉時,這個瀏覽器上的新聊天將不會出現在任何裝置的歷史記錄中",
"Whisper (Local)": "Whisper(本機)", "Whisper (Local)": "Whisper(本機)",
"Widescreen Mode": "",
"Workspace": "工作區", "Workspace": "工作區",
"Write a prompt suggestion (e.g. Who are you?)": "寫一個提示詞建議(例如:你是誰?)", "Write a prompt suggestion (e.g. Who are you?)": "寫一個提示詞建議(例如:你是誰?)",
"Write a summary in 50 words that summarizes [topic or keyword].": "寫一個 50 字的摘要來概括 [主題或關鍵詞]。", "Write a summary in 50 words that summarizes [topic or keyword].": "寫一個 50 字的摘要來概括 [主題或關鍵詞]。",
......
...@@ -2,6 +2,7 @@ import { APP_NAME } from '$lib/constants'; ...@@ -2,6 +2,7 @@ import { APP_NAME } from '$lib/constants';
import { type Writable, writable } from 'svelte/store'; import { type Writable, writable } from 'svelte/store';
import type { GlobalModelConfig, ModelConfig } from '$lib/apis'; import type { GlobalModelConfig, ModelConfig } from '$lib/apis';
import type { Banner } from '$lib/types'; import type { Banner } from '$lib/types';
import type { Socket } from 'socket.io-client';
// Backend // Backend
export const WEBUI_NAME = writable(APP_NAME); export const WEBUI_NAME = writable(APP_NAME);
...@@ -13,6 +14,10 @@ export const MODEL_DOWNLOAD_POOL = writable({}); ...@@ -13,6 +14,10 @@ export const MODEL_DOWNLOAD_POOL = writable({});
export const mobile = writable(false); export const mobile = writable(false);
export const socket: Writable<null | Socket> = writable(null);
export const activeUserCount: Writable<null | number> = writable(null);
export const USAGE_POOL: Writable<null | string[]> = writable(null);
export const theme = writable('system'); export const theme = writable('system');
export const chatId = writable(''); export const chatId = writable('');
......
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
<div class="app relative"> <div class="app relative">
<div <div
class=" text-gray-700 dark:text-gray-100 bg-white dark:bg-gray-900 min-h-screen overflow-auto flex flex-row" class=" text-gray-700 dark:text-gray-100 bg-white dark:bg-gray-900 h-screen max-h-[100dvh] overflow-auto flex flex-row"
> >
{#if loaded} {#if loaded}
{#if !['user', 'admin'].includes($user.role)} {#if !['user', 'admin'].includes($user.role)}
......
...@@ -303,6 +303,31 @@ ...@@ -303,6 +303,31 @@
</svg> </svg>
</button> </button>
</Tooltip> </Tooltip>
{:else}
<Tooltip content={$i18n.t('Edit User')}>
<button
class="self-center w-fit text-sm px-2 py-2 hover:bg-black/5 dark:hover:bg-white/5 rounded-xl"
on:click={async () => {
showEditUserModal = !showEditUserModal;
selectedUser = user;
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-4 h-4"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"
/>
</svg>
</button>
</Tooltip>
{/if} {/if}
</div> </div>
</td> </td>
......
<script> <script>
import { io } from 'socket.io-client';
import { onMount, tick, setContext } from 'svelte'; import { onMount, tick, setContext } from 'svelte';
import { config, user, theme, WEBUI_NAME, mobile } from '$lib/stores'; import {
config,
user,
theme,
WEBUI_NAME,
mobile,
socket,
activeUserCount,
USAGE_POOL
} from '$lib/stores';
import { goto } from '$app/navigation'; import { goto } from '$app/navigation';
import { Toaster, toast } from 'svelte-sonner'; import { Toaster, toast } from 'svelte-sonner';
...@@ -12,7 +23,7 @@ ...@@ -12,7 +23,7 @@
import 'tippy.js/dist/tippy.css'; import 'tippy.js/dist/tippy.css';
import { WEBUI_BASE_URL } from '$lib/constants'; import { WEBUI_BASE_URL, WEBUI_HOSTNAME } from '$lib/constants';
import i18n, { initI18n, getLanguages } from '$lib/i18n'; import i18n, { initI18n, getLanguages } from '$lib/i18n';
setContext('i18n', i18n); setContext('i18n', i18n);
...@@ -55,10 +66,30 @@ ...@@ -55,10 +66,30 @@
if (backendConfig) { if (backendConfig) {
// Save Backend Status to Store // Save Backend Status to Store
await config.set(backendConfig); await config.set(backendConfig);
await WEBUI_NAME.set(backendConfig.name); await WEBUI_NAME.set(backendConfig.name);
if ($config) { if ($config) {
const _socket = io(`${WEBUI_BASE_URL}`, {
path: '/ws/socket.io',
auth: { token: localStorage.token }
});
_socket.on('connect', () => {
console.log('connected');
});
await socket.set(_socket);
_socket.on('user-count', (data) => {
console.log('user-count', data);
activeUserCount.set(data.count);
});
_socket.on('usage', (data) => {
console.log('usage', data);
USAGE_POOL.set(data['models']);
});
if (localStorage.token) { if (localStorage.token) {
// Get Session User Info // Get Session User Info
const sessionUser = await getSessionUser(localStorage.token).catch((error) => { const sessionUser = await getSessionUser(localStorage.token).catch((error) => {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
import { userSignIn, userSignUp } from '$lib/apis/auths'; import { userSignIn, userSignUp } from '$lib/apis/auths';
import Spinner from '$lib/components/common/Spinner.svelte'; import Spinner from '$lib/components/common/Spinner.svelte';
import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants'; import { WEBUI_API_BASE_URL, WEBUI_BASE_URL } from '$lib/constants';
import { WEBUI_NAME, config, user } from '$lib/stores'; import { WEBUI_NAME, config, user, socket } from '$lib/stores';
import { onMount, getContext } from 'svelte'; import { onMount, getContext } from 'svelte';
import { toast } from 'svelte-sonner'; import { toast } from 'svelte-sonner';
import { generateInitialsImage, canvasPixelTest } from '$lib/utils'; import { generateInitialsImage, canvasPixelTest } from '$lib/utils';
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
console.log(sessionUser); console.log(sessionUser);
toast.success($i18n.t(`You're now logged in.`)); toast.success($i18n.t(`You're now logged in.`));
localStorage.token = sessionUser.token; localStorage.token = sessionUser.token;
$socket.emit('user-join', { auth: { token: sessionUser.token } });
await user.set(sessionUser); await user.set(sessionUser);
goto('/'); goto('/');
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment