feat: Add i18n support for Chinese language (#142)

* feat: Add i18n support for Chinese language

* fix: locale not working in Docker environment
This commit is contained in:
Jungley
2023-03-25 23:42:48 +08:00
committed by GitHub
parent 932853f1ba
commit 92eab6c634
26 changed files with 320 additions and 40 deletions
+3 -1
View File
@@ -3,12 +3,14 @@ import { cleanConversationHistory } from "@/utils/app/clean";
import { IconFileImport } from "@tabler/icons-react";
import { FC } from "react";
import { SidebarButton } from "./SidebarButton";
import { useTranslation } from "next-i18next";
interface Props {
onImport: (data: { conversations: Conversation[]; folders: ChatFolder[] }) => void;
}
export const Import: FC<Props> = ({ onImport }) => {
const { t} = useTranslation('sidebar')
return (
<>
<input
@@ -36,7 +38,7 @@ export const Import: FC<Props> = ({ onImport }) => {
/>
<SidebarButton
text="Import conversations"
text={t("Import conversations")}
icon={<IconFileImport size={16} />}
onClick={() => {
const importFile = document.querySelector("#import-file") as HTMLInputElement;