Explorar o código

chore: Add Translation

MystiPanda hai 1 ano
pai
achega
8a2d06d010
Modificáronse 3 ficheiros con 24 adicións e 3 borrados
  1. 4 1
      src/components/setting/mods/stack-mode-switch.tsx
  2. 10 1
      src/locales/en.json
  3. 10 1
      src/locales/zh.json

+ 4 - 1
src/components/setting/mods/stack-mode-switch.tsx

@@ -1,3 +1,4 @@
+import { useTranslation } from "react-i18next";
 import { Button, ButtonGroup, Tooltip } from "@mui/material";
 import { checkService } from "@/services/cmds";
 import { useVerge } from "@/hooks/use-verge";
@@ -25,11 +26,13 @@ export const StackModeSwitch = (props: Props) => {
     }
   );
 
+  const { t } = useTranslation();
+
   return (
     <Tooltip
       title={
         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")
           : ""
       }
     >

+ 10 - 1
src/locales/en.json

@@ -160,7 +160,16 @@
   "Retain 30 Days": "Retain 30 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",
   "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"
 }

+ 10 - 1
src/locales/zh.json

@@ -160,7 +160,16 @@
   "Retain 30 Days": "保留30天",
   "Retain 90 Days": "保留90天",
 
+  "Stack": "Tun 模式堆栈",
+  "Device": "Tun 网卡名称",
+  "Auto Route": "自动设置全局路由",
+  "Strict Route": "严格路由",
+  "Auto Detect Interface": "自动选择流量出口接口",
+  "DNS Hijack": "DNS 劫持",
+  "MTU": "最大传输单元",
+
   "Portable Updater Error": "便携版不支持应用内更新,请手动下载替换",
   "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只能在服务模式下使用"
 }