Skip to content

Commit

Permalink
feat: add localized tab titles for Basic and Advanced Editors (casdoo…
Browse files Browse the repository at this point in the history
…r#3431)

* feat: add localized tab titles for Basic and Advanced Editors

* docs: update translations for model editor labels in multiple locales
  • Loading branch information
HashCookie authored Dec 16, 2024
1 parent f9a6efc commit b0e318c
Show file tree
Hide file tree
Showing 26 changed files with 53 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web/src/CasbinEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -68,8 +69,8 @@ const CasbinEditor = ({model, onModelTextChange}) => {
return (
<div style={{height: "100%", width: "100%", display: "flex", flexDirection: "column"}}>
<Tabs activeKey={activeKey} onChange={handleTabChange} style={{flex: "0 0 auto", marginTop: "-10px"}}>
<TabPane tab="Basic Editor" key="basic" />
<TabPane tab="Advanced Editor" key="advanced" />
<TabPane tab={i18next.t("model:Basic Editor")} key="basic" />
<TabPane tab={i18next.t("model:Advanced Editor")} key="advanced" />
</Tabs>
<div style={{flex: "1 1 auto", overflow: "hidden"}}>
{activeKey === "advanced" ? (
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/ar/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/cs/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/de/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/en/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/es/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/fa/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,8 @@
"Secret Key": "کلید مخفی"
},
"model": {
"Advanced Editor": "ویرایشگر پیشرفته",
"Basic Editor": "ویرایشگر ابتدایی",
"Edit Model": "ویرایش مدل",
"Model text": "متن مدل",
"Model text - Tooltip": "مدل کنترل دسترسی Casbin، شامل مدل‌های داخلی مانند ACL، RBAC، ABAC، RESTful و غیره. همچنین می‌توانید مدل‌های سفارشی ایجاد کنید. برای اطلاعات بیشتر، لطفاً به وب‌سایت Casbin مراجعه کنید",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/fi/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/fr/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/he/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/id/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/it/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/ja/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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のウェブサイトをご覧ください",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/kk/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/ko/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 웹 사이트를 방문하십시오",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/ms/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/nl/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/pl/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/pt/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/ru/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/sk/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/sv/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/tr/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/uk/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 тощо. Ви також можете створювати власні моделі. ",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/vi/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/zh/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,8 @@
"Secret Key": "密钥"
},
"model": {
"Advanced Editor": "高级编辑器",
"Basic Editor": "基础编辑器",
"Edit Model": "编辑模型",
"Model text": "模型文本",
"Model text - Tooltip": "Casbin访问控制模型,支持ACL、RBAC、ABAC、RESTful等内置模型,也可以自定义模型,具体请查看Casbin官网",
Expand Down

0 comments on commit b0e318c

Please sign in to comment.