From c8341b3e25edb130840d419d9801ad1ac9b8be8f Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 15 Dec 2025 10:45:18 +0800 Subject: [PATCH] perf: Internationalization of xpack-related APIs --- backend/apps/swagger/i18n.py | 8 ++++++++ backend/apps/swagger/locales/en.json | 8 ++++++++ backend/apps/swagger/locales/zh.json | 8 ++++++++ backend/apps/system/api/parameter.py | 2 +- 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/backend/apps/swagger/i18n.py b/backend/apps/swagger/i18n.py index bd7b843d..05e9a58e 100644 --- a/backend/apps/swagger/i18n.py +++ b/backend/apps/swagger/i18n.py @@ -62,6 +62,14 @@ def load_translation(lang: str) -> Dict[str, str]: "name": "system_assistant", "description": f"{PLACEHOLDER_PREFIX}system_assistant_api" }, + { + "name": "system_embedded", + "description": f"{PLACEHOLDER_PREFIX}system_embedded_api" + }, + { + "name": "system_authentication", + "description": f"{PLACEHOLDER_PREFIX}system_authentication_api" + }, { "name": "Table Relation", "description": f"{PLACEHOLDER_PREFIX}tr_api" }, diff --git a/backend/apps/swagger/locales/en.json b/backend/apps/swagger/locales/en.json index da2dfe49..8ea0dad8 100644 --- a/backend/apps/swagger/locales/en.json +++ b/backend/apps/swagger/locales/en.json @@ -101,6 +101,14 @@ "assistant_type": "Assistant Type (0: Basic, 1: Advanced, 4: Page)", "assistant_configuration": "Configuration", "assistant_description": "Description", + + "system_embedded_api": "Page Embedded API", + "embedded_resetsecret_api": "Reset Secret", + + "system_authentication_api": "Authentication Settings API", + "authentication_enable_api": "Enable Authentication", + "authentication_status_api": "Get Authentication Status", + "authentication_validate_api": "Validate Authentication", "per_api": "Data Permission", "per_save": "Save Permission", diff --git a/backend/apps/swagger/locales/zh.json b/backend/apps/swagger/locales/zh.json index 5f007836..f215dcf0 100644 --- a/backend/apps/swagger/locales/zh.json +++ b/backend/apps/swagger/locales/zh.json @@ -102,6 +102,14 @@ "assistant_configuration": "配置", "assistant_description": "描述", + "system_embedded_api": "页面嵌入式api", + "embedded_resetsecret_api": "重置 Secret", + + "system_authentication_api": "认证设置api", + "authentication_enable_api": "设置开启", + "authentication_status_api": "查询状态", + "authentication_validate_api": "校验状态", + "per_api": "数据权限", "per_save": "保存权限", "per_delete": "删除权限", diff --git a/backend/apps/system/api/parameter.py b/backend/apps/system/api/parameter.py index 89a5cf4d..fce8bd46 100644 --- a/backend/apps/system/api/parameter.py +++ b/backend/apps/system/api/parameter.py @@ -7,7 +7,7 @@ from apps.system.schemas.permission import SqlbotPermission, require_permissions from common.core.deps import SessionDep -router = APIRouter(tags=["system/parameter"], prefix="/system/parameter") +router = APIRouter(tags=["system/parameter"], prefix="/system/parameter", include_in_schema=False) @router.get("/login") async def get_login_args(session: SessionDep) -> list[SysArgModel]: