mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
feat: complete i18n
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import useSWR from "swr";
|
||||
import { useLockFn } from "ahooks";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Box, Grid, IconButton, Stack } from "@mui/material";
|
||||
import { RestartAltRounded } from "@mui/icons-material";
|
||||
import {
|
||||
@@ -20,6 +21,7 @@ interface Props {
|
||||
const EnhancedMode = (props: Props) => {
|
||||
const { items, chain } = props;
|
||||
|
||||
const { t } = useTranslation();
|
||||
const { mutate: mutateProfiles } = useSWR("getProfiles", getProfiles);
|
||||
const { data: chainLogs = {}, mutate: mutateLogs } = useSWR(
|
||||
"getRuntimeLogs",
|
||||
@@ -96,7 +98,7 @@ const EnhancedMode = (props: Props) => {
|
||||
<IconButton
|
||||
size="small"
|
||||
color="inherit"
|
||||
title="refresh enhanced profiles"
|
||||
title={t("Refresh profiles")}
|
||||
onClick={onEnhance}
|
||||
>
|
||||
<RestartAltRounded />
|
||||
|
||||
@@ -82,7 +82,7 @@ const InfoEditor = (props: Props) => {
|
||||
<TextField
|
||||
{...textFieldProps}
|
||||
disabled
|
||||
label="Type"
|
||||
label={t("Type")}
|
||||
value={type}
|
||||
sx={{ input: { textTransform: "capitalize" } }}
|
||||
/>
|
||||
@@ -90,7 +90,7 @@ const InfoEditor = (props: Props) => {
|
||||
<TextField
|
||||
{...textFieldProps}
|
||||
autoFocus
|
||||
label="Name"
|
||||
label={t("Name")}
|
||||
value={form.name}
|
||||
onChange={(e) => setForm({ name: e.target.value })}
|
||||
onKeyDown={(e) => e.key === "Enter" && onUpdate()}
|
||||
@@ -98,7 +98,7 @@ const InfoEditor = (props: Props) => {
|
||||
|
||||
<TextField
|
||||
{...textFieldProps}
|
||||
label="Descriptions"
|
||||
label={t("Descriptions")}
|
||||
value={form.desc}
|
||||
onChange={(e) => setForm({ desc: e.target.value })}
|
||||
onKeyDown={(e) => e.key === "Enter" && onUpdate()}
|
||||
@@ -107,7 +107,7 @@ const InfoEditor = (props: Props) => {
|
||||
{type === "remote" && (
|
||||
<TextField
|
||||
{...textFieldProps}
|
||||
label="Subscription URL"
|
||||
label={t("Subscription URL")}
|
||||
value={form.url}
|
||||
onChange={(e) => setForm({ url: e.target.value })}
|
||||
onKeyDown={(e) => e.key === "Enter" && onUpdate()}
|
||||
@@ -128,7 +128,7 @@ const InfoEditor = (props: Props) => {
|
||||
{((type === "remote" && showOpt) || type === "local") && (
|
||||
<TextField
|
||||
{...textFieldProps}
|
||||
label="Update Interval (mins)"
|
||||
label={t("Update Interval(mins)")}
|
||||
value={option.update_interval}
|
||||
onChange={(e) => {
|
||||
const str = e.target.value?.replace(/\D/, "");
|
||||
|
||||
@@ -91,7 +91,7 @@ const ProfileNew = (props: Props) => {
|
||||
<InputLabel>Type</InputLabel>
|
||||
<Select
|
||||
autoFocus
|
||||
label="Type"
|
||||
label={t("Type")}
|
||||
value={form.type}
|
||||
onChange={(e) => setForm({ type: e.target.value })}
|
||||
>
|
||||
@@ -104,7 +104,7 @@ const ProfileNew = (props: Props) => {
|
||||
|
||||
<TextField
|
||||
{...textFieldProps}
|
||||
label="Name"
|
||||
label={t("Name")}
|
||||
autoComplete="off"
|
||||
value={form.name}
|
||||
onChange={(e) => setForm({ name: e.target.value })}
|
||||
@@ -112,7 +112,7 @@ const ProfileNew = (props: Props) => {
|
||||
|
||||
<TextField
|
||||
{...textFieldProps}
|
||||
label="Descriptions"
|
||||
label={t("Descriptions")}
|
||||
autoComplete="off"
|
||||
value={form.desc}
|
||||
onChange={(e) => setForm({ desc: e.target.value })}
|
||||
@@ -121,7 +121,7 @@ const ProfileNew = (props: Props) => {
|
||||
{form.type === "remote" && (
|
||||
<TextField
|
||||
{...textFieldProps}
|
||||
label="Subscription URL"
|
||||
label={t("Subscription URL")}
|
||||
autoComplete="off"
|
||||
value={form.url}
|
||||
onChange={(e) => setForm({ url: e.target.value })}
|
||||
|
||||
Reference in New Issue
Block a user