diff --git a/src/components/setting/mods/dns-viewer.tsx b/src/components/setting/mods/dns-viewer.tsx index d6878b22..3c1f492f 100644 --- a/src/components/setting/mods/dns-viewer.tsx +++ b/src/components/setting/mods/dns-viewer.tsx @@ -509,7 +509,7 @@ export function DnsViewer({ ref }: { ref?: Ref }) { // 使用YAML编辑器的值 const parsedConfig = yaml.load(yamlContent); if (typeof parsedConfig !== "object" || parsedConfig === null) { - throw new Error(t("Invalid configuration")); + throw new Error(t("components.settings.dns.errors.invalid")); } config = parsedConfig as Record; } @@ -547,7 +547,10 @@ export function DnsViewer({ ref }: { ref?: Ref }) { } } - showNotice.error("DNS configuration error:", cleanErrorMsg); + showNotice.error( + "components.settings.dns.messages.configError", + cleanErrorMsg, + ); return; } @@ -558,7 +561,7 @@ export function DnsViewer({ ref }: { ref?: Ref }) { } setOpen(false); - showNotice.success("DNS settings saved"); + showNotice.success("components.settings.dns.messages.saved"); } catch (err) { showNotice.error(err); } @@ -610,7 +613,7 @@ export function DnsViewer({ ref }: { ref?: Ref }) { open={open} title={ - {t("DNS Overwrite")} + {t("components.settings.dns.dialog.title")}