From af55d0547fb43d2b2e5485ba1d789df6aedbb32e Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Fri, 21 Mar 2025 21:03:29 +0800 Subject: [PATCH] feat: improve frontend i18n strings --- web/src/InvitationEditPage.js | 2 +- web/src/ProviderEditPage.js | 10 ++- web/src/WebhookEditPage.js | 2 +- web/src/common/modal/FaceRecognitionModal.js | 2 +- web/src/locales/ar/data.json | 34 ++++++--- web/src/locales/cs/data.json | 34 ++++++--- web/src/locales/de/data.json | 34 ++++++--- web/src/locales/en/data.json | 33 ++++++--- web/src/locales/es/data.json | 34 ++++++--- web/src/locales/fa/data.json | 34 ++++++--- web/src/locales/fi/data.json | 34 ++++++--- web/src/locales/fr/data.json | 34 ++++++--- web/src/locales/he/data.json | 34 ++++++--- web/src/locales/id/data.json | 34 ++++++--- web/src/locales/it/data.json | 34 ++++++--- web/src/locales/ja/data.json | 34 ++++++--- web/src/locales/kk/data.json | 34 ++++++--- web/src/locales/ko/data.json | 34 ++++++--- web/src/locales/ms/data.json | 34 ++++++--- web/src/locales/nl/data.json | 34 ++++++--- web/src/locales/pl/data.json | 34 ++++++--- web/src/locales/pt/data.json | 34 ++++++--- web/src/locales/ru/data.json | 34 ++++++--- web/src/locales/sk/data.json | 34 ++++++--- web/src/locales/sv/data.json | 34 ++++++--- web/src/locales/tr/data.json | 34 ++++++--- web/src/locales/uk/data.json | 34 ++++++--- web/src/locales/vi/data.json | 34 ++++++--- web/src/locales/zh/data.json | 75 ++++++++++++-------- web/src/table/FaceIdTable.js | 8 +-- web/src/table/MfaAccountTable.js | 8 +-- 31 files changed, 634 insertions(+), 288 deletions(-) diff --git a/web/src/InvitationEditPage.js b/web/src/InvitationEditPage.js index 66d9b7e8..30898a20 100644 --- a/web/src/InvitationEditPage.js +++ b/web/src/InvitationEditPage.js @@ -114,7 +114,7 @@ class InvitationEditPage extends React.Component { const selectedOrganization = Setting.getArrayItem(this.state.organizations, "name", this.state.invitation.owner); defaultApplication = selectedOrganization.defaultApplication; if (!defaultApplication) { - Setting.showMessage("error", i18next.t("invitation:You need to specify a default application for ") + selectedOrganization.name); + Setting.showMessage("error", i18next.t("invitation:You need to first specify a default application for organization: ") + selectedOrganization.name); return; } } diff --git a/web/src/ProviderEditPage.js b/web/src/ProviderEditPage.js index c74d8960..847cbe24 100644 --- a/web/src/ProviderEditPage.js +++ b/web/src/ProviderEditPage.js @@ -288,10 +288,8 @@ class ProviderEditPage extends React.Component { default: if (provider.type === "Aliyun Captcha") { return Setting.getLabel(i18next.t("provider:Scene"), i18next.t("provider:Scene - Tooltip")); - } else if (provider.type === "WeChat Pay") { + } else if (provider.type === "WeChat Pay" || provider.type === "CUCloud") { return Setting.getLabel(i18next.t("provider:App ID"), i18next.t("provider:App ID - Tooltip")); - } else if (provider.type === "CUCloud") { - return Setting.getLabel(i18next.t("provider:Account ID"), i18next.t("provider:Account ID - Tooltip")); } else { return Setting.getLabel(i18next.t("provider:Client ID 2"), i18next.t("provider:Client ID 2 - Tooltip")); } @@ -389,8 +387,8 @@ class ProviderEditPage extends React.Component { text = i18next.t("provider:App Key"); tooltip = i18next.t("provider:App Key - Tooltip"); } else if (provider.type === "CUCloud") { - text = i18next.t("provider:Topic name"); - tooltip = i18next.t("provider:Topic name - Tooltip"); + text = "Topic name"; + tooltip = "Topic name - Tooltip"; } } @@ -1283,7 +1281,7 @@ class ProviderEditPage extends React.Component { }} /> - + diff --git a/web/src/WebhookEditPage.js b/web/src/WebhookEditPage.js index 2ddea834..dfd64647 100644 --- a/web/src/WebhookEditPage.js +++ b/web/src/WebhookEditPage.js @@ -306,7 +306,7 @@ class WebhookEditPage extends React.Component { - {Setting.getLabel(i18next.t("application:Extended user fields"), i18next.t("application:Extended user fields - Tooltip"))} : + {Setting.getLabel(i18next.t("webhook:Extended user fields"), i18next.t("webhook:Extended user fields - Tooltip"))} :