mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-09 11:00:21 +00:00
Split translation files by module
This commit is contained in:
parent
3f1f22725a
commit
d249891e44
24 changed files with 153 additions and 85 deletions
|
|
@ -324,7 +324,7 @@ export const BottomInput = ({
|
|||
fontFamily: "Inter",
|
||||
}}
|
||||
rows={1}
|
||||
placeholder={t("ask-placeholder")}
|
||||
placeholder={t("chat.ask-placeholder")}
|
||||
onInput={(e) => {
|
||||
const el = e.currentTarget;
|
||||
el.style.height = "auto";
|
||||
|
|
|
|||
|
|
@ -520,10 +520,10 @@ export default function ChatBox(): JSX.Element {
|
|||
<div className=" w-full flex flex-col relative z-10">
|
||||
<div className="flex flex-col items-center gap-1 h-[210px] justify-end">
|
||||
<div className="text-xl leading-[30px] text-zinc-800 text-center font-bold">
|
||||
{t("welcome-to-eigent")}
|
||||
{t("chat.welcome-to-eigent")}
|
||||
</div>
|
||||
<div className="text-lg leading-7 text-zinc-500 text-center mb-5">
|
||||
{t("how-can-i-help-you")}
|
||||
{t("chat.how-can-i-help-you")}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export default function SearchInput({ value, onChange }: SearchInputProps) {
|
|||
{!value && !isFocused && (
|
||||
<span className="pointer-events-none absolute inset-0 flex items-center justify-center text-sm text-text-label select-none cursor-text">
|
||||
<Search className="w-4 h-4 mr-1 text-icon-secondary" />
|
||||
{t("search")}
|
||||
{t("task-hub.search")}
|
||||
</span>
|
||||
)}
|
||||
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ export default function HistorySidebar() {
|
|||
>
|
||||
<ArrowLeft size={16} />
|
||||
<span className="text-text-primary text-sm font-bold leading-13">
|
||||
{t("task-hub")}
|
||||
{t("task-hub.task-hub")}
|
||||
</span>
|
||||
</Button>
|
||||
<Button
|
||||
|
|
@ -265,7 +265,7 @@ export default function HistorySidebar() {
|
|||
>
|
||||
<Plus className="w-8 h-8 text-icon-tertiary group-hover:text-icon-primary transition-all duration-300" />
|
||||
<span className="text-text-tertiary font-bold text-[14px] leading-9 group-hover:text-text-body transition-all duration-300">
|
||||
{t("new-project")}
|
||||
{t("task-hub.new-project")}
|
||||
</span>
|
||||
</div>
|
||||
{history_type === "table" ? (
|
||||
|
|
@ -299,7 +299,7 @@ export default function HistorySidebar() {
|
|||
/>
|
||||
</div>
|
||||
<div className="text-left text-[14px] text-text-primary font-bold leading-9 overflow-hidden text-ellipsis break-words line-clamp-3">
|
||||
{task?.messages[0]?.content || t("new-project")}
|
||||
{task?.messages[0]?.content || t("task-hub.new-project")}
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<Progress
|
||||
|
|
@ -399,13 +399,13 @@ export default function HistorySidebar() {
|
|||
<TooltipTrigger asChild>
|
||||
<span>
|
||||
{task?.messages[0]?.content ||
|
||||
t("new-project")}
|
||||
t("task-hub.new-project")}
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent className="w-[200px] bg-white-100% p-2 text-wrap break-words text-xs select-text pointer-events-auto !fixed ">
|
||||
<p>
|
||||
{task?.messages[0]?.content ||
|
||||
t("new-project")}
|
||||
t("task-hub.new-project")}
|
||||
</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
|
|
@ -421,7 +421,7 @@ export default function HistorySidebar() {
|
|||
<div className="px-sm py-4 flex flex-col gap-2">
|
||||
<div className="flex justify-between items-center">
|
||||
<div className="text-text-primary text-base font-bold leading-9">
|
||||
{t("project-archives")}
|
||||
{t("task-hub.project-archives")}
|
||||
</div>
|
||||
<Button
|
||||
variant="ghost"
|
||||
|
|
@ -481,11 +481,11 @@ export default function HistorySidebar() {
|
|||
|
||||
<div className="text-[14px] text-text-primary font-bold leading-9 overflow-hidden text-ellipsis whitespace-nowrap">
|
||||
{task?.question.split("|")[0] ||
|
||||
t("new-project")}
|
||||
t("task-hub.new-project")}
|
||||
</div>
|
||||
<div className="text-xs text-black leading-17 overflow-hidden text-ellipsis break-words line-clamp-2">
|
||||
{task?.question.split("|")[1] ||
|
||||
t("new-project")}
|
||||
t("task-hub.new-project")}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
@ -514,7 +514,7 @@ export default function HistorySidebar() {
|
|||
<TooltipTrigger asChild>
|
||||
<span>
|
||||
{" "}
|
||||
{task?.question.split("|")[0] || t("new-project")}
|
||||
{task?.question.split("|")[0] || t("task-hub.new-project")}
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent
|
||||
|
|
@ -523,7 +523,7 @@ export default function HistorySidebar() {
|
|||
>
|
||||
<div>
|
||||
{" "}
|
||||
{task?.question.split("|")[0] || t("new-project")}
|
||||
{task?.question.split("|")[0] || t("task-hub.new-project")}
|
||||
</div>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
|
|
@ -558,7 +558,7 @@ export default function HistorySidebar() {
|
|||
}}
|
||||
>
|
||||
<Share size={16} />
|
||||
{t("share")}
|
||||
{t("task-hub.share")}
|
||||
</Button>
|
||||
</PopoverClose>
|
||||
|
||||
|
|
@ -576,7 +576,7 @@ export default function HistorySidebar() {
|
|||
size={16}
|
||||
className="text-icon-primary group-hover:text-icon-cuation"
|
||||
/>
|
||||
{t("delete")}
|
||||
{t("task-hub.delete")}
|
||||
</Button>
|
||||
</PopoverClose>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -211,10 +211,10 @@ export const InstallDependencies: React.FC<{
|
|||
className="mr-2 no-drag leading-tight"
|
||||
>
|
||||
<FileDown className="w-4 h-4" />
|
||||
{t("report-bug")}
|
||||
{t("layout.report-bug")}
|
||||
</Button>
|
||||
<Button size="sm" onClick={handleInstall}>
|
||||
Retry
|
||||
{t("layout.retry")}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
|
|
|
|||
|
|
@ -73,15 +73,15 @@ export function SearchHistoryDialog() {
|
|||
onClick={() => setOpen(true)}
|
||||
>
|
||||
<Search className="text-menutabs-icon-active" size={16} />
|
||||
<span>{t("search")}</span>
|
||||
<span>{t("task-hub.search")}</span>
|
||||
</Button>
|
||||
<CommandDialog open={open} onOpenChange={setOpen}>
|
||||
<DialogTitle asChild>
|
||||
<VisuallyHidden>{t("search-dialog")}</VisuallyHidden>
|
||||
<VisuallyHidden>{t("task-hub.search-dialog")}</VisuallyHidden>
|
||||
</DialogTitle>
|
||||
<CommandInput placeholder={t("search-dialog-placeholder")} />
|
||||
<CommandInput placeholder={t("task-hub.search-dialog-placeholder")} />
|
||||
<CommandList>
|
||||
<CommandEmpty>{t("no-results")}</CommandEmpty>
|
||||
<CommandEmpty>{t("task-hub.no-results")}</CommandEmpty>
|
||||
<CommandGroup heading="Today">
|
||||
{historyTasks.map((task) => (
|
||||
<CommandItem
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ function HeaderWin() {
|
|||
className="mr-2 no-drag leading-tight"
|
||||
>
|
||||
<FileDown className="w-4 h-4" />
|
||||
{t("report-bug")}
|
||||
{t("layout.report-bug")}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
|
|
@ -197,7 +197,7 @@ function HeaderWin() {
|
|||
alt="chevron_left"
|
||||
className="w-4 h-4 text-button-primary-icon-default"
|
||||
/>
|
||||
{t("refer-friends")}
|
||||
{t("layout.refer-friends")}
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => navigate("/setting")}
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ export default function Workflow({
|
|||
<div className="w-full h-full flex flex-col items-center justify-center">
|
||||
<div className="flex items-center justify-between w-full ">
|
||||
<div className="text-text-body font-bold text-lg leading-relaxed">
|
||||
{t("your-ai-workforce")}
|
||||
{t("workforce.your-ai-workforce")}
|
||||
</div>
|
||||
<div className="flex items-center justify-center gap-sm ">
|
||||
{/* <Button
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"new-project": "New Project",
|
||||
"task-hub": "Task Hub",
|
||||
"search": "Search",
|
||||
"project-archives": "Project Archives",
|
||||
"ongoing-tasks": "Ongoing Tasks",
|
||||
"share": "Share",
|
||||
"delete": "Delete",
|
||||
"table": "Table",
|
||||
"list": "List",
|
||||
"search-dialog": "Search Dialog",
|
||||
"search-dialog-placeholder": "Search or ask a question",
|
||||
"no-results": "No results found.",
|
||||
"welcome-to-eigent": "Welcome to Eigent",
|
||||
"how-can-i-help-you": "How can I help you today?",
|
||||
"ask-placeholder": "What do you need to achieve today?",
|
||||
"report-bug": "Report a bug",
|
||||
"refer-friends": "Refer friends",
|
||||
"your-ai-workforce": "Your AI Workforce"
|
||||
}
|
||||
5
src/i18n/locales/en/chat.json
Normal file
5
src/i18n/locales/en/chat.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"welcome-to-eigent": "Welcome to Eigent",
|
||||
"how-can-i-help-you": "How can I help you today?",
|
||||
"ask-placeholder": "What do you need to achieve today?"
|
||||
}
|
||||
12
src/i18n/locales/en/general.json
Normal file
12
src/i18n/locales/en/general.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"account": "Account",
|
||||
"you-are-currently-signed-in-with": "You are currently signed in with {{email}}",
|
||||
"manage": "Manage",
|
||||
"log-out": "Log out",
|
||||
"language": "Language",
|
||||
"select-language": "Select language",
|
||||
"system-default": "System Default",
|
||||
"appearance": "Appearance",
|
||||
"light": "Light",
|
||||
"transparent": "Transparent"
|
||||
}
|
||||
12
src/i18n/locales/en/index.ts
Normal file
12
src/i18n/locales/en/index.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import general from "./general.json";
|
||||
import layout from "./layout.json";
|
||||
import taskHub from "./taskHub.json";
|
||||
import workforce from "./workforce.json";
|
||||
import chat from "./chat.json";
|
||||
export default {
|
||||
general,
|
||||
layout,
|
||||
taskHub,
|
||||
workforce,
|
||||
chat,
|
||||
};
|
||||
5
src/i18n/locales/en/layout.json
Normal file
5
src/i18n/locales/en/layout.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"report-bug": "Report a bug",
|
||||
"refer-friends": "Refer friends",
|
||||
"retry": "Retry"
|
||||
}
|
||||
14
src/i18n/locales/en/taskHub.json
Normal file
14
src/i18n/locales/en/taskHub.json
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"task-hub": "Task Hub",
|
||||
"new-project": "New Project",
|
||||
"search": "Search",
|
||||
"project-archives": "Project Archives",
|
||||
"ongoing-tasks": "Ongoing Tasks",
|
||||
"share": "Share",
|
||||
"delete": "Delete",
|
||||
"table": "Table",
|
||||
"list": "List",
|
||||
"search-dialog": "Search Dialog",
|
||||
"search-dialog-placeholder": "Search or ask a question",
|
||||
"no-results": "No results found."
|
||||
}
|
||||
3
src/i18n/locales/en/workforce.json
Normal file
3
src/i18n/locales/en/workforce.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"your-ai-workforce": "Your AI Workforce"
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import en from "./en-US.json";
|
||||
import zh from "./zh-CN.json";
|
||||
import zh from './zh-cn/index'
|
||||
import en from './en/index'
|
||||
|
||||
export const resources = {
|
||||
"en-US": {
|
||||
|
|
|
|||
5
src/i18n/locales/zh-cn/chat.json
Normal file
5
src/i18n/locales/zh-cn/chat.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"welcome-to-eigent": "欢迎使用Eigent",
|
||||
"how-can-i-help-you": "今天有什么可以帮你的吗?",
|
||||
"ask-placeholder": "What do you need to achieve today?"
|
||||
}
|
||||
12
src/i18n/locales/zh-cn/general.json
Normal file
12
src/i18n/locales/zh-cn/general.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"account": "账户",
|
||||
"you-are-currently-signed-in-with": "你当前使用的是 {{email}} 账户",
|
||||
"manage": "管理",
|
||||
"log-out": "退出",
|
||||
"language": "语言",
|
||||
"select-language": "选择语言",
|
||||
"system-default": "系统默认",
|
||||
"appearance": "外观",
|
||||
"light": "亮色",
|
||||
"transparent": "透明"
|
||||
}
|
||||
12
src/i18n/locales/zh-cn/index.ts
Normal file
12
src/i18n/locales/zh-cn/index.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import general from "./general.json";
|
||||
import layout from "./layout.json";
|
||||
import taskHub from "./taskHub.json";
|
||||
import workforce from "./workforce.json";
|
||||
import chat from "./chat.json";
|
||||
export default {
|
||||
general,
|
||||
layout,
|
||||
taskHub,
|
||||
workforce,
|
||||
chat,
|
||||
};
|
||||
5
src/i18n/locales/zh-cn/layout.json
Normal file
5
src/i18n/locales/zh-cn/layout.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"report-bug": "报告bug",
|
||||
"refer-friends": "推荐朋友",
|
||||
"retry": "重试"
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"new-project": "新项目",
|
||||
"task-hub": "任务中心",
|
||||
"new-project": "新项目",
|
||||
"search": "搜索",
|
||||
"project-archives": "项目归档",
|
||||
"ongoing-tasks": "进行中的任务",
|
||||
|
|
@ -10,11 +10,5 @@
|
|||
"list": "列表",
|
||||
"search-dialog": "搜索对话",
|
||||
"search-dialog-placeholder": "搜索或提问",
|
||||
"no-results": "没有结果",
|
||||
"welcome-to-eigent": "欢迎使用Eigent",
|
||||
"how-can-i-help-you": "今天有什么可以帮你的吗?",
|
||||
"ask-placeholder": "What do you need to achieve today?",
|
||||
"report-bug": "报告bug",
|
||||
"refer-friends": "推荐朋友",
|
||||
"your-ai-workforce": "你的AI workforce"
|
||||
}
|
||||
"no-results": "没有结果"
|
||||
}
|
||||
3
src/i18n/locales/zh-cn/workforce.json
Normal file
3
src/i18n/locales/zh-cn/workforce.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"your-ai-workforce": "你的AI workforce"
|
||||
}
|
||||
|
|
@ -249,7 +249,7 @@ export default function Home() {
|
|||
/>
|
||||
<div>
|
||||
<div className="px-6 py-4 flex justify-between items-center">
|
||||
<div className="text-2xl font-bold leading-4">{t("ongoing-tasks")}</div>
|
||||
<div className="text-2xl font-bold leading-4">{t("task-hub.ongoing-tasks")}</div>
|
||||
|
||||
<div className="flex items-center gap-md">
|
||||
<SearchHistoryDialog />
|
||||
|
|
@ -260,7 +260,7 @@ export default function Home() {
|
|||
onClick={createChat}
|
||||
>
|
||||
<Plus size={16} />
|
||||
<span>{t("new-project")}</span>
|
||||
<span>{t("task-hub.new-project")}</span>
|
||||
</Button>
|
||||
<Tabs
|
||||
value={history_type}
|
||||
|
|
@ -271,11 +271,11 @@ export default function Home() {
|
|||
<TabsList className="p-1 h-[28px] ">
|
||||
<TabsTrigger value="table">
|
||||
<Table size={16} />
|
||||
<div>{t("table")}</div>
|
||||
<div>{t("task-hub.table")}</div>
|
||||
</TabsTrigger>
|
||||
<TabsTrigger value="list">
|
||||
<List size={16} />
|
||||
<div>{t("list")}</div>
|
||||
<div>{t("task-hub.list")}</div>
|
||||
</TabsTrigger>
|
||||
</TabsList>
|
||||
</Tabs>
|
||||
|
|
@ -306,7 +306,7 @@ export default function Home() {
|
|||
/>
|
||||
</div>
|
||||
<div className="text-[14px] text-text-primary font-bold leading-9 overflow-hidden text-ellipsis whitespace-nowrap">
|
||||
{task.summaryTask || t("new-project")}
|
||||
{task.summaryTask || t("task-hub.new-project")}
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<Progress
|
||||
|
|
@ -396,10 +396,10 @@ export default function Home() {
|
|||
<div className=" flex-1 text-[14px] text-text-primary font-bold leading-9 overflow-hidden text-ellipsis whitespace-nowrap">
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<span> {task.summaryTask || t("new-project")}</span>
|
||||
<span> {task.summaryTask || t("task-hub.new-project")}</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
<p> {task.summaryTask || t("new-project")}</p>
|
||||
<p> {task.summaryTask || t("task-hub.new-project")}</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
|
@ -532,11 +532,11 @@ export default function Home() {
|
|||
<TabsList>
|
||||
<TabsTrigger value="table">
|
||||
<Table size={16} />
|
||||
<div>{t("table")}</div>
|
||||
<div>{t("task-hub.table")}</div>
|
||||
</TabsTrigger>
|
||||
<TabsTrigger value="list">
|
||||
<List size={16} />
|
||||
<div>{t("list")}</div>
|
||||
<div>{t("task-hub.list")}</div>
|
||||
</TabsTrigger>
|
||||
</TabsList>
|
||||
</Tabs>
|
||||
|
|
@ -577,7 +577,7 @@ export default function Home() {
|
|||
</div>
|
||||
<div className="flex-1 flex flex-col gap-1 w-full">
|
||||
<div className="text-[14px] text-text-primary font-bold leading-9 overflow-hidden text-ellipsis whitespace-nowrap">
|
||||
{task?.question || t("new-project")}
|
||||
{task?.question || t("task-hub.new-project")}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -609,7 +609,7 @@ export default function Home() {
|
|||
<TooltipTrigger asChild>
|
||||
<span>
|
||||
{" "}
|
||||
{task?.question.split("|")[0] || t("new-project")}
|
||||
{task?.question.split("|")[0] || t("task-hub.new-project")}
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent
|
||||
|
|
@ -618,7 +618,7 @@ export default function Home() {
|
|||
>
|
||||
<div>
|
||||
{" "}
|
||||
{task?.question.split("|")[0] || t("new-project")}
|
||||
{task?.question.split("|")[0] || t("task-hub.new-project")}
|
||||
</div>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
|
|
@ -653,7 +653,7 @@ export default function Home() {
|
|||
}}
|
||||
>
|
||||
<Share size={16} />
|
||||
{t("share")}
|
||||
{t("task-hub.share")}
|
||||
</Button>
|
||||
</PopoverClose>
|
||||
|
||||
|
|
@ -671,7 +671,7 @@ export default function Home() {
|
|||
size={16}
|
||||
className="text-icon-primary group-hover:text-icon-cuation"
|
||||
/>
|
||||
{t("delete")}
|
||||
{t("task-hub.delete")}
|
||||
</Button>
|
||||
</PopoverClose>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ import { proxyFetchPut, proxyFetchGet } from "@/api/http";
|
|||
import { createRef, RefObject } from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useChatStore } from "@/store/chatStore";
|
||||
import {LocaleEnum, switchLanguage} from "@/i18n";
|
||||
import { LocaleEnum, switchLanguage } from "@/i18n";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import {
|
||||
Select,
|
||||
|
|
@ -24,6 +25,7 @@ import {
|
|||
} from "@/components/ui/select";
|
||||
|
||||
export default function SettingGeneral() {
|
||||
const { t } = useTranslation();
|
||||
const authStore = useAuthStore();
|
||||
const navigate = useNavigate();
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
|
@ -39,12 +41,12 @@ export default function SettingGeneral() {
|
|||
const [themeList, setThemeList] = useState<any>([
|
||||
{
|
||||
img: light,
|
||||
label: "Light",
|
||||
label: "general.light",
|
||||
value: "light",
|
||||
},
|
||||
{
|
||||
img: transparent,
|
||||
label: "Transparent",
|
||||
label: "general.transparent",
|
||||
value: "transparent",
|
||||
},
|
||||
]);
|
||||
|
|
@ -91,12 +93,12 @@ export default function SettingGeneral() {
|
|||
setThemeList([
|
||||
{
|
||||
img: light,
|
||||
label: "Light",
|
||||
label: "general.light",
|
||||
value: "light",
|
||||
},
|
||||
{
|
||||
img: transparent,
|
||||
label: "Transparent",
|
||||
label: "general.transparent",
|
||||
value: "transparent",
|
||||
},
|
||||
]);
|
||||
|
|
@ -104,7 +106,7 @@ export default function SettingGeneral() {
|
|||
setThemeList([
|
||||
{
|
||||
img: light,
|
||||
label: "Light",
|
||||
label: "general.light",
|
||||
value: "light",
|
||||
},
|
||||
]);
|
||||
|
|
@ -115,10 +117,12 @@ export default function SettingGeneral() {
|
|||
<div className="space-y-8">
|
||||
<div className="px-6 py-4 bg-surface-secondary rounded-2xl">
|
||||
<div className="text-base font-bold leading-12 text-text-body">
|
||||
Account
|
||||
{t("general.account")}
|
||||
</div>
|
||||
<div className="text-sm leading-13 mb-4">
|
||||
You are currently signed in with {authStore.email}
|
||||
{t("general.you-are-currently-signed-in-with", {
|
||||
email: authStore.email,
|
||||
})}
|
||||
</div>
|
||||
<div className="flex items-center gap-sm">
|
||||
<Button
|
||||
|
|
@ -129,7 +133,7 @@ export default function SettingGeneral() {
|
|||
size="xs"
|
||||
>
|
||||
<Settings className="w-4 h-4 text-button-primary-icon-default" />
|
||||
Manage
|
||||
{t("general.manage")}
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
|
|
@ -141,22 +145,24 @@ export default function SettingGeneral() {
|
|||
}}
|
||||
>
|
||||
<LogOut className="w-4 h-4 text-button-tertiery-text-default" />
|
||||
Log out
|
||||
{t("general.log-out")}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="px-6 py-4 bg-surface-secondary rounded-2xl">
|
||||
<div className="text-base font-bold leading-12 text-text-primary">
|
||||
Language
|
||||
{t("general.language")}
|
||||
</div>
|
||||
<div className="mt-md">
|
||||
<Select value={language} onValueChange={switchLanguage}>
|
||||
<SelectTrigger>
|
||||
<SelectValue placeholder="Select a fruit" />
|
||||
<SelectValue placeholder={t("general.select-language")} />
|
||||
</SelectTrigger>
|
||||
<SelectContent className="bg-input-bg-default border">
|
||||
<SelectGroup>
|
||||
<SelectItem value="system">System Default</SelectItem>
|
||||
<SelectItem value="system">
|
||||
{t("general.system-default")}
|
||||
</SelectItem>
|
||||
{languageList.map((item) => (
|
||||
<SelectItem key={item.key} value={item.key}>
|
||||
{item.label}
|
||||
|
|
@ -169,7 +175,7 @@ export default function SettingGeneral() {
|
|||
</div>
|
||||
<div className="px-6 py-4 bg-surface-secondary rounded-2xl">
|
||||
<div className="text-base font-bold leading-12 text-text-primary">
|
||||
Appearance
|
||||
{t("general.appearance")}
|
||||
</div>
|
||||
<div className="flex items-center gap-md mt-md">
|
||||
{themeList.map((item: any) => (
|
||||
|
|
@ -190,7 +196,7 @@ export default function SettingGeneral() {
|
|||
item.value == appearance ? "underline" : ""
|
||||
}`}
|
||||
>
|
||||
{item.label}
|
||||
{t(item.label)}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue