chore: Add Translation

This commit is contained in:
MystiPanda 2024-02-21 11:06:32 +08:00
parent a68005d4ab
commit 096c148228
3 changed files with 24 additions and 3 deletions

View File

@ -1,3 +1,4 @@
import { useTranslation } from "react-i18next";
import { Button, ButtonGroup, Tooltip } from "@mui/material"; import { Button, ButtonGroup, Tooltip } from "@mui/material";
import { checkService } from "@/services/cmds"; import { checkService } from "@/services/cmds";
import { useVerge } from "@/hooks/use-verge"; import { useVerge } from "@/hooks/use-verge";
@ -25,11 +26,13 @@ export const StackModeSwitch = (props: Props) => {
} }
); );
const { t } = useTranslation();
return ( return (
<Tooltip <Tooltip
title={ title={
isWIN && (serviceStatus !== "active" || !enable_service_mode) isWIN && (serviceStatus !== "active" || !enable_service_mode)
? "System and Mixed modes must be used in service mode" ? t("System and Mixed Can Only be Used in Service Mode")
: "" : ""
} }
> >

View File

@ -160,7 +160,16 @@
"Retain 30 Days": "Retain 30 Days", "Retain 30 Days": "Retain 30 Days",
"Retain 90 Days": "Retain 90 Days", "Retain 90 Days": "Retain 90 Days",
"Stack": "Tun Stack",
"Device": "Device Name",
"Auto Route": "Auto Route",
"Strict Route": "Strict Route",
"Auto Detect Interface": "Auto Detect Interface",
"DNS Hijack": "DNS Hijack",
"MTU": "Max Transmission Unit",
"Portable Updater Error": "The portable version does not support in-app updates. Please manually download and replace it", "Portable Updater Error": "The portable version does not support in-app updates. Please manually download and replace it",
"Tun Mode Info Windows": "The Tun mode requires granting core-related permissions. Please enable service mode before using it", "Tun Mode Info Windows": "The Tun mode requires granting core-related permissions. Please enable service mode before using it",
"Tun Mode Info Unix": "The Tun mode requires granting core-related permissions. Before using it, please authorize the core in the core settings" "Tun Mode Info Unix": "The Tun mode requires granting core-related permissions. Before using it, please authorize the core in the core settings",
"System and Mixed Can Only be Used in Service Mode": "System and Mixed Can Only be Used in Service Mode"
} }

View File

@ -160,7 +160,16 @@
"Retain 30 Days": "保留30天", "Retain 30 Days": "保留30天",
"Retain 90 Days": "保留90天", "Retain 90 Days": "保留90天",
"Stack": "Tun 模式堆栈",
"Device": "Tun 网卡名称",
"Auto Route": "自动设置全局路由",
"Strict Route": "严格路由",
"Auto Detect Interface": "自动选择流量出口接口",
"DNS Hijack": "DNS 劫持",
"MTU": "最大传输单元",
"Portable Updater Error": "便携版不支持应用内更新,请手动下载替换", "Portable Updater Error": "便携版不支持应用内更新,请手动下载替换",
"Tun Mode Info Windows": "Tun模式需要授予内核相关权限使用前请先开启服务模式", "Tun Mode Info Windows": "Tun模式需要授予内核相关权限使用前请先开启服务模式",
"Tun Mode Info Unix": "Tun模式需要授予内核相关权限使用前请先在内核设置中给内核授权" "Tun Mode Info Unix": "Tun模式需要授予内核相关权限使用前请先在内核设置中给内核授权",
"System and Mixed Can Only be Used in Service Mode": "System和Mixed只能在服务模式下使用"
} }