From b0e318c9db5cbd0b90355a5f7942932f44ddb57a Mon Sep 17 00:00:00 2001 From: Coki <92775570+HashCookie@users.noreply.github.com> Date: Mon, 16 Dec 2024 08:34:13 +0800 Subject: [PATCH] feat: add localized tab titles for Basic and Advanced Editors (#3431) * feat: add localized tab titles for Basic and Advanced Editors * docs: update translations for model editor labels in multiple locales --- web/src/CasbinEditor.js | 5 +++-- web/src/locales/ar/data.json | 2 ++ web/src/locales/cs/data.json | 2 ++ web/src/locales/de/data.json | 2 ++ web/src/locales/en/data.json | 2 ++ web/src/locales/es/data.json | 2 ++ web/src/locales/fa/data.json | 2 ++ web/src/locales/fi/data.json | 2 ++ web/src/locales/fr/data.json | 2 ++ web/src/locales/he/data.json | 2 ++ web/src/locales/id/data.json | 2 ++ web/src/locales/it/data.json | 2 ++ web/src/locales/ja/data.json | 2 ++ web/src/locales/kk/data.json | 2 ++ web/src/locales/ko/data.json | 2 ++ web/src/locales/ms/data.json | 2 ++ web/src/locales/nl/data.json | 2 ++ web/src/locales/pl/data.json | 2 ++ web/src/locales/pt/data.json | 2 ++ web/src/locales/ru/data.json | 2 ++ web/src/locales/sk/data.json | 2 ++ web/src/locales/sv/data.json | 2 ++ web/src/locales/tr/data.json | 2 ++ web/src/locales/uk/data.json | 2 ++ web/src/locales/vi/data.json | 2 ++ web/src/locales/zh/data.json | 2 ++ 26 files changed, 53 insertions(+), 2 deletions(-) diff --git a/web/src/CasbinEditor.js b/web/src/CasbinEditor.js index cfcb0c88..d95357c9 100644 --- a/web/src/CasbinEditor.js +++ b/web/src/CasbinEditor.js @@ -19,6 +19,7 @@ import "codemirror/mode/properties/properties"; import * as Setting from "./Setting"; import IframeEditor from "./IframeEditor"; import {Tabs} from "antd"; +import i18next from "i18next"; const {TabPane} = Tabs; @@ -68,8 +69,8 @@ const CasbinEditor = ({model, onModelTextChange}) => { return (
- - + +
{activeKey === "advanced" ? ( diff --git a/web/src/locales/ar/data.json b/web/src/locales/ar/data.json index 72f28348..fbf9cb4e 100644 --- a/web/src/locales/ar/data.json +++ b/web/src/locales/ar/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Advanced Editor", + "Basic Editor": "Basic Editor", "Edit Model": "Edit Model", "Model text": "Model text", "Model text - Tooltip": "Casbin access control model, including built-in models like ACL, RBAC, ABAC, RESTful, etc. You can also create custom models. For more information, please visit the Casbin website", diff --git a/web/src/locales/cs/data.json b/web/src/locales/cs/data.json index 118032ab..cb9e363e 100644 --- a/web/src/locales/cs/data.json +++ b/web/src/locales/cs/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Pokročilý editor", + "Basic Editor": "Základní editor", "Edit Model": "Upravit model", "Model text": "Text modelu", "Model text - Tooltip": "Casbin model řízení přístupu, včetně vestavěných modelů jako ACL, RBAC, ABAC, RESTful, atd. Můžete také vytvářet vlastní modely. Pro více informací navštivte webové stránky Casbin", diff --git a/web/src/locales/de/data.json b/web/src/locales/de/data.json index 274b2f07..73cd636a 100644 --- a/web/src/locales/de/data.json +++ b/web/src/locales/de/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Erweiterter Editor", + "Basic Editor": "Basis-Editor", "Edit Model": "Modell bearbeiten", "Model text": "Modelltext", "Model text - Tooltip": "Casbin Zugriffskontrollmodell inklusive integrierter Modelle wie ACL, RBAC, ABAC, RESTful, usw. Sie können auch benutzerdefinierte Modelle erstellen. Weitere Informationen finden Sie auf der Casbin-Website", diff --git a/web/src/locales/en/data.json b/web/src/locales/en/data.json index 63563a1a..e17b5fb0 100644 --- a/web/src/locales/en/data.json +++ b/web/src/locales/en/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Advanced Editor", + "Basic Editor": "Basic Editor", "Edit Model": "Edit Model", "Model text": "Model text", "Model text - Tooltip": "Casbin access control model, including built-in models like ACL, RBAC, ABAC, RESTful, etc. You can also create custom models. For more information, please visit the Casbin website", diff --git a/web/src/locales/es/data.json b/web/src/locales/es/data.json index 12caff19..9ee89462 100644 --- a/web/src/locales/es/data.json +++ b/web/src/locales/es/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Editor avanzado", + "Basic Editor": "Editor básico", "Edit Model": "Editar modelo", "Model text": "Texto modelo", "Model text - Tooltip": "Modelo de control de acceso Casbin, incluyendo modelos integrados como ACL, RBAC, ABAC, RESTful, etc. También puede crear modelos personalizados. Para obtener más información, visite el sitio web de Casbin", diff --git a/web/src/locales/fa/data.json b/web/src/locales/fa/data.json index 8226f616..b92ada06 100644 --- a/web/src/locales/fa/data.json +++ b/web/src/locales/fa/data.json @@ -592,6 +592,8 @@ "Secret Key": "کلید مخفی" }, "model": { + "Advanced Editor": "ویرایشگر پیشرفته", + "Basic Editor": "ویرایشگر ابتدایی", "Edit Model": "ویرایش مدل", "Model text": "متن مدل", "Model text - Tooltip": "مدل کنترل دسترسی Casbin، شامل مدل‌های داخلی مانند ACL، RBAC، ABAC، RESTful و غیره. همچنین می‌توانید مدل‌های سفارشی ایجاد کنید. برای اطلاعات بیشتر، لطفاً به وب‌سایت Casbin مراجعه کنید", diff --git a/web/src/locales/fi/data.json b/web/src/locales/fi/data.json index ff448105..f1728b77 100644 --- a/web/src/locales/fi/data.json +++ b/web/src/locales/fi/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Advanced Editor", + "Basic Editor": "Basic Editor", "Edit Model": "Edit Model", "Model text": "Model text", "Model text - Tooltip": "Casbin access control model, including built-in models like ACL, RBAC, ABAC, RESTful, etc. You can also create custom models. For more information, please visit the Casbin website", diff --git a/web/src/locales/fr/data.json b/web/src/locales/fr/data.json index 55d968c9..3c134e33 100644 --- a/web/src/locales/fr/data.json +++ b/web/src/locales/fr/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Éditeur avancé", + "Basic Editor": "Éditeur de base", "Edit Model": "Modifier le modèle", "Model text": "Définition du modèle", "Model text - Tooltip": "Modèle de contrôle d'accès Casbin, comprenant des modèles intégrés tels que ACL, RBAC, ABAC, RESTful, etc. Vous pouvez également créer des modèles personnalisés. Pour plus d'informations, veuillez visiter le site web de Casbin", diff --git a/web/src/locales/he/data.json b/web/src/locales/he/data.json index ff448105..f1728b77 100644 --- a/web/src/locales/he/data.json +++ b/web/src/locales/he/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Advanced Editor", + "Basic Editor": "Basic Editor", "Edit Model": "Edit Model", "Model text": "Model text", "Model text - Tooltip": "Casbin access control model, including built-in models like ACL, RBAC, ABAC, RESTful, etc. You can also create custom models. For more information, please visit the Casbin website", diff --git a/web/src/locales/id/data.json b/web/src/locales/id/data.json index 0ebdc203..0cf859d0 100644 --- a/web/src/locales/id/data.json +++ b/web/src/locales/id/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Editor lanjutan", + "Basic Editor": "Editor dasar", "Edit Model": "Mengedit Model", "Model text": "Teks Model", "Model text - Tooltip": "Model kontrol akses Casbin, termasuk model bawaan seperti ACL, RBAC, ABAC, RESTful, dll. Anda juga dapat membuat model kustom. Untuk informasi lebih lanjut, silakan kunjungi situs web Casbin", diff --git a/web/src/locales/it/data.json b/web/src/locales/it/data.json index 5a1eeb2a..a16fa734 100644 --- a/web/src/locales/it/data.json +++ b/web/src/locales/it/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Advanced Editor", + "Basic Editor": "Basic Editor", "Edit Model": "Edit Model", "Model text": "Model text", "Model text - Tooltip": "Casbin access control model, including built-in models like ACL, RBAC, ABAC, RESTful, etc. You can also create custom models. For more information, please visit the Casbin website", diff --git a/web/src/locales/ja/data.json b/web/src/locales/ja/data.json index 6e60372b..8a7fa49d 100644 --- a/web/src/locales/ja/data.json +++ b/web/src/locales/ja/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Advanced Editor", + "Basic Editor": "Basic Editor", "Edit Model": "編集モデル", "Model text": "モデルテキスト", "Model text - Tooltip": "Casbinのアクセス制御モデルには、ACL、RBAC、ABAC、RESTfulなどの組み込みモデルが含まれています。カスタムモデルも作成できます。詳細については、Casbinのウェブサイトをご覧ください", diff --git a/web/src/locales/kk/data.json b/web/src/locales/kk/data.json index ff448105..f1728b77 100644 --- a/web/src/locales/kk/data.json +++ b/web/src/locales/kk/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Advanced Editor", + "Basic Editor": "Basic Editor", "Edit Model": "Edit Model", "Model text": "Model text", "Model text - Tooltip": "Casbin access control model, including built-in models like ACL, RBAC, ABAC, RESTful, etc. You can also create custom models. For more information, please visit the Casbin website", diff --git a/web/src/locales/ko/data.json b/web/src/locales/ko/data.json index 60dbdd46..8bbb3edf 100644 --- a/web/src/locales/ko/data.json +++ b/web/src/locales/ko/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "고급 편집기", + "Basic Editor": "기본 편집기", "Edit Model": "편집 형태 모델", "Model text": "모델 텍스트", "Model text - Tooltip": "Casbin 액세스 제어 모델은 ACL, RBAC, ABAC, RESTful 등의 내장된 모델을 포함하며 사용자 정의 모델도 만들 수 있습니다. 자세한 정보는 Casbin 웹 사이트를 방문하십시오", diff --git a/web/src/locales/ms/data.json b/web/src/locales/ms/data.json index ff448105..f1728b77 100644 --- a/web/src/locales/ms/data.json +++ b/web/src/locales/ms/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Advanced Editor", + "Basic Editor": "Basic Editor", "Edit Model": "Edit Model", "Model text": "Model text", "Model text - Tooltip": "Casbin access control model, including built-in models like ACL, RBAC, ABAC, RESTful, etc. You can also create custom models. For more information, please visit the Casbin website", diff --git a/web/src/locales/nl/data.json b/web/src/locales/nl/data.json index ff448105..f1728b77 100644 --- a/web/src/locales/nl/data.json +++ b/web/src/locales/nl/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Advanced Editor", + "Basic Editor": "Basic Editor", "Edit Model": "Edit Model", "Model text": "Model text", "Model text - Tooltip": "Casbin access control model, including built-in models like ACL, RBAC, ABAC, RESTful, etc. You can also create custom models. For more information, please visit the Casbin website", diff --git a/web/src/locales/pl/data.json b/web/src/locales/pl/data.json index ff448105..f1728b77 100644 --- a/web/src/locales/pl/data.json +++ b/web/src/locales/pl/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Advanced Editor", + "Basic Editor": "Basic Editor", "Edit Model": "Edit Model", "Model text": "Model text", "Model text - Tooltip": "Casbin access control model, including built-in models like ACL, RBAC, ABAC, RESTful, etc. You can also create custom models. For more information, please visit the Casbin website", diff --git a/web/src/locales/pt/data.json b/web/src/locales/pt/data.json index 68a4811d..41b8bdee 100644 --- a/web/src/locales/pt/data.json +++ b/web/src/locales/pt/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Editor Avançado", + "Basic Editor": "Editor Básico", "Edit Model": "Editar Modelo", "Model text": "Texto do Modelo", "Model text - Tooltip": "Modelo de controle de acesso Casbin, incluindo modelos incorporados como ACL, RBAC, ABAC, RESTful, etc. Você também pode criar modelos personalizados. Para obter mais informações, visite o site do Casbin", diff --git a/web/src/locales/ru/data.json b/web/src/locales/ru/data.json index e789e90a..cacd93e0 100644 --- a/web/src/locales/ru/data.json +++ b/web/src/locales/ru/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Расширенный редактор", + "Basic Editor": "Базовый редактор", "Edit Model": "Редактировать модель", "Model text": "Модельный текст", "Model text - Tooltip": "Модель контроля доступа Casbin, включая встроенные модели, такие как ACL, RBAC, ABAC, RESTful и т. д. Вы также можете создавать свои собственные модели. Для получения дополнительной информации, пожалуйста, посетите веб-сайт Casbin", diff --git a/web/src/locales/sk/data.json b/web/src/locales/sk/data.json index 5ff00643..3fc253db 100644 --- a/web/src/locales/sk/data.json +++ b/web/src/locales/sk/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Rozšírený editor", + "Basic Editor": "Základný editor", "Edit Model": "Upraviť model", "Model text": "Text modelu", "Model text - Tooltip": "Model prístupu Casbin, vrátane vstavaných modelov ako ACL, RBAC, ABAC, RESTful, atď. Môžete tiež vytvoriť vlastné modely. Pre viac informácií navštívte web Casbin", diff --git a/web/src/locales/sv/data.json b/web/src/locales/sv/data.json index ff448105..f1728b77 100644 --- a/web/src/locales/sv/data.json +++ b/web/src/locales/sv/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Advanced Editor", + "Basic Editor": "Basic Editor", "Edit Model": "Edit Model", "Model text": "Model text", "Model text - Tooltip": "Casbin access control model, including built-in models like ACL, RBAC, ABAC, RESTful, etc. You can also create custom models. For more information, please visit the Casbin website", diff --git a/web/src/locales/tr/data.json b/web/src/locales/tr/data.json index 86b4c7b7..3f773f65 100644 --- a/web/src/locales/tr/data.json +++ b/web/src/locales/tr/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Advanced Editor", + "Basic Editor": "Basic Editor", "Edit Model": "Modeli Düzenle", "Model text": "Model text", "Model text - Tooltip": "Casbin access control model, including built-in models like ACL, RBAC, ABAC, RESTful, etc. You can also create custom models. For more information, please visit the Casbin website", diff --git a/web/src/locales/uk/data.json b/web/src/locales/uk/data.json index b189d6e2..2f0098cf 100644 --- a/web/src/locales/uk/data.json +++ b/web/src/locales/uk/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Розширений редактор", + "Basic Editor": "Базовий редактор", "Edit Model": "Редагувати модель", "Model text": "Текст моделі", "Model text - Tooltip": "Модель контролю доступу Casbin, включаючи такі вбудовані моделі, як ACL, RBAC, ABAC, RESTful тощо. Ви також можете створювати власні моделі. ", diff --git a/web/src/locales/vi/data.json b/web/src/locales/vi/data.json index 01b91a8b..7b65ec03 100644 --- a/web/src/locales/vi/data.json +++ b/web/src/locales/vi/data.json @@ -592,6 +592,8 @@ "Secret Key": "Secret Key" }, "model": { + "Advanced Editor": "Editor nâng cao", + "Basic Editor": "Editor cơ bản", "Edit Model": "Sửa mô hình", "Model text": "Văn bản mẫu", "Model text - Tooltip": "Mô hình kiểm soát truy cập Casbin, bao gồm các mô hình tích hợp như ACL, RBAC, ABAC, RESTful, v.v. Bạn cũng có thể tạo các mô hình tùy chỉnh. Để biết thêm thông tin, vui lòng truy cập trang web Casbin", diff --git a/web/src/locales/zh/data.json b/web/src/locales/zh/data.json index dac19675..e7b4d185 100644 --- a/web/src/locales/zh/data.json +++ b/web/src/locales/zh/data.json @@ -592,6 +592,8 @@ "Secret Key": "密钥" }, "model": { + "Advanced Editor": "高级编辑器", + "Basic Editor": "基础编辑器", "Edit Model": "编辑模型", "Model text": "模型文本", "Model text - Tooltip": "Casbin访问控制模型,支持ACL、RBAC、ABAC、RESTful等内置模型,也可以自定义模型,具体请查看Casbin官网",