refactor(ui): improve i18n

This commit is contained in:
Fu Diwei
2024-12-10 16:37:24 +08:00
parent a4eff0b408
commit 8fe0d342aa
76 changed files with 214 additions and 266 deletions

View File

@@ -96,7 +96,7 @@ const Webhook = () => {
webhook.data.url = webhook.data.url.trim();
if (!isValidURL(webhook.data.url)) {
toast({
title: t("common.save.failed.message"),
title: t("common.text.operation_failed"),
description: t("common.errmsg.url_invalid"),
variant: "destructive",
});
@@ -116,14 +116,14 @@ const Webhook = () => {
setChannels(resp);
toast({
title: t("common.save.succeeded.message"),
title: t("common.text.operation_succeeded"),
description: t("settings.notification.config.saved.message"),
});
} catch (e) {
const msg = getErrMsg(e);
toast({
title: t("common.save.failed.message"),
title: t("common.text.operation_failed"),
description: `${t("settings.notification.config.failed.message")}: ${msg}`,
variant: "destructive",
});
@@ -183,7 +183,7 @@ const Webhook = () => {
const msg = getErrMsg(e);
toast({
title: t("common.save.failed.message"),
title: t("common.text.operation_failed"),
description: `${t("settings.notification.config.failed.message")}: ${msg}`,
variant: "destructive",
});
@@ -225,7 +225,7 @@ const Webhook = () => {
handleSaveClick();
}}
>
{t("common.save")}
{t("common.button.save")}
</Button>
</Show>