From 89d29c25194dd767926e71eb2979c1008cd9ddc2 Mon Sep 17 00:00:00 2001 From: Gucheng Wang Date: Sun, 19 Mar 2023 20:13:07 +0800 Subject: [PATCH] Add "empty" to i18n --- web/src/ApplicationListPage.js | 2 +- web/src/ProductListPage.js | 2 +- web/src/common/AffiliationSelect.js | 2 +- web/src/common/OAuthWidget.js | 2 +- web/src/locales/de/data.json | 1 + web/src/locales/en/data.json | 1 + web/src/locales/es/data.json | 1 + web/src/locales/fr/data.json | 1 + web/src/locales/id/data.json | 1 + web/src/locales/ja/data.json | 1 + web/src/locales/ko/data.json | 1 + web/src/locales/ru/data.json | 1 + web/src/locales/vi/data.json | 1 + web/src/locales/zh/data.json | 3 ++- 14 files changed, 15 insertions(+), 5 deletions(-) diff --git a/web/src/ApplicationListPage.js b/web/src/ApplicationListPage.js index 8c2eaa11..483a8ae5 100644 --- a/web/src/ApplicationListPage.js +++ b/web/src/ApplicationListPage.js @@ -176,7 +176,7 @@ class ApplicationListPage extends BaseListPage { render: (text, record, index) => { const providers = text; if (providers.length === 0) { - return "(empty)"; + return `(${i18next.t("general:empty")})`; } const half = Math.floor((providers.length + 1) / 2); diff --git a/web/src/ProductListPage.js b/web/src/ProductListPage.js index 33f598df..beb02f4e 100644 --- a/web/src/ProductListPage.js +++ b/web/src/ProductListPage.js @@ -182,7 +182,7 @@ class ProductListPage extends BaseListPage { render: (text, record, index) => { const providers = text; if (providers.length === 0) { - return "(empty)"; + return `(${i18next.t("general:empty")})`; } const half = Math.floor((providers.length + 1) / 2); diff --git a/web/src/common/AffiliationSelect.js b/web/src/common/AffiliationSelect.js index f4cf652e..5e398161 100644 --- a/web/src/common/AffiliationSelect.js +++ b/web/src/common/AffiliationSelect.js @@ -105,7 +105,7 @@ class AffiliationSelect extends React.Component { this.updateUserField("affiliation", name); this.updateUserField("score", id); })} - options={[Setting.getOption("(empty)", "")].concat(this.state.affiliationOptions.map((affiliationOption) => Setting.getOption(affiliationOption.name, affiliationOption.name)) + options={[Setting.getOption(`(${i18next.t("general:empty")})`, "")].concat(this.state.affiliationOptions.map((affiliationOption) => Setting.getOption(affiliationOption.name, affiliationOption.name)) )} /> ) } diff --git a/web/src/common/OAuthWidget.js b/web/src/common/OAuthWidget.js index c417c91b..5c93ea56 100644 --- a/web/src/common/OAuthWidget.js +++ b/web/src/common/OAuthWidget.js @@ -155,7 +155,7 @@ class OAuthWidget extends React.Component { { linkedValue === "" ? ( - "(empty)" + `(${i18next.t("general:empty")})` ) : ( profileUrl === "" ? name : ( diff --git a/web/src/locales/de/data.json b/web/src/locales/de/data.json index dec0734a..e445b626 100644 --- a/web/src/locales/de/data.json +++ b/web/src/locales/de/data.json @@ -268,6 +268,7 @@ "Users": "Benutzer", "Users under all organizations": "Benutzer unter allen Organisationen", "Webhooks": "Webhooks", + "empty": "leere", "{total} in total": "Insgesamt {total}" }, "ldap": { diff --git a/web/src/locales/en/data.json b/web/src/locales/en/data.json index 56f5dd2a..73be33bf 100644 --- a/web/src/locales/en/data.json +++ b/web/src/locales/en/data.json @@ -268,6 +268,7 @@ "Users": "Users", "Users under all organizations": "Users under all organizations", "Webhooks": "Webhooks", + "empty": "empty", "{total} in total": "{total} in total" }, "ldap": { diff --git a/web/src/locales/es/data.json b/web/src/locales/es/data.json index cfa3886b..6eb2a63d 100644 --- a/web/src/locales/es/data.json +++ b/web/src/locales/es/data.json @@ -268,6 +268,7 @@ "Users": "Usuarios", "Users under all organizations": "Usuarios bajo todas las organizaciones", "Webhooks": "Webhooks", + "empty": "vacío", "{total} in total": "{total} en total" }, "ldap": { diff --git a/web/src/locales/fr/data.json b/web/src/locales/fr/data.json index ff184319..301443c7 100644 --- a/web/src/locales/fr/data.json +++ b/web/src/locales/fr/data.json @@ -268,6 +268,7 @@ "Users": "Utilisateurs", "Users under all organizations": "Utilisateurs sous toutes les organisations", "Webhooks": "Webhooks", + "empty": "vide", "{total} in total": "{total} au total" }, "ldap": { diff --git a/web/src/locales/id/data.json b/web/src/locales/id/data.json index 37ce8705..36d0c536 100644 --- a/web/src/locales/id/data.json +++ b/web/src/locales/id/data.json @@ -268,6 +268,7 @@ "Users": "Pengguna-pengguna", "Users under all organizations": "Pengguna di bawah semua organisasi", "Webhooks": "Webhooks", + "empty": "kosong", "{total} in total": "{total} secara keseluruhan" }, "ldap": { diff --git a/web/src/locales/ja/data.json b/web/src/locales/ja/data.json index 52dffd03..d277b5a2 100644 --- a/web/src/locales/ja/data.json +++ b/web/src/locales/ja/data.json @@ -268,6 +268,7 @@ "Users": "ユーザー", "Users under all organizations": "すべての組織のユーザー", "Webhooks": "Webhooks", + "empty": "空", "{total} in total": "総計{total}" }, "ldap": { diff --git a/web/src/locales/ko/data.json b/web/src/locales/ko/data.json index c4d3b51a..12b32ad1 100644 --- a/web/src/locales/ko/data.json +++ b/web/src/locales/ko/data.json @@ -268,6 +268,7 @@ "Users": "사용자들", "Users under all organizations": "모든 조직의 사용자", "Webhooks": "Webhooks", + "empty": "빈", "{total} in total": "총 {total}개" }, "ldap": { diff --git a/web/src/locales/ru/data.json b/web/src/locales/ru/data.json index 5fe6456c..9bf6e4a6 100644 --- a/web/src/locales/ru/data.json +++ b/web/src/locales/ru/data.json @@ -268,6 +268,7 @@ "Users": "Пользователи", "Users under all organizations": "Пользователи всех организаций", "Webhooks": "Webhooks", + "empty": "пустые", "{total} in total": "{total} в общей сложности" }, "ldap": { diff --git a/web/src/locales/vi/data.json b/web/src/locales/vi/data.json index 8845c936..4291bbd1 100644 --- a/web/src/locales/vi/data.json +++ b/web/src/locales/vi/data.json @@ -268,6 +268,7 @@ "Users": "Người dùng", "Users under all organizations": "Người dùng trong tất cả các tổ chức", "Webhooks": "Webhooks", + "empty": "trống", "{total} in total": "Trong tổng số {total}" }, "ldap": { diff --git a/web/src/locales/zh/data.json b/web/src/locales/zh/data.json index 366e5e05..809855e3 100644 --- a/web/src/locales/zh/data.json +++ b/web/src/locales/zh/data.json @@ -171,7 +171,7 @@ "Failed to connect to server": "连接服务器失败", "Failed to delete": "删除失败", "Failed to save": "保存失败", - "Favicon": "组织Favicon", + "Favicon": "Favicon", "Favicon - Tooltip": "该组织所有Casdoor页面中所使用的Favicon图标URL", "First name": "名字", "Forget URL": "忘记密码URL", @@ -268,6 +268,7 @@ "Users": "用户", "Users under all organizations": "所有组织里的用户", "Webhooks": "Webhooks", + "empty": "无", "{total} in total": "{total} 总计" }, "ldap": {