diff --git a/frontend/src/components/DefaultChat/index.jsx b/frontend/src/components/DefaultChat/index.jsx index ae52a0d2..4241ed71 100644 --- a/frontend/src/components/DefaultChat/index.jsx +++ b/frontend/src/components/DefaultChat/index.jsx @@ -17,6 +17,7 @@ import UserIcon from "../UserIcon"; import { userFromStorage } from "@/utils/request"; import { AI_BACKGROUND_COLOR, USER_BACKGROUND_COLOR } from "@/utils/constants"; import useUser from "@/hooks/useUser"; +import { useTranslation, Trans } from "react-i18next"; export default function DefaultChatContainer() { const [mockMsgs, setMockMessages] = useState([]); @@ -28,6 +29,7 @@ export default function DefaultChatContainer() { hideModal: hideNewWsModal, } = useNewWorkspaceModal(); const popMsg = !window.localStorage.getItem("anythingllm_intro"); + const { t } = useTranslation(); useEffect(() => { const fetchData = async () => { @@ -38,7 +40,7 @@ export default function DefaultChatContainer() { }, []); const MESSAGES = [ - +
@@ -51,18 +53,14 @@ export default function DefaultChatContainer() { - Welcome to AnythingLLM, AnythingLLM is an open-source AI tool by - Mintplex Labs that turns anything into a trained chatbot you can - query and chat with. AnythingLLM is a BYOK (bring-your-own-keys) - software so there is no subscription, fee, or charges for this - software outside of the services you want to use with it. + {t("welcomeMessage.part1")}
, - +
@@ -75,17 +73,14 @@ export default function DefaultChatContainer() { - AnythingLLM is the easiest way to put powerful AI products like - OpenAi, GPT-4, LangChain, PineconeDB, ChromaDB, and other services - together in a neat package with no fuss to increase your - productivity by 100x. + {t("welcomeMessage.part2")}
, - +
@@ -98,20 +93,16 @@ export default function DefaultChatContainer() { - AnythingLLM can run totally locally on your machine with little - overhead you wont even notice it's there! No GPU needed. Cloud - and on-premises installation is available as well. -
- The AI tooling ecosystem gets more powerful everyday. - AnythingLLM makes it easy to use. + {t("welcomeMessage.part3")}
-

Create an issue on Github

+

{t("welcomeMessage.githubIssue")}

@@ -119,7 +110,7 @@ export default function DefaultChatContainer() {
, - +
@@ -135,14 +126,14 @@ export default function DefaultChatContainer() { - How do I get started?! + {t("welcomeMessage.user1")}
, - +
@@ -155,13 +146,7 @@ export default function DefaultChatContainer() { - It's simple. All collections are organized into buckets we call{" "} - "Workspaces". Workspaces are buckets of files, documents, - images, PDFs, and other files which will be transformed into - something LLM's can understand and use in conversation. -
-
- You can add and remove files at anytime. + {t("welcomeMessage.part4")}
{(!user || user?.role !== "default") && ( @@ -170,7 +155,7 @@ export default function DefaultChatContainer() { className="mt-5 w-fit transition-all duration-300 border border-slate-200 px-4 py-2 rounded-lg text-white text-sm items-center flex gap-x-2 hover:bg-slate-200 hover:text-slate-800 focus:ring-gray-800" > -

Create your first workspace

+

{t("welcomeMessage.createWorkspace")}

)}
@@ -179,7 +164,7 @@ export default function DefaultChatContainer() {
, - +
@@ -195,15 +180,14 @@ export default function DefaultChatContainer() { - Is this like an AI dropbox or something? What about chatting? It - is a chatbot isn't it? + {t("welcomeMessage.user2")}
, - +
@@ -216,32 +200,20 @@ export default function DefaultChatContainer() { - AnythingLLM is more than a smarter Dropbox. -
-
- AnythingLLM offers two ways of talking with your data: -
-
- Query: Your chats will return data or inferences found with - the documents in your workspace it has access to. Adding more - documents to the Workspace make it smarter! -
-
- Conversational: Your documents + your on-going chat history - both contribute to the LLM knowledge at the same time. Great for - appending real-time text-based info or corrections and - misunderstandings the LLM might have. -
-
- You can toggle between either mode{" "} - in the middle of chatting! + , + br:
, + }} + />
, - +
@@ -257,14 +229,14 @@ export default function DefaultChatContainer() { - Wow, this sounds amazing, let me try it out already! + {t("welcomeMessage.user3")}
, - +
@@ -277,24 +249,25 @@ export default function DefaultChatContainer() { - Have Fun! + {t("welcomeMessage.part6")}
diff --git a/frontend/src/components/Modals/NewWorkspace.jsx b/frontend/src/components/Modals/NewWorkspace.jsx index 01f37063..87edef9d 100644 --- a/frontend/src/components/Modals/NewWorkspace.jsx +++ b/frontend/src/components/Modals/NewWorkspace.jsx @@ -2,11 +2,13 @@ import React, { useRef, useState } from "react"; import { X } from "@phosphor-icons/react"; import Workspace from "@/models/workspace"; import paths from "@/utils/paths"; +import { useTranslation } from "react-i18next"; const noop = () => false; export default function NewWorkspaceModal({ hideModal = noop }) { const formEl = useRef(null); const [error, setError] = useState(null); + const { t } = useTranslation(); const handleCreate = async (e) => { setError(null); e.preventDefault(); @@ -29,7 +31,9 @@ export default function NewWorkspaceModal({ hideModal = noop }) {
-

New Workspace

+

+ {t("new-workspace.title")} +

diff --git a/frontend/src/components/SettingsSidebar/index.jsx b/frontend/src/components/SettingsSidebar/index.jsx index 723867e2..bde09e90 100644 --- a/frontend/src/components/SettingsSidebar/index.jsx +++ b/frontend/src/components/SettingsSidebar/index.jsx @@ -116,7 +116,7 @@ export default function SettingsSidebar() { to={paths.settings.privacy()} className="text-darker hover:text-white text-xs leading-[18px] mx-3" > - Privacy & Data + {t("settings.privacy")}
@@ -163,7 +163,7 @@ export default function SettingsSidebar() { to={paths.settings.privacy()} className="text-darker hover:text-white text-xs leading-[18px] mx-3" > - Privacy & Data + {t("settings.privacy")} @@ -179,6 +179,7 @@ export default function SettingsSidebar() { function SupportEmail() { const [supportEmail, setSupportEmail] = useState(paths.mailToMintplex()); + const { t } = useTranslation(); useEffect(() => { const fetchSupportEmail = async () => { @@ -197,7 +198,7 @@ function SupportEmail() { to={supportEmail} className="text-darker hover:text-white text-xs leading-[18px] mx-3 mt-1" > - Contact Support + {t("settings.contact")} ); } @@ -234,7 +235,7 @@ const SidebarOptions = ({ user = null, t }) => ( roles: ["admin"], }, { - btnText: "Voice & Speech", + btnText: t("settings.voice-speech"), href: paths.settings.audioPreference(), flex: true, roles: ["admin"], @@ -338,7 +339,7 @@ const SidebarOptions = ({ user = null, t }) => ( />