diff --git a/web/src/App.tsx b/web/src/App.tsx index 88e541f4c..1e090b4ff 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -1,3 +1,4 @@ +import dayjs from "dayjs"; import { useColorScheme } from "@mui/joy"; import { useEffect, Suspense } from "react"; import { Toaster } from "react-hot-toast"; @@ -58,6 +59,7 @@ const App = () => { useEffect(() => { document.documentElement.setAttribute("lang", locale); i18n.changeLanguage(locale); + dayjs.locale(locale); storage.set({ locale: locale, }); diff --git a/web/src/components/AskAIDialog.tsx b/web/src/components/AskAIDialog.tsx index 4da1f07c9..37db9ce76 100644 --- a/web/src/components/AskAIDialog.tsx +++ b/web/src/components/AskAIDialog.tsx @@ -8,10 +8,12 @@ import { useMessageStore } from "../store/zustand/message"; import Icon from "./Icon"; import { generateDialog } from "./Dialog"; import showSettingDialog from "./SettingDialog"; +import { useTranslation } from "react-i18next"; type Props = DialogProps; const AskAIDialog: React.FC = (props: Props) => { + const { t } = useTranslation(); const { destroy, hide } = props; const fetchingState = useLoading(false); const messageStore = useMessageStore(); @@ -79,7 +81,7 @@ const AskAIDialog: React.FC = (props: Props) => {

- Ask AI + {t("ask-ai.title")}

+

{t("ask-ai.not_enabled")}

+
)}