From 5989c4ff34849ba4f97af4dc8f9e9b53054ab1ad Mon Sep 17 00:00:00 2001 From: Gucheng Wang Date: Sun, 19 Mar 2023 01:01:39 +0800 Subject: [PATCH] Remove i18n duplicates --- web/src/AccountTable.js | 2 +- web/src/App.js | 6 ++--- web/src/ApplicationEditPage.js | 2 +- web/src/CertEditPage.js | 4 +-- web/src/CertListPage.js | 4 +-- web/src/LdapEditPage.js | 4 +-- web/src/LdapListPage.js | 2 +- web/src/LdapSyncPage.js | 8 +++--- web/src/LdapTable.js | 2 +- web/src/OrganizationListPage.js | 2 +- web/src/PasswordModal.js | 2 +- web/src/PaymentEditPage.js | 10 ++++---- web/src/PaymentListPage.js | 6 ++--- web/src/PermissionEditPage.js | 4 +-- web/src/PermissionListPage.js | 4 +-- web/src/ProductBuyPage.js | 2 +- web/src/ProductEditPage.js | 4 +-- web/src/ProductListPage.js | 2 +- web/src/ProviderEditPage.js | 2 +- web/src/ProviderTable.js | 2 +- web/src/ResourceListPage.js | 10 ++++---- web/src/SignupTable.js | 8 +++--- web/src/TokenEditPage.js | 2 +- web/src/TokenListPage.js | 2 +- web/src/WebhookEditPage.js | 4 +-- web/src/WebhookHeaderTable.js | 2 +- web/src/WebhookListPage.js | 4 +-- web/src/auth/ForgetPage.js | 4 +-- web/src/auth/LoginPage.js | 4 +-- web/src/common/PoliciyTable.js | 2 +- web/src/locales/de/data.json | 43 ++------------------------------- web/src/locales/en/data.json | 43 ++------------------------------- web/src/locales/es/data.json | 43 ++------------------------------- web/src/locales/fr/data.json | 43 ++------------------------------- web/src/locales/ja/data.json | 43 ++------------------------------- web/src/locales/ko/data.json | 43 ++------------------------------- web/src/locales/ru/data.json | 43 ++------------------------------- web/src/locales/vi/data.json | 43 ++------------------------------- web/src/locales/zh/data.json | 43 ++------------------------------- 39 files changed, 76 insertions(+), 427 deletions(-) diff --git a/web/src/AccountTable.js b/web/src/AccountTable.js index deb3dfd1..df147286 100644 --- a/web/src/AccountTable.js +++ b/web/src/AccountTable.js @@ -64,7 +64,7 @@ class AccountTable extends React.Component { renderTable(table) { const columns = [ { - title: i18next.t("provider:Name"), + title: i18next.t("general:Name"), dataIndex: "name", key: "name", render: (text, record, index) => { diff --git a/web/src/App.js b/web/src/App.js index f918b1e4..c2eb6d9d 100644 --- a/web/src/App.js +++ b/web/src/App.js @@ -672,9 +672,9 @@ class App extends Component { return ( - { - this.renderBanner() - } + {/* { */} + {/* this.renderBanner() */} + {/* } */} { diff --git a/web/src/ApplicationEditPage.js b/web/src/ApplicationEditPage.js index 70f044d4..afcc26a5 100644 --- a/web/src/ApplicationEditPage.js +++ b/web/src/ApplicationEditPage.js @@ -482,7 +482,7 @@ class ApplicationEditPage extends React.Component { - {Setting.getLabel(i18next.t("provider:Terms of Use"), i18next.t("provider:Terms of Use - Tooltip"))} : + {Setting.getLabel(i18next.t("signup:Terms of Use"), i18next.t("signup:Terms of Use - Tooltip"))} : { diff --git a/web/src/CertEditPage.js b/web/src/CertEditPage.js index 1287bfbc..e177a2b7 100644 --- a/web/src/CertEditPage.js +++ b/web/src/CertEditPage.js @@ -97,7 +97,7 @@ class CertEditPage extends React.Component { - {Setting.getLabel(i18next.t("cert:Scope"), i18next.t("cert:Scope - Tooltip"))} : + {Setting.getLabel(i18next.t("provider:Scope"), i18next.t("cert:Scope - Tooltip"))} : { diff --git a/web/src/CertListPage.js b/web/src/CertListPage.js index d66d040c..4fd3e18f 100644 --- a/web/src/CertListPage.js +++ b/web/src/CertListPage.js @@ -111,7 +111,7 @@ class CertListPage extends BaseListPage { ...this.getColumnSearchProps("displayName"), }, { - title: i18next.t("cert:Scope"), + title: i18next.t("provider:Scope"), dataIndex: "scope", key: "scope", filterMultiple: false, @@ -122,7 +122,7 @@ class CertListPage extends BaseListPage { sorter: true, }, { - title: i18next.t("cert:Type"), + title: i18next.t("provider:Type"), dataIndex: "type", key: "type", filterMultiple: false, diff --git a/web/src/LdapEditPage.js b/web/src/LdapEditPage.js index 6fb4003c..259bad36 100644 --- a/web/src/LdapEditPage.js +++ b/web/src/LdapEditPage.js @@ -87,7 +87,7 @@ class LdapEditPage extends React.Component { } style={{marginLeft: "5px"}} type="inner"> @@ -109,7 +109,7 @@ class LdapEditPage extends React.Component { - {Setting.getLabel(i18next.t("ldap:ID"), i18next.t("general:ID - Tooltip"))} : + {Setting.getLabel(i18next.t("general:ID"), i18next.t("general:ID - Tooltip"))} : diff --git a/web/src/LdapListPage.js b/web/src/LdapListPage.js index 6c51a514..f0d67627 100644 --- a/web/src/LdapListPage.js +++ b/web/src/LdapListPage.js @@ -137,7 +137,7 @@ class LdapListPage extends React.Component {
+ onClick={() => Setting.goToLink(`/ldap/sync/${record.id}`)}>{i18next.t("general:Sync")} record.groupId.indexOf(value) === 0, }, { - title: i18next.t("ldap:Email"), + title: i18next.t("general:Email"), dataIndex: "email", key: "email", width: "240px", sorter: (a, b) => a.email.localeCompare(b.email), }, { - title: i18next.t("ldap:Phone"), + title: i18next.t("general:Phone"), dataIndex: "phone", key: "phone", width: "160px", sorter: (a, b) => a.phone.localeCompare(b.phone), }, { - title: i18next.t("ldap:Address"), + title: i18next.t("user:Address"), dataIndex: "address", key: "address", sorter: (a, b) => a.address.localeCompare(b.address), @@ -205,7 +205,7 @@ class LdapSyncPage extends React.Component { onConfirm={() => this.syncUsers()} > {this.state.payment?.personIdCard} {this.state.payment?.personEmail} {this.state.payment?.personPhone} - {this.state.payment?.invoiceType === "Individual" ? i18next.t("payment:Individual") : i18next.t("payment:Organization")} + {this.state.payment?.invoiceType === "Individual" ? i18next.t("payment:Individual") : i18next.t("general:Organization")} {this.state.payment?.invoiceTitle} {this.state.payment?.invoiceTaxId} {this.state.payment?.invoiceRemark} @@ -195,7 +195,7 @@ class PaymentEditPage extends React.Component { - {Setting.getLabel(i18next.t("payment:Type"), i18next.t("payment:Type - Tooltip"))} : + {Setting.getLabel(i18next.t("provider:Type"), i18next.t("payment:Type - Tooltip"))} : { @@ -215,7 +215,7 @@ class PaymentEditPage extends React.Component { - {Setting.getLabel(i18next.t("payment:Price"), i18next.t("payment:Price - Tooltip"))} : + {Setting.getLabel(i18next.t("product:Price"), i18next.t("product:Price - Tooltip"))} : { @@ -235,7 +235,7 @@ class PaymentEditPage extends React.Component { - {Setting.getLabel(i18next.t("payment:State"), i18next.t("payment:State - Tooltip"))} : + {Setting.getLabel(i18next.t("general:State"), i18next.t("general:State - Tooltip"))} : { @@ -312,7 +312,7 @@ class PaymentEditPage extends React.Component { { [ {id: "Individual", name: i18next.t("payment:Individual")}, - {id: "Organization", name: i18next.t("payment:Organization")}, + {id: "Organization", name: i18next.t("general:Organization")}, ].map((item, index) => ) } diff --git a/web/src/PaymentListPage.js b/web/src/PaymentListPage.js index 5ce4ede3..87c25b6d 100644 --- a/web/src/PaymentListPage.js +++ b/web/src/PaymentListPage.js @@ -167,7 +167,7 @@ class PaymentListPage extends BaseListPage { // ...this.getColumnSearchProps('displayName'), // }, { - title: i18next.t("payment:Type"), + title: i18next.t("provider:Type"), dataIndex: "type", key: "type", width: "140px", @@ -189,7 +189,7 @@ class PaymentListPage extends BaseListPage { ...this.getColumnSearchProps("productDisplayName"), }, { - title: i18next.t("payment:Price"), + title: i18next.t("product:Price"), dataIndex: "price", key: "price", width: "120px", @@ -205,7 +205,7 @@ class PaymentListPage extends BaseListPage { ...this.getColumnSearchProps("currency"), }, { - title: i18next.t("payment:State"), + title: i18next.t("general:State"), dataIndex: "state", key: "state", width: "120px", diff --git a/web/src/PermissionEditPage.js b/web/src/PermissionEditPage.js index ff41d110..24283261 100644 --- a/web/src/PermissionEditPage.js +++ b/web/src/PermissionEditPage.js @@ -264,7 +264,7 @@ class PermissionEditPage extends React.Component { - {Setting.getLabel(i18next.t("permission:Resources"), i18next.t("permission:Resources - Tooltip"))} : + {Setting.getLabel(i18next.t("general:Resources"), i18next.t("permission:Resources - Tooltip"))} : { diff --git a/web/src/PermissionListPage.js b/web/src/PermissionListPage.js index b61a4d6e..ee595e95 100644 --- a/web/src/PermissionListPage.js +++ b/web/src/PermissionListPage.js @@ -175,7 +175,7 @@ class PermissionListPage extends BaseListPage { sorter: true, }, { - title: i18next.t("permission:Resources"), + title: i18next.t("general:Resources"), dataIndex: "resources", key: "resources", // width: '100px', @@ -270,7 +270,7 @@ class PermissionListPage extends BaseListPage { }, }, { - title: i18next.t("permission:State"), + title: i18next.t("general:State"), dataIndex: "state", key: "state", filterMultiple: false, diff --git a/web/src/ProductBuyPage.js b/web/src/ProductBuyPage.js index 02d600b4..20fb84a8 100644 --- a/web/src/ProductBuyPage.js +++ b/web/src/ProductBuyPage.js @@ -216,7 +216,7 @@ class ProductBuyPage extends React.Component { {Setting.getLanguageText(product?.detail)} - {product?.tag} + {product?.tag} {product?.name} {product?.name} diff --git a/web/src/ProductEditPage.js b/web/src/ProductEditPage.js index e3ded9ed..8ca134f8 100644 --- a/web/src/ProductEditPage.js +++ b/web/src/ProductEditPage.js @@ -135,7 +135,7 @@ class ProductEditPage extends React.Component { - {Setting.getLabel(i18next.t("product:Tag"), i18next.t("product:Tag - Tooltip"))} : + {Setting.getLabel(i18next.t("user:Tag"), i18next.t("product:Tag - Tooltip"))} : { @@ -155,7 +155,7 @@ class ProductEditPage extends React.Component { - {Setting.getLabel(i18next.t("product:Description"), i18next.t("product:Description - Tooltip"))} : + {Setting.getLabel(i18next.t("general:Description"), i18next.t("general:Description - Tooltip"))} : { diff --git a/web/src/ProductListPage.js b/web/src/ProductListPage.js index 0b63bfd3..33f598df 100644 --- a/web/src/ProductListPage.js +++ b/web/src/ProductListPage.js @@ -126,7 +126,7 @@ class ProductListPage extends BaseListPage { }, }, { - title: i18next.t("product:Tag"), + title: i18next.t("user:Tag"), dataIndex: "tag", key: "tag", width: "160px", diff --git a/web/src/ProviderEditPage.js b/web/src/ProviderEditPage.js index b847838c..a657dcd0 100644 --- a/web/src/ProviderEditPage.js +++ b/web/src/ProviderEditPage.js @@ -324,7 +324,7 @@ class ProviderEditPage extends React.Component { this.state.provider.type !== "WeCom" ? null : ( - {Setting.getLabel(i18next.t("provider:Method"), i18next.t("provider:Method - Tooltip"))} : + {Setting.getLabel(i18next.t("general:Method"), i18next.t("provider:Method - Tooltip"))} : { diff --git a/web/src/TokenListPage.js b/web/src/TokenListPage.js index ef7c6163..9e40f8f5 100644 --- a/web/src/TokenListPage.js +++ b/web/src/TokenListPage.js @@ -178,7 +178,7 @@ class TokenListPage extends BaseListPage { ...this.getColumnSearchProps("expiresIn"), }, { - title: i18next.t("token:Scope"), + title: i18next.t("provider:Scope"), dataIndex: "scope", key: "scope", width: "110px", diff --git a/web/src/WebhookEditPage.js b/web/src/WebhookEditPage.js index fe2bef23..fc7b5e82 100644 --- a/web/src/WebhookEditPage.js +++ b/web/src/WebhookEditPage.js @@ -180,7 +180,7 @@ class WebhookEditPage extends React.Component { - {Setting.getLabel(i18next.t("webhook:URL"), i18next.t("webhook:URL - Tooltip"))} : + {Setting.getLabel(i18next.t("general:URL"), i18next.t("general:URL - Tooltip"))} : } value={this.state.webhook.url} onChange={e => { @@ -190,7 +190,7 @@ class WebhookEditPage extends React.Component { - {Setting.getLabel(i18next.t("webhook:Method"), i18next.t("webhook:Method - Tooltip"))} : + {Setting.getLabel(i18next.t("general:Method"), i18next.t("webhook:Method - Tooltip"))} :