fix: locale typo

This commit is contained in:
MystiPanda 2024-07-04 14:18:21 +08:00
parent 12a80f35fe
commit c933560102
No known key found for this signature in database
6 changed files with 18 additions and 14 deletions

View File

@ -58,7 +58,7 @@ export const GroupsEditorViewer = (props: Props) => {
const themeMode = useThemeMode(); const themeMode = useThemeMode();
const [prevData, setPrevData] = useState(""); const [prevData, setPrevData] = useState("");
const [currData, setCurrData] = useState(""); const [currData, setCurrData] = useState("");
const [visible, setVisible] = useState(true); const [visualization, setVisualization] = useState(true);
const [match, setMatch] = useState(() => (_: string) => true); const [match, setMatch] = useState(() => (_: string) => true);
const { control, watch, register, ...formIns } = useForm<IProxyGroupConfig>({ const { control, watch, register, ...formIns } = useForm<IProxyGroupConfig>({
@ -147,7 +147,7 @@ export const GroupsEditorViewer = (props: Props) => {
useEffect(() => { useEffect(() => {
if (currData === "") return; if (currData === "") return;
if (visible !== true) return; if (visualization !== true) return;
let obj = yaml.load(currData) as { let obj = yaml.load(currData) as {
prepend: []; prepend: [];
@ -157,7 +157,7 @@ export const GroupsEditorViewer = (props: Props) => {
setPrependSeq(obj?.prepend || []); setPrependSeq(obj?.prepend || []);
setAppendSeq(obj?.append || []); setAppendSeq(obj?.append || []);
setDeleteSeq(obj?.delete || []); setDeleteSeq(obj?.delete || []);
}, [visible]); }, [visualization]);
useEffect(() => { useEffect(() => {
if (prependSeq && appendSeq && deleteSeq) if (prependSeq && appendSeq && deleteSeq)
@ -273,10 +273,10 @@ export const GroupsEditorViewer = (props: Props) => {
variant="contained" variant="contained"
size="small" size="small"
onClick={() => { onClick={() => {
setVisible((prev) => !prev); setVisualization((prev) => !prev);
}} }}
> >
{visible ? t("Advanced") : t("Visible")} {visualization ? t("Advanced") : t("Visualization")}
</Button> </Button>
</Box> </Box>
</Box> </Box>
@ -286,7 +286,7 @@ export const GroupsEditorViewer = (props: Props) => {
<DialogContent <DialogContent
sx={{ display: "flex", width: "auto", height: "calc(100vh - 185px)" }} sx={{ display: "flex", width: "auto", height: "calc(100vh - 185px)" }}
> >
{visible ? ( {visualization ? (
<> <>
<List <List
sx={{ sx={{

View File

@ -238,7 +238,7 @@ export const RulesEditorViewer = (props: Props) => {
const [prevData, setPrevData] = useState(""); const [prevData, setPrevData] = useState("");
const [currData, setCurrData] = useState(""); const [currData, setCurrData] = useState("");
const [visible, setVisible] = useState(true); const [visualization, setVisualization] = useState(true);
const [match, setMatch] = useState(() => (_: string) => true); const [match, setMatch] = useState(() => (_: string) => true);
const [ruleType, setRuleType] = useState<(typeof rules)[number]>(rules[0]); const [ruleType, setRuleType] = useState<(typeof rules)[number]>(rules[0]);
@ -305,13 +305,13 @@ export const RulesEditorViewer = (props: Props) => {
useEffect(() => { useEffect(() => {
if (currData === "") return; if (currData === "") return;
if (visible !== true) return; if (visualization !== true) return;
let obj = yaml.load(currData) as ISeqProfileConfig | null; let obj = yaml.load(currData) as ISeqProfileConfig | null;
setPrependSeq(obj?.prepend || []); setPrependSeq(obj?.prepend || []);
setAppendSeq(obj?.append || []); setAppendSeq(obj?.append || []);
setDeleteSeq(obj?.delete || []); setDeleteSeq(obj?.delete || []);
}, [visible]); }, [visualization]);
useEffect(() => { useEffect(() => {
if (prependSeq && appendSeq && deleteSeq) if (prependSeq && appendSeq && deleteSeq)
@ -416,10 +416,10 @@ export const RulesEditorViewer = (props: Props) => {
variant="contained" variant="contained"
size="small" size="small"
onClick={() => { onClick={() => {
setVisible((prev) => !prev); setVisualization((prev) => !prev);
}} }}
> >
{visible ? t("Advanced") : t("Visible")} {visualization ? t("Advanced") : t("Visualization")}
</Button> </Button>
</Box> </Box>
</Box> </Box>
@ -429,7 +429,7 @@ export const RulesEditorViewer = (props: Props) => {
<DialogContent <DialogContent
sx={{ display: "flex", width: "auto", height: "calc(100vh - 185px)" }} sx={{ display: "flex", width: "auto", height: "calc(100vh - 185px)" }}
> >
{visible ? ( {visualization ? (
<> <>
<List <List
sx={{ sx={{

View File

@ -66,7 +66,7 @@
"Rule Condition Required": "Rule Condition Required", "Rule Condition Required": "Rule Condition Required",
"Invalid Rule": "Invalid Rule", "Invalid Rule": "Invalid Rule",
"Advanced": "Advanced", "Advanced": "Advanced",
"Visible": "Visible", "Visualization": "Visualization",
"DOMAIN": "Matches the full domain name", "DOMAIN": "Matches the full domain name",
"DOMAIN-SUFFIX": "Matches the domain suffix", "DOMAIN-SUFFIX": "Matches the domain suffix",
"DOMAIN-KEYWORD": "Matches the domain keyword", "DOMAIN-KEYWORD": "Matches the domain keyword",

View File

@ -65,6 +65,8 @@
"Append Group": "اضافه کردن گروه به انتها", "Append Group": "اضافه کردن گروه به انتها",
"Rule Condition Required": "شرط قانون الزامی است", "Rule Condition Required": "شرط قانون الزامی است",
"Invalid Rule": "قانون نامعتبر", "Invalid Rule": "قانون نامعتبر",
"Advanced": "پیشرفته",
"Visualization": "تجسم",
"DOMAIN": "مطابقت با نام کامل دامنه", "DOMAIN": "مطابقت با نام کامل دامنه",
"DOMAIN-SUFFIX": "مطابقت با پسوند دامنه", "DOMAIN-SUFFIX": "مطابقت با پسوند دامنه",
"DOMAIN-KEYWORD": "مطابقت با کلمه کلیدی دامنه", "DOMAIN-KEYWORD": "مطابقت با کلمه کلیدی دامنه",

View File

@ -65,6 +65,8 @@
"Append Group": "Добавить группу в конец", "Append Group": "Добавить группу в конец",
"Rule Condition Required": "Требуется условие правила", "Rule Condition Required": "Требуется условие правила",
"Invalid Rule": "Недействительное правило", "Invalid Rule": "Недействительное правило",
"Advanced": "Дополнительно",
"Visualization": "Визуализация",
"DOMAIN": "Соответствует полному доменному имени", "DOMAIN": "Соответствует полному доменному имени",
"DOMAIN-SUFFIX": "Соответствует суффиксу домена", "DOMAIN-SUFFIX": "Соответствует суффиксу домена",
"DOMAIN-KEYWORD": "Соответствует ключевому слову домена", "DOMAIN-KEYWORD": "Соответствует ключевому слову домена",

View File

@ -66,7 +66,7 @@
"Rule Condition Required": "规则条件缺失", "Rule Condition Required": "规则条件缺失",
"Invalid Rule": "无效规则", "Invalid Rule": "无效规则",
"Advanced": "高级", "Advanced": "高级",
"Visible": "可视化", "Visualization": "可视化",
"DOMAIN": "匹配完整域名", "DOMAIN": "匹配完整域名",
"DOMAIN-SUFFIX": "匹配域名后缀", "DOMAIN-SUFFIX": "匹配域名后缀",
"DOMAIN-KEYWORD": "匹配域名关键字", "DOMAIN-KEYWORD": "匹配域名关键字",