chore: update notification message and zh translation (#1011)

This commit is contained in:
RikudouPatrickstar
2024-05-12 14:40:18 +08:00
committed by GitHub
parent 9731c8a750
commit 2f7c3cf21e
13 changed files with 64 additions and 26 deletions

View File

@@ -72,7 +72,7 @@ const Layout = () => {
const [status, msg] = payload as [string, string];
switch (status) {
case "set_config::ok":
Notice.success("Refresh clash config");
Notice.success(t("Clash Config Updated"));
break;
case "set_config::error":
Notice.error(msg);

View File

@@ -72,7 +72,7 @@ const ProfilePage = () => {
const fileList = event.payload as string[];
for (let file of fileList) {
if (!file.endsWith(".yaml") && !file.endsWith(".yml")) {
Notice.error("Only support YAML files.");
Notice.error(t("Only YAML Files Supported"));
continue;
}
const item = {
@@ -136,7 +136,7 @@ const ProfilePage = () => {
try {
await importProfile(url);
Notice.success("Successfully import profile.");
Notice.success(t("Profile Imported Successfully"));
setUrl("");
setLoading(false);
@@ -179,7 +179,7 @@ const ProfilePage = () => {
mutateLogs();
closeAllConnections();
setTimeout(() => activateSelected(), 2000);
Notice.success("Refresh clash config", 1000);
Notice.success(t("Profile Switched"), 1000);
} catch (err: any) {
Notice.error(err?.message || err.toString(), 4000);
} finally {
@@ -192,7 +192,7 @@ const ProfilePage = () => {
try {
await enhanceProfiles();
mutateLogs();
Notice.success("Refresh clash config", 1000);
Notice.success(t("Profile Reactivated"), 1000);
} catch (err: any) {
Notice.error(err.message || err.toString(), 3000);
}