This commit is contained in:
parent
8929ecc5de
commit
958140feaa
|
|
@ -19,10 +19,14 @@ import { ChatMessages } from "./chat-messages"
|
||||||
import { ChatScrollButtons } from "./chat-scroll-buttons"
|
import { ChatScrollButtons } from "./chat-scroll-buttons"
|
||||||
import { ChatSecondaryButtons } from "./chat-secondary-buttons"
|
import { ChatSecondaryButtons } from "./chat-secondary-buttons"
|
||||||
|
|
||||||
|
import { useTranslation } from "react-i18next" // 引入 useTranslation 进行国际化处理
|
||||||
|
|
||||||
interface ChatUIProps {}
|
interface ChatUIProps {}
|
||||||
|
|
||||||
export const ChatUI: FC<ChatUIProps> = ({}) => {
|
export const ChatUI: FC<ChatUIProps> = ({}) => {
|
||||||
useHotkey("o", () => handleNewChat())
|
useHotkey("o", () => handleNewChat())
|
||||||
|
|
||||||
|
const { t } = useTranslation() // 使用 t 函数进行国际化
|
||||||
|
|
||||||
const params = useParams()
|
const params = useParams()
|
||||||
|
|
||||||
|
|
@ -203,7 +207,7 @@ export const ChatUI: FC<ChatUIProps> = ({}) => {
|
||||||
|
|
||||||
<div className="bg-secondary flex max-h-[50px] min-h-[50px] w-full items-center justify-center border-b-2 font-bold">
|
<div className="bg-secondary flex max-h-[50px] min-h-[50px] w-full items-center justify-center border-b-2 font-bold">
|
||||||
<div className="max-w-[200px] truncate sm:max-w-[400px] md:max-w-[500px] lg:max-w-[600px] xl:max-w-[700px]">
|
<div className="max-w-[200px] truncate sm:max-w-[400px] md:max-w-[500px] lg:max-w-[600px] xl:max-w-[700px]">
|
||||||
{selectedChat?.name || "Chat"}
|
{selectedChat?.name || t("chat.defaultChatTitle")}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,5 +31,9 @@
|
||||||
"usernameError": "Username must be letters, numbers, or underscores only - no other characters or spacing allowed.",
|
"usernameError": "Username must be letters, numbers, or underscores only - no other characters or spacing allowed.",
|
||||||
"chatDisplayName": "Chat Display Name",
|
"chatDisplayName": "Chat Display Name",
|
||||||
"displayNamePlaceholder": "Your Name"
|
"displayNamePlaceholder": "Your Name"
|
||||||
|
},
|
||||||
|
|
||||||
|
"chat": {
|
||||||
|
"defaultChatTitle": "Chat"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,10 @@
|
||||||
"usernameError": "ユーザー名は文字、数字、またはアンダースコアのみで、その他の文字やスペースは使用できません。",
|
"usernameError": "ユーザー名は文字、数字、またはアンダースコアのみで、その他の文字やスペースは使用できません。",
|
||||||
"chatDisplayName": "チャット表示名",
|
"chatDisplayName": "チャット表示名",
|
||||||
"displayNamePlaceholder": "あなたの名前"
|
"displayNamePlaceholder": "あなたの名前"
|
||||||
|
},
|
||||||
|
|
||||||
|
"chat": {
|
||||||
|
"defaultChatTitle": "会話"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -30,5 +30,9 @@
|
||||||
"usernameError": "用户名只能包含字母、数字或下划线,不能包含其他字符或空格。",
|
"usernameError": "用户名只能包含字母、数字或下划线,不能包含其他字符或空格。",
|
||||||
"chatDisplayName": "聊天显示名称",
|
"chatDisplayName": "聊天显示名称",
|
||||||
"displayNamePlaceholder": "您的名称"
|
"displayNamePlaceholder": "您的名称"
|
||||||
|
},
|
||||||
|
|
||||||
|
"chat": {
|
||||||
|
"defaultChatTitle": "对话"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue