refactor(ui): improve i18n
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user