From aeefb00de026b1175dd1bbaa2a75093cad71a838 Mon Sep 17 00:00:00 2001 From: n4ze3m Date: Tue, 16 Apr 2024 00:45:22 +0530 Subject: [PATCH] Update localization messages for Chinese, English, and Japanese languages and fix whitespace formatting in isTTSEnabled function in tts.ts --- src/assets/locale/en/common.json | 3 ++- src/assets/locale/ja-JP/common.json | 3 ++- src/assets/locale/zh/common.json | 3 ++- src/components/Option/Prompt/index.tsx | 1 - src/components/Sidepanel/Chat/body.tsx | 4 ++-- src/components/Sidepanel/Chat/empty.tsx | 6 +++--- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/assets/locale/en/common.json b/src/assets/locale/en/common.json index 0a42578..41df538 100644 --- a/src/assets/locale/en/common.json +++ b/src/assets/locale/en/common.json @@ -49,5 +49,6 @@ "noData": "No data", "noHistory": "No chat history", "chatWithCurrentPage": "Chat with current page", - "beta": "Beta" + "beta": "Beta", + "tts": "Read aloud" } \ No newline at end of file diff --git a/src/assets/locale/ja-JP/common.json b/src/assets/locale/ja-JP/common.json index 23b65d2..4ee3a74 100644 --- a/src/assets/locale/ja-JP/common.json +++ b/src/assets/locale/ja-JP/common.json @@ -49,5 +49,6 @@ "noData": "データがありません", "noHistory": "チャット履歴がありません", "chatWithCurrentPage": "現在のページでチャット", - "beta": "ベータ" + "beta": "ベータ", + "tts": "読み上げ" } \ No newline at end of file diff --git a/src/assets/locale/zh/common.json b/src/assets/locale/zh/common.json index e62e69c..0d9b7d8 100644 --- a/src/assets/locale/zh/common.json +++ b/src/assets/locale/zh/common.json @@ -49,5 +49,6 @@ "noData": "无数据", "noHistory": "无聊天记录", "chatWithCurrentPage": "与当前页面聊天", - "beta": "Beta" + "beta": "Beta", + "tts": "朗读" } \ No newline at end of file diff --git a/src/components/Option/Prompt/index.tsx b/src/components/Option/Prompt/index.tsx index de7e9d0..a862fc2 100644 --- a/src/components/Option/Prompt/index.tsx +++ b/src/components/Option/Prompt/index.tsx @@ -8,7 +8,6 @@ import { Input, Form, Switch, - Empty } from "antd" import { Trash2, Pen, Computer, Zap } from "lucide-react" import { useState } from "react" diff --git a/src/components/Sidepanel/Chat/body.tsx b/src/components/Sidepanel/Chat/body.tsx index fc4bedb..d6e3684 100644 --- a/src/components/Sidepanel/Chat/body.tsx +++ b/src/components/Sidepanel/Chat/body.tsx @@ -7,7 +7,7 @@ import { useWebUI } from "@/store/webui" export const SidePanelBody = () => { const { messages, streaming } = useMessage() const divRef = React.useRef(null) - const {ttsEnabled} = useWebUI() + const { ttsEnabled } = useWebUI() React.useEffect(() => { if (divRef.current) { divRef.current.scrollIntoView({ behavior: "smooth" }) @@ -18,7 +18,7 @@ export const SidePanelBody = () => { {messages.length === 0 && } {messages.map((message, index) => ( {}} + onEditFormSubmit={(value) => {}} key={index} isBot={message.isBot} message={message.message} diff --git a/src/components/Sidepanel/Chat/empty.tsx b/src/components/Sidepanel/Chat/empty.tsx index 99f9d43..5bde702 100644 --- a/src/components/Sidepanel/Chat/empty.tsx +++ b/src/components/Sidepanel/Chat/empty.tsx @@ -135,11 +135,11 @@ export const EmptySidePanel = () => { viewBox="0 0 20 20" fill="currentColor" stroke="currentColor" - stroke-width="1"> + strokeWidth="1"> + clipRule="evenodd">