chore: add service mode locale

This commit is contained in:
dongchengjie 2024-05-02 22:16:05 +08:00
parent 202015fe34
commit 0cf630ef23
4 changed files with 36 additions and 6 deletions

View File

@ -86,12 +86,15 @@ export const ServiceViewer = forwardRef<DialogRef, Props>((props, ref) => {
disableFooter disableFooter
onClose={() => setOpen(false)} onClose={() => setOpen(false)}
> >
<Typography>Current State: {state}</Typography> <Typography>
{t("Current State")}: {t(state)}
</Typography>
{(state === "unknown" || state === "uninstall") && ( {(state === "unknown" || state === "uninstall") && (
<Typography> <Typography>
Information: Please make sure that the Clash Verge Service is {t(
installed and enabled "Information: Please make sure that the Clash Verge Service is installed and enabled"
)}
</Typography> </Typography>
)} )}
@ -102,19 +105,19 @@ export const ServiceViewer = forwardRef<DialogRef, Props>((props, ref) => {
> >
{state === "uninstall" && enable && ( {state === "uninstall" && enable && (
<Button variant="contained" onClick={onDisable}> <Button variant="contained" onClick={onDisable}>
Disable Service Mode {t("Disable Service Mode")}
</Button> </Button>
)} )}
{state === "uninstall" && ( {state === "uninstall" && (
<Button variant="contained" onClick={onInstall}> <Button variant="contained" onClick={onInstall}>
Install {t("Install")}
</Button> </Button>
)} )}
{(state === "active" || state === "installed") && ( {(state === "active" || state === "installed") && (
<Button variant="outlined" onClick={onUninstall}> <Button variant="outlined" onClick={onUninstall}>
Uninstall {t("Uninstall")}
</Button> </Button>
)} )}
</Stack> </Stack>

View File

@ -185,9 +185,18 @@
"MTU": "Max Transmission Unit", "MTU": "Max Transmission Unit",
"Reset to Default": "Reset to Default", "Reset to Default": "Reset to Default",
"Current State": "Current State",
"pending": "pending",
"installed": "installed",
"uninstall": "uninstalled",
"Disable Service Mode": "Disable Service Mode",
"Install": "Install",
"Uninstall": "Uninstall",
"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": "The Tun mode requires granting core-related permissions. Please enable service mode before using it", "Tun Mode Info": "The Tun mode requires granting core-related permissions. Please enable service mode before using it",
"System and Mixed Can Only be Used in Service Mode": "System and Mixed Can Only be Used in Service Mode", "System and Mixed Can Only be Used in Service Mode": "System and Mixed Can Only be Used in Service Mode",
"Information: Please make sure that the Clash Verge Service is installed and enabled": "Information: Please make sure that the Clash Verge Service is installed and enabled",
"Use Regular Expression": "Use Regular Expression" "Use Regular Expression": "Use Regular Expression"
} }

View File

@ -185,9 +185,18 @@
"MTU": "Максимальная единица передачи", "MTU": "Максимальная единица передачи",
"Reset to Default": "Сбросить настройки по умолчанию", "Reset to Default": "Сбросить настройки по умолчанию",
"Current State": "Текущее состояние",
"pending": "Ожидающий",
"installed": "Установленный",
"uninstall": "Не установленный",
"Disable Service Mode": "Отключить режим обслуживания",
"Install": "Установить",
"Uninstall": "Удалить",
"Portable Updater Error": "Портативная версия не поддерживает обновление внутри приложения, пожалуйста, скачайте и замените вручную", "Portable Updater Error": "Портативная версия не поддерживает обновление внутри приложения, пожалуйста, скачайте и замените вручную",
"Tun Mode Info": "Режим туннеля требует предоставления разрешений, связанных с ядром. Пожалуйста, включите сервисный режим перед его использованием", "Tun Mode Info": "Режим туннеля требует предоставления разрешений, связанных с ядром. Пожалуйста, включите сервисный режим перед его использованием",
"System and Mixed Can Only be Used in Service Mode": "Система и смешанные могут использоваться только в сервисном режиме", "System and Mixed Can Only be Used in Service Mode": "Система и смешанные могут использоваться только в сервисном режиме",
"Information: Please make sure that the Clash Verge Service is installed and enabled": "Информация: Пожалуйста, убедитесь, что сервис Clash Verge Service установлен и включен",
"Use Regular Expression": "Использование регулярных выражений" "Use Regular Expression": "Использование регулярных выражений"
} }

View File

@ -185,9 +185,18 @@
"MTU": "最大传输单元", "MTU": "最大传输单元",
"Reset to Default": "重置为默认值", "Reset to Default": "重置为默认值",
"Current State": "当前状态",
"pending": "等待中",
"installed": "已安装",
"uninstall": "未安装",
"Disable Service Mode": "禁用服务模式",
"Install": "安装",
"Uninstall": "卸载",
"Portable Updater Error": "便携版不支持应用内更新,请手动下载替换", "Portable Updater Error": "便携版不支持应用内更新,请手动下载替换",
"Tun Mode Info": "Tun模式需要授予内核相关权限使用前请先开启服务模式", "Tun Mode Info": "Tun模式需要授予内核相关权限使用前请先开启服务模式",
"System and Mixed Can Only be Used in Service Mode": "System和Mixed只能在服务模式下使用", "System and Mixed Can Only be Used in Service Mode": "System和Mixed只能在服务模式下使用",
"Information: Please make sure that the Clash Verge Service is installed and enabled": "提示信息: 请确保Clash Verge Service已安装并启用",
"Use Regular Expression": "使用正则表达式" "Use Regular Expression": "使用正则表达式"
} }