From 8fe0d342aa3507791762175d47fff2379e6e702d Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Tue, 10 Dec 2024 16:37:24 +0800 Subject: [PATCH] refactor(ui): improve i18n --- .../certificate/CertificateDetail.tsx | 8 ++-- .../components/certimate/AccessAliyunForm.tsx | 2 +- ui/src/components/certimate/AccessAwsForm.tsx | 2 +- .../certimate/AccessBaiduCloudForm.tsx | 2 +- .../certimate/AccessByteplusForm.tsx | 2 +- .../certimate/AccessCloudflareForm.tsx | 2 +- .../certimate/AccessDogeCloudForm.tsx | 2 +- .../certimate/AccessGodaddyForm.tsx | 2 +- .../certimate/AccessHttpreqForm.tsx | 2 +- .../certimate/AccessHuaweicloudForm.tsx | 2 +- .../certimate/AccessKubernetesForm.tsx | 2 +- .../components/certimate/AccessLocalForm.tsx | 2 +- .../certimate/AccessNamesiloForm.tsx | 2 +- .../components/certimate/AccessPdnsForm.tsx | 2 +- .../components/certimate/AccessQiniuForm.tsx | 2 +- ui/src/components/certimate/AccessSSHForm.tsx | 2 +- .../certimate/AccessTencentForm.tsx | 2 +- .../certimate/AccessVolcengineForm.tsx | 2 +- .../certimate/AccessWebhookForm.tsx | 2 +- ui/src/components/certimate/EmailsEdit.tsx | 2 +- ui/src/components/certimate/KVList.tsx | 6 +-- ui/src/components/certimate/StringList.tsx | 6 +-- ui/src/components/notify/Bark.tsx | 8 ++-- ui/src/components/notify/DingTalk.tsx | 8 ++-- ui/src/components/notify/Email.tsx | 8 ++-- ui/src/components/notify/Lark.tsx | 8 ++-- ui/src/components/notify/NotifyTemplate.tsx | 4 +- ui/src/components/notify/ServerChan.tsx | 10 ++--- ui/src/components/notify/Telegram.tsx | 8 ++-- ui/src/components/notify/Webhook.tsx | 10 ++--- ui/src/components/workflow/ApplyForm.tsx | 6 +-- .../components/workflow/DeployToAliyunALB.tsx | 4 +- .../components/workflow/DeployToAliyunCDN.tsx | 4 +- .../components/workflow/DeployToAliyunCLB.tsx | 4 +- .../components/workflow/DeployToAliyunNLB.tsx | 2 +- .../components/workflow/DeployToAliyunOss.tsx | 4 +- .../workflow/DeployToBaiduCloudCDN.tsx | 4 +- .../workflow/DeployToByteplusCDN.tsx | 4 +- .../workflow/DeployToDogeCloudCDN.tsx | 4 +- .../workflow/DeployToHuaweiCloudCDN.tsx | 4 +- .../workflow/DeployToHuaweiCloudELB.tsx | 4 +- .../workflow/DeployToKubernetesSecret.tsx | 4 +- ui/src/components/workflow/DeployToLocal.tsx | 4 +- .../components/workflow/DeployToQiniuCDN.tsx | 4 +- ui/src/components/workflow/DeployToSSH.tsx | 4 +- .../workflow/DeployToTencentCDN.tsx | 4 +- .../workflow/DeployToTencentCLB.tsx | 4 +- .../workflow/DeployToTencentCOS.tsx | 4 +- .../workflow/DeployToTencentTEO.tsx | 4 +- .../workflow/DeployToVolcengineCDN.tsx | 4 +- .../workflow/DeployToVolcengineLive.tsx | 4 +- .../components/workflow/DeployToWebhook.tsx | 4 +- ui/src/components/workflow/NotifyForm.tsx | 2 +- ui/src/components/workflow/StartForm.tsx | 2 +- .../workflow/WorkflowBaseInfoEditDialog.tsx | 2 +- ui/src/i18n/locales/en/index.ts | 2 - ui/src/i18n/locales/en/nls.access.json | 7 +++- ui/src/i18n/locales/en/nls.certificate.json | 5 ++- ui/src/i18n/locales/en/nls.common.json | 37 ++++++------------- ui/src/i18n/locales/en/nls.dashboard.json | 2 +- ui/src/i18n/locales/en/nls.history.json | 15 -------- ui/src/i18n/locales/en/nls.workflow.json | 36 +++++++++--------- ui/src/i18n/locales/zh/index.ts | 2 - ui/src/i18n/locales/zh/nls.access.json | 5 +++ ui/src/i18n/locales/zh/nls.certificate.json | 5 ++- ui/src/i18n/locales/zh/nls.common.json | 37 ++++++------------- ui/src/i18n/locales/zh/nls.dashboard.json | 2 +- ui/src/i18n/locales/zh/nls.history.json | 15 -------- ui/src/i18n/locales/zh/nls.workflow.json | 36 +++++++++--------- ui/src/pages/accesses/AccessList.tsx | 8 ++-- ui/src/pages/certificates/CertificateList.tsx | 10 ++--- ui/src/pages/dashboard/Dashboard.tsx | 2 +- ui/src/pages/settings/Account.tsx | 4 +- ui/src/pages/settings/Password.tsx | 2 +- ui/src/pages/settings/SSLProvider.tsx | 12 +++--- ui/src/pages/workflows/WorkflowList.tsx | 20 +++++----- 76 files changed, 214 insertions(+), 266 deletions(-) delete mode 100644 ui/src/i18n/locales/en/nls.history.json delete mode 100644 ui/src/i18n/locales/zh/nls.history.json diff --git a/ui/src/components/certificate/CertificateDetail.tsx b/ui/src/components/certificate/CertificateDetail.tsx index 45e7ae51..7ecaceb8 100644 --- a/ui/src/components/certificate/CertificateDetail.tsx +++ b/ui/src/components/certificate/CertificateDetail.tsx @@ -39,11 +39,11 @@ const CertificateDetail = ({ data }: CertificateDetailProps) => {
- + { - messageApi.success(t("common.copy.done")); + messageApi.success(t("common.text.copied")); }} > @@ -56,11 +56,11 @@ const CertificateDetail = ({ data }: CertificateDetailProps) => {
- + { - messageApi.success(t("common.copy.done")); + messageApi.success(t("common.text.copied")); }} > diff --git a/ui/src/components/certimate/AccessAliyunForm.tsx b/ui/src/components/certimate/AccessAliyunForm.tsx index ad54a95e..54da504d 100644 --- a/ui/src/components/certimate/AccessAliyunForm.tsx +++ b/ui/src/components/certimate/AccessAliyunForm.tsx @@ -184,7 +184,7 @@ const AccessAliyunForm = ({ data, op, onAfterReq }: AccessAliyunFormProps) => {
- +
diff --git a/ui/src/components/certimate/AccessAwsForm.tsx b/ui/src/components/certimate/AccessAwsForm.tsx index 7b69a77f..2aa2fc12 100644 --- a/ui/src/components/certimate/AccessAwsForm.tsx +++ b/ui/src/components/certimate/AccessAwsForm.tsx @@ -227,7 +227,7 @@ const AccessAwsForm = ({ data, op, onAfterReq }: AccessAwsFormProps) => {
- +
diff --git a/ui/src/components/certimate/AccessBaiduCloudForm.tsx b/ui/src/components/certimate/AccessBaiduCloudForm.tsx index 2a6e4781..a5dd56db 100644 --- a/ui/src/components/certimate/AccessBaiduCloudForm.tsx +++ b/ui/src/components/certimate/AccessBaiduCloudForm.tsx @@ -183,7 +183,7 @@ const AccessBaiduCloudForm = ({ data, op, onAfterReq }: AccessBaiduCloudFormProp
- +
diff --git a/ui/src/components/certimate/AccessByteplusForm.tsx b/ui/src/components/certimate/AccessByteplusForm.tsx index 82b3dbad..82ed53d1 100644 --- a/ui/src/components/certimate/AccessByteplusForm.tsx +++ b/ui/src/components/certimate/AccessByteplusForm.tsx @@ -183,7 +183,7 @@ const AccessByteplusForm = ({ data, op, onAfterReq }: AccessByteplusFormProps) =
- +
diff --git a/ui/src/components/certimate/AccessCloudflareForm.tsx b/ui/src/components/certimate/AccessCloudflareForm.tsx index a03c39b1..03b8a6c7 100644 --- a/ui/src/components/certimate/AccessCloudflareForm.tsx +++ b/ui/src/components/certimate/AccessCloudflareForm.tsx @@ -157,7 +157,7 @@ const AccessCloudflareForm = ({ data, op, onAfterReq }: AccessCloudflareFormProp />
- +
diff --git a/ui/src/components/certimate/AccessDogeCloudForm.tsx b/ui/src/components/certimate/AccessDogeCloudForm.tsx index 66c8db6f..bff658cb 100644 --- a/ui/src/components/certimate/AccessDogeCloudForm.tsx +++ b/ui/src/components/certimate/AccessDogeCloudForm.tsx @@ -177,7 +177,7 @@ const AccessDogeCloudForm = ({ data, op, onAfterReq }: AccessDogeCloudFormProps)
- +
diff --git a/ui/src/components/certimate/AccessGodaddyForm.tsx b/ui/src/components/certimate/AccessGodaddyForm.tsx index 4c8b4eca..0a7a3f84 100644 --- a/ui/src/components/certimate/AccessGodaddyForm.tsx +++ b/ui/src/components/certimate/AccessGodaddyForm.tsx @@ -179,7 +179,7 @@ const AccessGodaddyForm = ({ data, op, onAfterReq }: AccessGodaddyFormProps) => />
- +
diff --git a/ui/src/components/certimate/AccessHttpreqForm.tsx b/ui/src/components/certimate/AccessHttpreqForm.tsx index bf398170..865324ff 100644 --- a/ui/src/components/certimate/AccessHttpreqForm.tsx +++ b/ui/src/components/certimate/AccessHttpreqForm.tsx @@ -222,7 +222,7 @@ const AccessHttpreqForm = ({ data, op, onAfterReq }: AccessHttpreqFormProps) =>
- +
diff --git a/ui/src/components/certimate/AccessHuaweicloudForm.tsx b/ui/src/components/certimate/AccessHuaweicloudForm.tsx index af07611a..17f32351 100644 --- a/ui/src/components/certimate/AccessHuaweicloudForm.tsx +++ b/ui/src/components/certimate/AccessHuaweicloudForm.tsx @@ -205,7 +205,7 @@ const AccessHuaweiCloudForm = ({ data, op, onAfterReq }: AccessHuaweiCloudFormPr
- +
diff --git a/ui/src/components/certimate/AccessKubernetesForm.tsx b/ui/src/components/certimate/AccessKubernetesForm.tsx index d15a430f..9780bd73 100644 --- a/ui/src/components/certimate/AccessKubernetesForm.tsx +++ b/ui/src/components/certimate/AccessKubernetesForm.tsx @@ -182,7 +182,7 @@ const AccessKubernetesForm = ({ data, op, onAfterReq }: AccessKubernetesFormProp
- +
diff --git a/ui/src/components/certimate/AccessLocalForm.tsx b/ui/src/components/certimate/AccessLocalForm.tsx index ba5611a2..e13f9c0e 100644 --- a/ui/src/components/certimate/AccessLocalForm.tsx +++ b/ui/src/components/certimate/AccessLocalForm.tsx @@ -136,7 +136,7 @@ const AccessLocalForm = ({ data, op, onAfterReq }: AccessLocalFormProps) => {
- +
diff --git a/ui/src/components/certimate/AccessNamesiloForm.tsx b/ui/src/components/certimate/AccessNamesiloForm.tsx index ee8df30f..c846e855 100644 --- a/ui/src/components/certimate/AccessNamesiloForm.tsx +++ b/ui/src/components/certimate/AccessNamesiloForm.tsx @@ -157,7 +157,7 @@ const AccessNamesiloForm = ({ data, op, onAfterReq }: AccessNamesiloFormProps) = />
- +
diff --git a/ui/src/components/certimate/AccessPdnsForm.tsx b/ui/src/components/certimate/AccessPdnsForm.tsx index f527fc0c..e2be6f47 100644 --- a/ui/src/components/certimate/AccessPdnsForm.tsx +++ b/ui/src/components/certimate/AccessPdnsForm.tsx @@ -181,7 +181,7 @@ const AccessPdnsForm = ({ data, op, onAfterReq }: AccessPdnsFormProps) => {
- +
diff --git a/ui/src/components/certimate/AccessQiniuForm.tsx b/ui/src/components/certimate/AccessQiniuForm.tsx index bf9d93c4..e26a109f 100644 --- a/ui/src/components/certimate/AccessQiniuForm.tsx +++ b/ui/src/components/certimate/AccessQiniuForm.tsx @@ -177,7 +177,7 @@ const AccessQiniuForm = ({ data, op, onAfterReq }: AccessQiniuFormProps) => {
- +
diff --git a/ui/src/components/certimate/AccessSSHForm.tsx b/ui/src/components/certimate/AccessSSHForm.tsx index 44d376f0..128b931d 100644 --- a/ui/src/components/certimate/AccessSSHForm.tsx +++ b/ui/src/components/certimate/AccessSSHForm.tsx @@ -337,7 +337,7 @@ const AccessSSHForm = ({ data, op, onAfterReq }: AccessSSHFormProps) => {
- +
diff --git a/ui/src/components/certimate/AccessTencentForm.tsx b/ui/src/components/certimate/AccessTencentForm.tsx index 40037d1e..4cd95de2 100644 --- a/ui/src/components/certimate/AccessTencentForm.tsx +++ b/ui/src/components/certimate/AccessTencentForm.tsx @@ -179,7 +179,7 @@ const AccessTencentForm = ({ data, op, onAfterReq }: AccessTencentFormProps) => />
- +
diff --git a/ui/src/components/certimate/AccessVolcengineForm.tsx b/ui/src/components/certimate/AccessVolcengineForm.tsx index 4d7b8d0c..3e55ea7f 100644 --- a/ui/src/components/certimate/AccessVolcengineForm.tsx +++ b/ui/src/components/certimate/AccessVolcengineForm.tsx @@ -183,7 +183,7 @@ const AccessVolcengineForm = ({ data, op, onAfterReq }: AccessVolcengineFormProp
- +
diff --git a/ui/src/components/certimate/AccessWebhookForm.tsx b/ui/src/components/certimate/AccessWebhookForm.tsx index 1b8824d5..284506a7 100644 --- a/ui/src/components/certimate/AccessWebhookForm.tsx +++ b/ui/src/components/certimate/AccessWebhookForm.tsx @@ -154,7 +154,7 @@ const AccessWebhookForm = ({ data, op, onAfterReq }: AccessWebhookFormProps) => />
- +
diff --git a/ui/src/components/certimate/EmailsEdit.tsx b/ui/src/components/certimate/EmailsEdit.tsx index 40ea95f1..367c25ea 100644 --- a/ui/src/components/certimate/EmailsEdit.tsx +++ b/ui/src/components/certimate/EmailsEdit.tsx @@ -115,7 +115,7 @@ const EmailsEdit = ({ className, trigger }: EmailsEditProps) => { />
- +
diff --git a/ui/src/components/certimate/KVList.tsx b/ui/src/components/certimate/KVList.tsx index 4a6b4b10..9c0800f4 100644 --- a/ui/src/components/certimate/KVList.tsx +++ b/ui/src/components/certimate/KVList.tsx @@ -75,7 +75,7 @@ const KVList = ({ variables, onValueChange }: KVListProps) => {
-
{t("common.add")}
+
{t("common.button.add")}
} onSave={(variable) => { @@ -96,7 +96,7 @@ const KVList = ({ variables, onValueChange }: KVListProps) => {
-
{t("common.add")}
+
{t("common.button.add")}
} variable={{ @@ -231,7 +231,7 @@ const KVEdit = ({ variable, trigger, onSave }: KVEditProps) => { handleSaveClick(); }} > - {t("common.save")} + {t("common.button.save")}
diff --git a/ui/src/components/certimate/StringList.tsx b/ui/src/components/certimate/StringList.tsx index 8aa49c71..8c8293d6 100644 --- a/ui/src/components/certimate/StringList.tsx +++ b/ui/src/components/certimate/StringList.tsx @@ -79,7 +79,7 @@ const StringList = ({ value, className, onValueChange, valueType = "domain" }: S
-
{t("common.add")}
+
{t("common.button.add")}
} /> @@ -92,7 +92,7 @@ const StringList = ({ value, className, onValueChange, valueType = "domain" }: S
{t("common.text." + valueType + ".empty")}
- +
} > @@ -208,7 +208,7 @@ const StringEdit = ({ trigger, value, onValueChange, op = "add", valueType }: St onSaveClick(); }} > - {op === "add" ? t("common.add") : t("common.confirm")} + {op === "add" ? t("common.button.add") : t("common.button.ok")} diff --git a/ui/src/components/notify/Bark.tsx b/ui/src/components/notify/Bark.tsx index 678f5919..2dafe5b4 100644 --- a/ui/src/components/notify/Bark.tsx +++ b/ui/src/components/notify/Bark.tsx @@ -109,14 +109,14 @@ const Bark = () => { 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", }); @@ -176,7 +176,7 @@ const Bark = () => { 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", }); @@ -238,7 +238,7 @@ const Bark = () => { handleSaveClick(); }} > - {t("common.save")} + {t("common.button.save")} diff --git a/ui/src/components/notify/DingTalk.tsx b/ui/src/components/notify/DingTalk.tsx index 8f733dc9..6b8c729e 100644 --- a/ui/src/components/notify/DingTalk.tsx +++ b/ui/src/components/notify/DingTalk.tsx @@ -109,14 +109,14 @@ const DingTalk = () => { 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", }); @@ -176,7 +176,7 @@ const DingTalk = () => { 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", }); @@ -236,7 +236,7 @@ const DingTalk = () => { handleSaveClick(); }} > - {t("common.save")} + {t("common.button.save")} diff --git a/ui/src/components/notify/Email.tsx b/ui/src/components/notify/Email.tsx index 72734869..e285ee17 100644 --- a/ui/src/components/notify/Email.tsx +++ b/ui/src/components/notify/Email.tsx @@ -132,14 +132,14 @@ const Mail = () => { 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", }); @@ -199,7 +199,7 @@ const Mail = () => { 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", }); @@ -360,7 +360,7 @@ const Mail = () => { handleSaveClick(); }} > - {t("common.save")} + {t("common.button.save")} diff --git a/ui/src/components/notify/Lark.tsx b/ui/src/components/notify/Lark.tsx index 9b42219c..a52e34fa 100644 --- a/ui/src/components/notify/Lark.tsx +++ b/ui/src/components/notify/Lark.tsx @@ -105,14 +105,14 @@ const Lark = () => { 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", }); @@ -172,7 +172,7 @@ const Lark = () => { 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", }); @@ -214,7 +214,7 @@ const Lark = () => { handleSaveClick(); }} > - {t("common.save")} + {t("common.button.save")} diff --git a/ui/src/components/notify/NotifyTemplate.tsx b/ui/src/components/notify/NotifyTemplate.tsx index 12858dcf..251a6d2f 100644 --- a/ui/src/components/notify/NotifyTemplate.tsx +++ b/ui/src/components/notify/NotifyTemplate.tsx @@ -63,7 +63,7 @@ const NotifyTemplate = () => { } toast({ - title: t("common.save.succeeded.message"), + title: t("common.text.operation_succeeded"), description: t("settings.notification.template.saved.message"), }); }; @@ -88,7 +88,7 @@ const NotifyTemplate = () => { >
{t("settings.notification.template.variables.tips.content")}
- +
); diff --git a/ui/src/components/notify/ServerChan.tsx b/ui/src/components/notify/ServerChan.tsx index 0029d00b..4e97294a 100644 --- a/ui/src/components/notify/ServerChan.tsx +++ b/ui/src/components/notify/ServerChan.tsx @@ -96,7 +96,7 @@ const ServerChan = () => { serverchan.data.url = serverchan.data.url.trim(); if (!isValidURL(serverchan.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 ServerChan = () => { 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 ServerChan = () => { 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 ServerChan = () => { handleSaveClick(); }} > - {t("common.save")} + {t("common.button.save")} diff --git a/ui/src/components/notify/Telegram.tsx b/ui/src/components/notify/Telegram.tsx index b11c8b8e..31d793e5 100644 --- a/ui/src/components/notify/Telegram.tsx +++ b/ui/src/components/notify/Telegram.tsx @@ -109,14 +109,14 @@ const Telegram = () => { 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", }); @@ -176,7 +176,7 @@ const Telegram = () => { 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", }); @@ -238,7 +238,7 @@ const Telegram = () => { handleSaveClick(); }} > - {t("common.save")} + {t("common.button.save")} diff --git a/ui/src/components/notify/Webhook.tsx b/ui/src/components/notify/Webhook.tsx index f8b632da..d9377f43 100644 --- a/ui/src/components/notify/Webhook.tsx +++ b/ui/src/components/notify/Webhook.tsx @@ -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")} diff --git a/ui/src/components/workflow/ApplyForm.tsx b/ui/src/components/workflow/ApplyForm.tsx index 571d8351..998e5564 100644 --- a/ui/src/components/workflow/ApplyForm.tsx +++ b/ui/src/components/workflow/ApplyForm.tsx @@ -122,7 +122,7 @@ const ApplyForm = ({ data }: ApplyFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} /> @@ -168,7 +168,7 @@ const ApplyForm = ({ data }: ApplyFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -342,7 +342,7 @@ const ApplyForm = ({ data }: ApplyFormProps) => {
- +
diff --git a/ui/src/components/workflow/DeployToAliyunALB.tsx b/ui/src/components/workflow/DeployToAliyunALB.tsx index fda198a9..947c0fcb 100644 --- a/ui/src/components/workflow/DeployToAliyunALB.tsx +++ b/ui/src/components/workflow/DeployToAliyunALB.tsx @@ -110,7 +110,7 @@ const DeployToAliyunALB = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -251,7 +251,7 @@ const DeployToAliyunALB = ({ data }: DeployFormProps) => { )}
- +
diff --git a/ui/src/components/workflow/DeployToAliyunCDN.tsx b/ui/src/components/workflow/DeployToAliyunCDN.tsx index 0bf57ec2..3e4da4b7 100644 --- a/ui/src/components/workflow/DeployToAliyunCDN.tsx +++ b/ui/src/components/workflow/DeployToAliyunCDN.tsx @@ -90,7 +90,7 @@ const DeployToAliyunCDN = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -170,7 +170,7 @@ const DeployToAliyunCDN = ({ data }: DeployFormProps) => { />
- +
diff --git a/ui/src/components/workflow/DeployToAliyunCLB.tsx b/ui/src/components/workflow/DeployToAliyunCLB.tsx index 79c78027..b7edb9bc 100644 --- a/ui/src/components/workflow/DeployToAliyunCLB.tsx +++ b/ui/src/components/workflow/DeployToAliyunCLB.tsx @@ -110,7 +110,7 @@ const DeployToAliyunCLB = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -251,7 +251,7 @@ const DeployToAliyunCLB = ({ data }: DeployFormProps) => { )}
- +
diff --git a/ui/src/components/workflow/DeployToAliyunNLB.tsx b/ui/src/components/workflow/DeployToAliyunNLB.tsx index a902cb6c..5f183dae 100644 --- a/ui/src/components/workflow/DeployToAliyunNLB.tsx +++ b/ui/src/components/workflow/DeployToAliyunNLB.tsx @@ -213,7 +213,7 @@ const DeployToAliyunNLB = ({ data }: DeployFormProps) => { )}
- +
diff --git a/ui/src/components/workflow/DeployToAliyunOss.tsx b/ui/src/components/workflow/DeployToAliyunOss.tsx index b1011a91..7434d658 100644 --- a/ui/src/components/workflow/DeployToAliyunOss.tsx +++ b/ui/src/components/workflow/DeployToAliyunOss.tsx @@ -101,7 +101,7 @@ const DeployToAliyunOSS = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -209,7 +209,7 @@ const DeployToAliyunOSS = ({ data }: DeployFormProps) => { />
- +
diff --git a/ui/src/components/workflow/DeployToBaiduCloudCDN.tsx b/ui/src/components/workflow/DeployToBaiduCloudCDN.tsx index 6394444f..c0d20a0b 100644 --- a/ui/src/components/workflow/DeployToBaiduCloudCDN.tsx +++ b/ui/src/components/workflow/DeployToBaiduCloudCDN.tsx @@ -90,7 +90,7 @@ const DeployToBaiduCloudCDN = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -170,7 +170,7 @@ const DeployToBaiduCloudCDN = ({ data }: DeployFormProps) => { />
- +
diff --git a/ui/src/components/workflow/DeployToByteplusCDN.tsx b/ui/src/components/workflow/DeployToByteplusCDN.tsx index d460b97a..22121ea7 100644 --- a/ui/src/components/workflow/DeployToByteplusCDN.tsx +++ b/ui/src/components/workflow/DeployToByteplusCDN.tsx @@ -90,7 +90,7 @@ const DeployToByteplusCDN = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -170,7 +170,7 @@ const DeployToByteplusCDN = ({ data }: DeployFormProps) => { />
- +
diff --git a/ui/src/components/workflow/DeployToDogeCloudCDN.tsx b/ui/src/components/workflow/DeployToDogeCloudCDN.tsx index 27ee6b43..4a8a0f92 100644 --- a/ui/src/components/workflow/DeployToDogeCloudCDN.tsx +++ b/ui/src/components/workflow/DeployToDogeCloudCDN.tsx @@ -91,7 +91,7 @@ const DeployToDogeCloudCDN = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -170,7 +170,7 @@ const DeployToDogeCloudCDN = ({ data }: DeployFormProps) => { />
- +
diff --git a/ui/src/components/workflow/DeployToHuaweiCloudCDN.tsx b/ui/src/components/workflow/DeployToHuaweiCloudCDN.tsx index f8a89d0c..2c337f9a 100644 --- a/ui/src/components/workflow/DeployToHuaweiCloudCDN.tsx +++ b/ui/src/components/workflow/DeployToHuaweiCloudCDN.tsx @@ -96,7 +96,7 @@ const DeployToHuaweiCloudCDN = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -191,7 +191,7 @@ const DeployToHuaweiCloudCDN = ({ data }: DeployFormProps) => { />
- +
diff --git a/ui/src/components/workflow/DeployToHuaweiCloudELB.tsx b/ui/src/components/workflow/DeployToHuaweiCloudELB.tsx index ea6a306c..bb6a87c5 100644 --- a/ui/src/components/workflow/DeployToHuaweiCloudELB.tsx +++ b/ui/src/components/workflow/DeployToHuaweiCloudELB.tsx @@ -118,7 +118,7 @@ const DeployToHuaweiCloudELB = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -282,7 +282,7 @@ const DeployToHuaweiCloudELB = ({ data }: DeployFormProps) => { )}
- +
diff --git a/ui/src/components/workflow/DeployToKubernetesSecret.tsx b/ui/src/components/workflow/DeployToKubernetesSecret.tsx index 6c3db321..f24c8c64 100644 --- a/ui/src/components/workflow/DeployToKubernetesSecret.tsx +++ b/ui/src/components/workflow/DeployToKubernetesSecret.tsx @@ -105,7 +105,7 @@ const DeployToKubernetesSecret = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -226,7 +226,7 @@ const DeployToKubernetesSecret = ({ data }: DeployFormProps) => { />
- +
diff --git a/ui/src/components/workflow/DeployToLocal.tsx b/ui/src/components/workflow/DeployToLocal.tsx index 5e9cec63..30f48e91 100644 --- a/ui/src/components/workflow/DeployToLocal.tsx +++ b/ui/src/components/workflow/DeployToLocal.tsx @@ -215,7 +215,7 @@ Remove-Item -Path "$pfxPath" -Force trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -462,7 +462,7 @@ Remove-Item -Path "$pfxPath" -Force />
- +
diff --git a/ui/src/components/workflow/DeployToQiniuCDN.tsx b/ui/src/components/workflow/DeployToQiniuCDN.tsx index b353942e..bb9935fb 100644 --- a/ui/src/components/workflow/DeployToQiniuCDN.tsx +++ b/ui/src/components/workflow/DeployToQiniuCDN.tsx @@ -91,7 +91,7 @@ const DeployToQiniuCDN = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -171,7 +171,7 @@ const DeployToQiniuCDN = ({ data }: DeployFormProps) => { />
- +
diff --git a/ui/src/components/workflow/DeployToSSH.tsx b/ui/src/components/workflow/DeployToSSH.tsx index 3056c678..339a7cd7 100644 --- a/ui/src/components/workflow/DeployToSSH.tsx +++ b/ui/src/components/workflow/DeployToSSH.tsx @@ -133,7 +133,7 @@ const DeployToSSH = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -339,7 +339,7 @@ const DeployToSSH = ({ data }: DeployFormProps) => { />
- +
diff --git a/ui/src/components/workflow/DeployToTencentCDN.tsx b/ui/src/components/workflow/DeployToTencentCDN.tsx index 4ae8270d..a8626d08 100644 --- a/ui/src/components/workflow/DeployToTencentCDN.tsx +++ b/ui/src/components/workflow/DeployToTencentCDN.tsx @@ -90,7 +90,7 @@ const DeployToTencentCDN = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -170,7 +170,7 @@ const DeployToTencentCDN = ({ data }: DeployFormProps) => { />
- +
diff --git a/ui/src/components/workflow/DeployToTencentCLB.tsx b/ui/src/components/workflow/DeployToTencentCLB.tsx index d2fd2c26..77690e25 100644 --- a/ui/src/components/workflow/DeployToTencentCLB.tsx +++ b/ui/src/components/workflow/DeployToTencentCLB.tsx @@ -130,7 +130,7 @@ const DeployToTencentCLB = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -310,7 +310,7 @@ const DeployToTencentCLB = ({ data }: DeployFormProps) => { )}
- +
diff --git a/ui/src/components/workflow/DeployToTencentCOS.tsx b/ui/src/components/workflow/DeployToTencentCOS.tsx index 4091e0b0..1cdb6e91 100644 --- a/ui/src/components/workflow/DeployToTencentCOS.tsx +++ b/ui/src/components/workflow/DeployToTencentCOS.tsx @@ -96,7 +96,7 @@ const DeployToTencentCOS = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -206,7 +206,7 @@ const DeployToTencentCOS = ({ data }: DeployFormProps) => { />
- +
diff --git a/ui/src/components/workflow/DeployToTencentTEO.tsx b/ui/src/components/workflow/DeployToTencentTEO.tsx index 00247b36..dcb5d9cc 100644 --- a/ui/src/components/workflow/DeployToTencentTEO.tsx +++ b/ui/src/components/workflow/DeployToTencentTEO.tsx @@ -93,7 +93,7 @@ const DeployToTencentTEO = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -188,7 +188,7 @@ const DeployToTencentTEO = ({ data }: DeployFormProps) => { />
- +
diff --git a/ui/src/components/workflow/DeployToVolcengineCDN.tsx b/ui/src/components/workflow/DeployToVolcengineCDN.tsx index ad5b0e5e..320bd0c9 100644 --- a/ui/src/components/workflow/DeployToVolcengineCDN.tsx +++ b/ui/src/components/workflow/DeployToVolcengineCDN.tsx @@ -90,7 +90,7 @@ const DeployToVolcengineCDN = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -170,7 +170,7 @@ const DeployToVolcengineCDN = ({ data }: DeployFormProps) => { />
- +
diff --git a/ui/src/components/workflow/DeployToVolcengineLive.tsx b/ui/src/components/workflow/DeployToVolcengineLive.tsx index 67e68365..80da9e30 100644 --- a/ui/src/components/workflow/DeployToVolcengineLive.tsx +++ b/ui/src/components/workflow/DeployToVolcengineLive.tsx @@ -90,7 +90,7 @@ const DeployToVolcengineLive = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -170,7 +170,7 @@ const DeployToVolcengineLive = ({ data }: DeployFormProps) => { />
- +
diff --git a/ui/src/components/workflow/DeployToWebhook.tsx b/ui/src/components/workflow/DeployToWebhook.tsx index 078bff6e..0f5698b6 100644 --- a/ui/src/components/workflow/DeployToWebhook.tsx +++ b/ui/src/components/workflow/DeployToWebhook.tsx @@ -94,7 +94,7 @@ const DeployToWebhook = ({ data }: DeployFormProps) => { trigger={
- {t("common.add")} + {t("common.button.add")}
} op="add" @@ -174,7 +174,7 @@ const DeployToWebhook = ({ data }: DeployFormProps) => { />
- +
diff --git a/ui/src/components/workflow/NotifyForm.tsx b/ui/src/components/workflow/NotifyForm.tsx index 8d6e2d16..ea48cc3c 100644 --- a/ui/src/components/workflow/NotifyForm.tsx +++ b/ui/src/components/workflow/NotifyForm.tsx @@ -171,7 +171,7 @@ const NotifyForm = ({ data }: NotifyFormProps) => { />
- +
diff --git a/ui/src/components/workflow/StartForm.tsx b/ui/src/components/workflow/StartForm.tsx index cbdf83ff..f7986e77 100644 --- a/ui/src/components/workflow/StartForm.tsx +++ b/ui/src/components/workflow/StartForm.tsx @@ -135,7 +135,7 @@ const StartForm = ({ data }: StartFormProps) => { />
- +
diff --git a/ui/src/components/workflow/WorkflowBaseInfoEditDialog.tsx b/ui/src/components/workflow/WorkflowBaseInfoEditDialog.tsx index a33a430a..0ed4162a 100644 --- a/ui/src/components/workflow/WorkflowBaseInfoEditDialog.tsx +++ b/ui/src/components/workflow/WorkflowBaseInfoEditDialog.tsx @@ -115,7 +115,7 @@ const WorkflowNameBaseInfoDialog = ({ trigger }: WorkflowNameEditDialogProps) => />
- +
diff --git a/ui/src/i18n/locales/en/index.ts b/ui/src/i18n/locales/en/index.ts index 38f3b2e9..b23a3bf7 100644 --- a/ui/src/i18n/locales/en/index.ts +++ b/ui/src/i18n/locales/en/index.ts @@ -4,7 +4,6 @@ import nlsDashboard from "./nls.dashboard.json"; import nlsSettings from "./nls.settings.json"; import nlsDomain from "./nls.domain.json"; import nlsAccess from "./nls.access.json"; -import nlsHistory from "./nls.history.json"; import nlsWorkflow from "./nls.workflow.json"; import nlsCertificate from "./nls.certificate.json"; @@ -15,7 +14,6 @@ export default Object.freeze({ ...nlsSettings, ...nlsDomain, ...nlsAccess, - ...nlsHistory, ...nlsWorkflow, ...nlsCertificate, }); diff --git a/ui/src/i18n/locales/en/nls.access.json b/ui/src/i18n/locales/en/nls.access.json index 7cd46980..bb42852c 100644 --- a/ui/src/i18n/locales/en/nls.access.json +++ b/ui/src/i18n/locales/en/nls.access.json @@ -7,7 +7,12 @@ "access.action.edit": "Edit Authorization", "access.action.copy": "Copy Authorization", "access.action.delete": "Delete Authorization", - "access.action.delete.confirm": "Are you sure you want to delete the deployment authorization?", + "access.action.delete.confirm": "Are you sure to delete this authorization?", + + "access.props.name": "Name", + "access.props.provider": "Provider", + "access.props.created_at": "Created At", + "access.props.updated_at": "Updated At", "access.authorization.form.type.label": "Provider", "access.authorization.form.type.placeholder": "Please select a provider", diff --git a/ui/src/i18n/locales/en/nls.certificate.json b/ui/src/i18n/locales/en/nls.certificate.json index 0599e7e8..88ebed31 100644 --- a/ui/src/i18n/locales/en/nls.certificate.json +++ b/ui/src/i18n/locales/en/nls.certificate.json @@ -15,6 +15,9 @@ "certificate.props.expiry.filter.expired": "Expired", "certificate.props.workflow": "Workflow", "certificate.props.source": "Source", + "certificate.props.source.workflow": "Workflow", "certificate.props.certificate_chain": "Certificate Chain", - "certificate.props.private_key": "Private Key" + "certificate.props.private_key": "Private Key", + "certificate.props.created_at": "Created At", + "certificate.props.updated_at": "Updated At" } diff --git a/ui/src/i18n/locales/en/nls.common.json b/ui/src/i18n/locales/en/nls.common.json index d3b5c6d3..5095bab9 100644 --- a/ui/src/i18n/locales/en/nls.common.json +++ b/ui/src/i18n/locales/en/nls.common.json @@ -1,24 +1,12 @@ { - "common.add": "Add", - "common.save": "Save", - "common.save.succeeded.message": "Save Successful", - "common.save.failed.message": "Save Failed", - "common.view": "View", - "common.edit": "Edit", - "common.copy": "Copy", - "common.copy.done": "Copied", - "common.download": "Download", - "common.delete": "Delete", - "common.delete.succeeded.message": "Delete Successful", - "common.delete.failed.message": "Delete Failed", - "common.next": "Next", - "common.reset": "Reset", - "common.confirm": "Confirm", - "common.cancel": "Cancel", - "common.submit": "Submit", - "common.update": "Update", - "common.update.succeeded.message": "Update Successful", - "common.update.failed.message": "Update Failed", + "common.button.add": "Add", + "common.button.cancel": "Cancel", + "common.button.copy": "Copy", + "common.button.delete": "Delete", + "common.button.ok": "Ok", + "common.button.reset": "Reset", + "common.button.save": "Save", + "common.button.submit": "Submit", "common.text.domain": "Domain", "common.text.domain.empty": "No Domain", @@ -27,13 +15,10 @@ "common.text.dns": "Domain Name Server", "common.text.dns.empty": "No DNS", "common.text.ca": "Certificate Authority", - "common.text.name": "Name", - "common.text.provider": "Provider", - "common.text.workflow": "Workflow", - "common.text.created_at": "Created At", - "common.text.updated_at": "Updated At", - "common.text.operations": "Operations", + "common.text.copied": "Copied", "common.text.nodata": "No data available", + "common.text.operation_succeeded": "Operation succeeded", + "common.text.operation_failed": "Operation failed", "common.text.request_error": "Request error", "common.menu.theme": "Change Theme", diff --git a/ui/src/i18n/locales/en/nls.dashboard.json b/ui/src/i18n/locales/en/nls.dashboard.json index 68d61004..5450bfa3 100644 --- a/ui/src/i18n/locales/en/nls.dashboard.json +++ b/ui/src/i18n/locales/en/nls.dashboard.json @@ -8,5 +8,5 @@ "dashboard.statistics.enabled_workflows": "Enabled Workflows", "dashboard.statistics.unit": "", - "dashboard.certificate": "Latest Certificate" + "dashboard.latest_workflow_run": "Latest Workflow Run" } diff --git a/ui/src/i18n/locales/en/nls.history.json b/ui/src/i18n/locales/en/nls.history.json deleted file mode 100644 index fb3df441..00000000 --- a/ui/src/i18n/locales/en/nls.history.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "history.page.title": "Deployment History", - - "history.nodata": "You have not created any deployments yet, please add a domain to start deployment!", - - "history.props.domain": "Domain", - "history.props.status": "Status", - "history.props.stage": "Stage", - "history.props.stage.progress.check": "Check", - "history.props.stage.progress.apply": "Apply", - "history.props.stage.progress.deploy": "Deploy", - "history.props.last_execution_time": "Last Execution Time", - - "history.log": "Log" -} diff --git a/ui/src/i18n/locales/en/nls.workflow.json b/ui/src/i18n/locales/en/nls.workflow.json index b4ff4f01..e2d9f67f 100644 --- a/ui/src/i18n/locales/en/nls.workflow.json +++ b/ui/src/i18n/locales/en/nls.workflow.json @@ -3,6 +3,23 @@ "workflow.nodata": "No workflows. Please create a workflow to generate certificates! 😀", + "workflow.action.create": "Create Workflow", + "workflow.action.edit": "Edit Workflow", + "workflow.action.delete": "Delete Workflow", + "workflow.action.delete.confirm": "Are you sure to delete this workflow?", + + "workflow.props.name": "Name", + "workflow.props.name.placeholder": "Please enter name", + "workflow.props.name.default": "Unnamed", + "workflow.props.description": "Description", + "workflow.props.description.placeholder": "Please enter description", + "workflow.props.execution_method": "Execution Method", + "workflow.props.state": "State", + "workflow.props.state.filter.enabled": "Enabled", + "workflow.props.state.filter.disabled": "Disabled", + "workflow.props.created_at": "Created At", + "workflow.props.updated_at": "Updated At", + "workflow.detail.title": "Workflow", "workflow.detail.history": "History", "workflow.detail.action.save": "Save updates", @@ -15,25 +32,6 @@ "workflow.baseinfo.title": "Basic Information", - "workflow.props.name": "Name", - "workflow.props.name.placeholder": "Please enter name", - "workflow.props.name.default": "Unnamed", - "workflow.props.description": "Description", - "workflow.props.description.placeholder": "Please enter description", - "workflow.props.executionMethod": "Execution Method", - "workflow.props.state": "State", - "workflow.props.state.filter.enabled": "Enabled", - "workflow.props.state.filter.disabled": "Disabled", - "workflow.props.createdAt": "Created", - "workflow.props.updatedAt": "Updated", - - "workflow.action": "Action", - "workflow.action.edit": "Edit", - "workflow.action.create": "Create Workflow", - - "workflow.action.delete.alert.title": "Delete Workflow", - "workflow.action.delete.alert.content": "Are you sure you want to delete this workflow?", - "workflow.history.page.title": "Logs", "workflow.history.props.state": "State", "workflow.history.props.state.success": "Success", diff --git a/ui/src/i18n/locales/zh/index.ts b/ui/src/i18n/locales/zh/index.ts index 38f3b2e9..b23a3bf7 100644 --- a/ui/src/i18n/locales/zh/index.ts +++ b/ui/src/i18n/locales/zh/index.ts @@ -4,7 +4,6 @@ import nlsDashboard from "./nls.dashboard.json"; import nlsSettings from "./nls.settings.json"; import nlsDomain from "./nls.domain.json"; import nlsAccess from "./nls.access.json"; -import nlsHistory from "./nls.history.json"; import nlsWorkflow from "./nls.workflow.json"; import nlsCertificate from "./nls.certificate.json"; @@ -15,7 +14,6 @@ export default Object.freeze({ ...nlsSettings, ...nlsDomain, ...nlsAccess, - ...nlsHistory, ...nlsWorkflow, ...nlsCertificate, }); diff --git a/ui/src/i18n/locales/zh/nls.access.json b/ui/src/i18n/locales/zh/nls.access.json index f4862fbb..fbbe38b5 100644 --- a/ui/src/i18n/locales/zh/nls.access.json +++ b/ui/src/i18n/locales/zh/nls.access.json @@ -9,6 +9,11 @@ "access.action.delete": "删除授权", "access.action.delete.confirm": "确定要删除此授权吗?", + "access.props.name": "名称", + "access.props.provider": "服务商", + "access.props.created_at": "创建时间", + "access.props.updated_at": "更新时间", + "access.authorization.form.type.label": "服务商", "access.authorization.form.type.placeholder": "请选择服务商", "access.authorization.form.type.search.placeholder": "搜索服务商", diff --git a/ui/src/i18n/locales/zh/nls.certificate.json b/ui/src/i18n/locales/zh/nls.certificate.json index e9274c5f..538e24bf 100644 --- a/ui/src/i18n/locales/zh/nls.certificate.json +++ b/ui/src/i18n/locales/zh/nls.certificate.json @@ -15,6 +15,9 @@ "certificate.props.expiry.filter.expired": "已到期", "certificate.props.workflow": "所属工作流", "certificate.props.source": "来源", + "certificate.props.source.workflow": "工作流", "certificate.props.certificate_chain": "证书内容", - "certificate.props.private_key": "私钥内容" + "certificate.props.private_key": "私钥内容", + "certificate.props.created_at": "创建时间", + "certificate.props.updated_at": "更新时间" } diff --git a/ui/src/i18n/locales/zh/nls.common.json b/ui/src/i18n/locales/zh/nls.common.json index fc986eda..22d41588 100644 --- a/ui/src/i18n/locales/zh/nls.common.json +++ b/ui/src/i18n/locales/zh/nls.common.json @@ -1,24 +1,12 @@ { - "common.add": "新增", - "common.save": "保存", - "common.save.succeeded.message": "保存成功", - "common.save.failed.message": "保存失败", - "common.view": "查看", - "common.edit": "编辑", - "common.copy": "复制", - "common.copy.done": "已复制", - "common.download": "下载", - "common.delete": "刪除", - "common.delete.succeeded.message": "删除成功", - "common.delete.failed.message": "删除失败", - "common.next": "下一步", - "common.reset": "重置", - "common.confirm": "确认", - "common.cancel": "取消", - "common.submit": "提交", - "common.update": "更新", - "common.update.succeeded.message": "修改成功", - "common.update.failed.message": "修改失败", + "common.button.add": "新增", + "common.button.cancel": "取消", + "common.button.copy": "复制", + "common.button.delete": "刪除", + "common.button.ok": "确定", + "common.button.reset": "重置", + "common.button.save": "保存", + "common.button.submit": "提交", "common.text.domain": "域名", "common.text.domain.empty": "无域名", @@ -27,13 +15,10 @@ "common.text.dns": "DNS(域名服务器)", "common.text.dns.empty": "无 DNS 地址", "common.text.ca": "CA(证书颁发机构)", - "common.text.name": "名称", - "common.text.provider": "服务商", - "common.text.workflow": "工作流", - "common.text.created_at": "创建时间", - "common.text.updated_at": "更新时间", - "common.text.operations": "操作", + "common.text.copied": "已复制", "common.text.nodata": "暂无数据", + "common.text.operation_succeeded": "操作成功", + "common.text.operation_failed": "操作失败", "common.text.request_error": "请求错误", "common.menu.theme": "切换主题", diff --git a/ui/src/i18n/locales/zh/nls.dashboard.json b/ui/src/i18n/locales/zh/nls.dashboard.json index 07100082..72086011 100644 --- a/ui/src/i18n/locales/zh/nls.dashboard.json +++ b/ui/src/i18n/locales/zh/nls.dashboard.json @@ -8,5 +8,5 @@ "dashboard.statistics.enabled_workflows": "已启用工作流", "dashboard.statistics.unit": "个", - "dashboard.certificate": "最新证书" + "dashboard.latest_workflow_run": "最近执行的工作流" } diff --git a/ui/src/i18n/locales/zh/nls.history.json b/ui/src/i18n/locales/zh/nls.history.json deleted file mode 100644 index 30e0cb1e..00000000 --- a/ui/src/i18n/locales/zh/nls.history.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "history.page.title": "部署历史", - - "history.nodata": "你暂未创建任何部署,请先添加域名进行部署吧!", - - "history.props.domain": "域名", - "history.props.status": "状态", - "history.props.stage": "阶段", - "history.props.stage.progress.check": "检查", - "history.props.stage.progress.apply": "获取", - "history.props.stage.progress.deploy": "部署", - "history.props.last_execution_time": "最近执行时间", - - "history.log": "日志" -} diff --git a/ui/src/i18n/locales/zh/nls.workflow.json b/ui/src/i18n/locales/zh/nls.workflow.json index ae323d6b..bbb0c364 100644 --- a/ui/src/i18n/locales/zh/nls.workflow.json +++ b/ui/src/i18n/locales/zh/nls.workflow.json @@ -3,6 +3,23 @@ "workflow.nodata": "暂无工作流,请先新建", + "workflow.action.create": "新建工作流", + "workflow.action.edit": "编辑工作流", + "workflow.action.delete": "删除工作流", + "workflow.action.delete.confirm": "确定要删除此工作流吗?", + + "workflow.props.name": "名称", + "workflow.props.name.placeholder": "请输入名称", + "workflow.props.name.default": "未命名工作流", + "workflow.props.description": "描述", + "workflow.props.description.placeholder": "请输入描述", + "workflow.props.execution_method": "执行方式", + "workflow.props.state": "启用状态", + "workflow.props.state.filter.enabled": "启用", + "workflow.props.state.filter.disabled": "未启用", + "workflow.props.created_at": "创建时间", + "workflow.props.updated_at": "更新时间", + "workflow.detail.title": "流程", "workflow.detail.history": "历史", "workflow.detail.action.save": "保存变更", @@ -15,25 +32,6 @@ "workflow.baseinfo.title": "基本信息", - "workflow.props.name": "名称", - "workflow.props.name.placeholder": "请输入名称", - "workflow.props.name.default": "未命名工作流", - "workflow.props.description": "描述", - "workflow.props.description.placeholder": "请输入描述", - "workflow.props.executionMethod": "执行方式", - "workflow.props.state": "启用状态", - "workflow.props.state.filter.enabled": "启用", - "workflow.props.state.filter.disabled": "未启用", - "workflow.props.createdAt": "创建时间", - "workflow.props.updatedAt": "更新时间", - - "workflow.action": "操作", - "workflow.action.edit": "编辑", - "workflow.action.create": "新建工作流", - - "workflow.action.delete.alert.title": "删除工作流", - "workflow.action.delete.alert.content": "确定要删除此工作流吗?", - "workflow.history.page.title": "日志", "workflow.history.props.state": "状态", "workflow.history.props.state.success": "通过", diff --git a/ui/src/pages/accesses/AccessList.tsx b/ui/src/pages/accesses/AccessList.tsx index dc08a936..8198cfdc 100644 --- a/ui/src/pages/accesses/AccessList.tsx +++ b/ui/src/pages/accesses/AccessList.tsx @@ -29,13 +29,13 @@ const AccessList = () => { }, { key: "name", - title: t("common.text.name"), + title: t("access.props.name"), ellipsis: true, render: (_, record) => <>{record.name}, }, { key: "provider", - title: t("common.text.provider"), + title: t("access.props.provider"), ellipsis: true, render: (_, record) => { return ( @@ -48,7 +48,7 @@ const AccessList = () => { }, { key: "createdAt", - title: t("common.text.created_at"), + title: t("access.props.created_at"), ellipsis: true, render: (_, record) => { return dayjs(record.created!).format("YYYY-MM-DD HH:mm:ss"); @@ -56,7 +56,7 @@ const AccessList = () => { }, { key: "updatedAt", - title: t("common.text.updated_at"), + title: t("access.props.updated_at"), ellipsis: true, render: (_, record) => { return dayjs(record.updated!).format("YYYY-MM-DD HH:mm:ss"); diff --git a/ui/src/pages/certificates/CertificateList.tsx b/ui/src/pages/certificates/CertificateList.tsx index de37254e..2f918087 100644 --- a/ui/src/pages/certificates/CertificateList.tsx +++ b/ui/src/pages/certificates/CertificateList.tsx @@ -77,10 +77,10 @@ const CertificateList = () => { @@ -113,7 +113,7 @@ const CertificateList = () => { const workflowId = record.workflow; return workflowId ? ( - {t("common.text.workflow")} + {t("certificate.props.source.workflow")} { }, { key: "createdAt", - title: t("common.text.created_at"), + title: t("certificate.props.created_at"), ellipsis: true, render: (_, record) => { return dayjs(record.created!).format("YYYY-MM-DD HH:mm:ss"); @@ -139,7 +139,7 @@ const CertificateList = () => { }, { key: "updatedAt", - title: t("common.text.updated_at"), + title: t("certificate.props.updated_at"), ellipsis: true, render: (_, record) => { return dayjs(record.updated!).format("YYYY-MM-DD HH:mm:ss"); diff --git a/ui/src/pages/dashboard/Dashboard.tsx b/ui/src/pages/dashboard/Dashboard.tsx index 69c9ff6c..f767037a 100644 --- a/ui/src/pages/dashboard/Dashboard.tsx +++ b/ui/src/pages/dashboard/Dashboard.tsx @@ -115,7 +115,7 @@ const Dashboard = () => { -
TODO: 最近执行的工作流 LatestWorkflowRun
+
TODO: {t("dashboard.latest_workflow_run")}
); }; diff --git a/ui/src/pages/settings/Account.tsx b/ui/src/pages/settings/Account.tsx index 3d1555bf..dc388201 100644 --- a/ui/src/pages/settings/Account.tsx +++ b/ui/src/pages/settings/Account.tsx @@ -84,10 +84,10 @@ const Account = () => {
{changed ? ( - + ) : ( )}
diff --git a/ui/src/pages/settings/Password.tsx b/ui/src/pages/settings/Password.tsx index d500f561..fa527627 100644 --- a/ui/src/pages/settings/Password.tsx +++ b/ui/src/pages/settings/Password.tsx @@ -124,7 +124,7 @@ const Password = () => { )} />
- +
diff --git a/ui/src/pages/settings/SSLProvider.tsx b/ui/src/pages/settings/SSLProvider.tsx index bd14af22..d8421c74 100644 --- a/ui/src/pages/settings/SSLProvider.tsx +++ b/ui/src/pages/settings/SSLProvider.tsx @@ -80,13 +80,13 @@ const SSLProvider = () => { const resp = await update({ ...data }); setConfig(resp); toast({ - title: t("common.update.succeeded.message"), - description: t("common.update.succeeded.message"), + title: t("common.text.operation_succeeded"), + description: t("common.text.operation_succeeded"), }); } catch (e) { const message = getErrMsg(e); toast({ - title: t("common.update.failed.message"), + title: t("common.text.operation_failed"), description: message, variant: "destructive", }); @@ -222,7 +222,7 @@ const SSLProviderLetsEncryptForm = () => {
- +
@@ -328,7 +328,7 @@ const SSLProviderZeroSSLForm = () => {
- +
@@ -435,7 +435,7 @@ const SSLProviderGtsForm = () => {
- +
diff --git a/ui/src/pages/workflows/WorkflowList.tsx b/ui/src/pages/workflows/WorkflowList.tsx index a1cb95d2..320a934c 100644 --- a/ui/src/pages/workflows/WorkflowList.tsx +++ b/ui/src/pages/workflows/WorkflowList.tsx @@ -49,7 +49,7 @@ const WorkflowList = () => { }, { key: "name", - title: t("common.text.name"), + title: t("workflow.props.name"), ellipsis: true, render: (_, record) => ( @@ -62,7 +62,7 @@ const WorkflowList = () => { }, { key: "type", - title: t("workflow.props.executionMethod"), + title: t("workflow.props.execution_method"), ellipsis: true, render: (_, record) => { const method = record.type; @@ -120,10 +120,10 @@ const WorkflowList = () => { @@ -152,7 +152,7 @@ const WorkflowList = () => { }, { key: "createdAt", - title: t("common.text.created_at"), + title: t("workflow.props.created_at"), ellipsis: true, render: (_, record) => { return dayjs(record.created!).format("YYYY-MM-DD HH:mm:ss"); @@ -160,7 +160,7 @@ const WorkflowList = () => { }, { key: "updatedAt", - title: t("common.text.updated_at"), + title: t("workflow.props.updated_at"), ellipsis: true, render: (_, record) => { return dayjs(record.updated!).format("YYYY-MM-DD HH:mm:ss"); @@ -173,7 +173,7 @@ const WorkflowList = () => { width: 120, render: (_, record) => ( - +