From 87a24991f1007aa4e52b3544eb765fe001d2bda9 Mon Sep 17 00:00:00 2001 From: feng <1304903146@qq.com> Date: Tue, 12 Dec 2023 15:34:13 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/locale/ja/LC_MESSAGES/django.mo | 4 +-- apps/locale/ja/LC_MESSAGES/django.po | 44 ++++++++++++++++----------- apps/locale/zh/LC_MESSAGES/django.mo | 4 +-- apps/locale/zh/LC_MESSAGES/django.po | 45 +++++++++++++++++----------- apps/settings/serializers/feature.py | 2 +- 5 files changed, 59 insertions(+), 40 deletions(-) diff --git a/apps/locale/ja/LC_MESSAGES/django.mo b/apps/locale/ja/LC_MESSAGES/django.mo index 5e4c9d63f..5d7d6a0b8 100644 --- a/apps/locale/ja/LC_MESSAGES/django.mo +++ b/apps/locale/ja/LC_MESSAGES/django.mo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a00c0d53df7fa88fc2fe69adda31fd9ab581b5a0362a01b8191924f74fab800d -size 167820 +oid sha256:7d9296340c0815fcda81bc7370051b1408225ba63ab7067b397595d4dfb334f7 +size 167881 diff --git a/apps/locale/ja/LC_MESSAGES/django.po b/apps/locale/ja/LC_MESSAGES/django.po index 8dad75a93..8b5d5fb62 100644 --- a/apps/locale/ja/LC_MESSAGES/django.po +++ b/apps/locale/ja/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-11 14:54+0800\n" +"POT-Creation-Date: 2023-12-12 15:26+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -606,7 +606,7 @@ msgstr "パスワードルール" #: perms/models/asset_permission.py:61 rbac/models/role.py:29 #: settings/models.py:32 settings/serializers/msg.py:82 #: terminal/models/applet/applet.py:33 terminal/models/component/endpoint.py:12 -#: terminal/models/component/endpoint.py:94 +#: terminal/models/component/endpoint.py:95 #: terminal/models/component/storage.py:26 terminal/models/component/task.py:13 #: terminal/models/component/terminal.py:84 #: terminal/models/virtualapp/provider.py:10 @@ -627,7 +627,7 @@ msgstr "特権アカウント" #: assets/models/label.py:22 #: authentication/serializers/connect_token_secret.py:117 #: terminal/models/applet/applet.py:40 -#: terminal/models/component/endpoint.py:105 +#: terminal/models/component/endpoint.py:106 #: terminal/models/virtualapp/virtualapp.py:23 users/serializers/user.py:167 msgid "Is active" msgstr "アクティブです。" @@ -924,8 +924,8 @@ msgstr "关联平台,可以配置推送参数,如果不关联,则使用默 #: ops/models/job.py:157 ops/models/playbook.py:32 rbac/models/role.py:37 #: settings/models.py:37 terminal/models/applet/applet.py:45 #: terminal/models/applet/applet.py:321 terminal/models/applet/host.py:143 -#: terminal/models/component/endpoint.py:24 -#: terminal/models/component/endpoint.py:104 +#: terminal/models/component/endpoint.py:25 +#: terminal/models/component/endpoint.py:105 #: terminal/models/session/session.py:46 #: terminal/models/virtualapp/virtualapp.py:28 tickets/models/comment.py:32 #: tickets/models/ticket/general.py:297 users/models/user.py:834 @@ -978,7 +978,7 @@ msgstr "自動タスク実行履歴" #: accounts/serializers/automations/change_secret.py:149 audits/const.py:61 #: audits/models.py:64 audits/signal_handlers/activity_log.py:33 -#: common/const/choices.py:18 ops/const.py:73 ops/serializers/celery.py:40 +#: common/const/choices.py:18 ops/const.py:73 ops/serializers/celery.py:46 #: terminal/const.py:78 terminal/models/session/sharing.py:121 #: tickets/views/approve.py:117 msgid "Success" @@ -1081,13 +1081,13 @@ msgid "Notifications" msgstr "通知" #: acls/models/base.py:37 assets/models/_user.py:51 -#: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:97 +#: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:98 #: xpack/plugins/cloud/models.py:275 msgid "Priority" msgstr "優先順位" #: acls/models/base.py:38 assets/models/_user.py:51 -#: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:98 +#: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:99 #: xpack/plugins/cloud/models.py:276 msgid "1-100, the lower the value will be match first" msgstr "1-100、低い値は最初に一致します" @@ -3060,7 +3060,7 @@ msgid "Please change your password" msgstr "パスワードを変更してください" #: authentication/models/access_key.py:22 -#: terminal/models/component/endpoint.py:95 +#: terminal/models/component/endpoint.py:96 msgid "IP group" msgstr "IP グループ" @@ -4039,19 +4039,19 @@ msgstr "Ansible 無効" msgid "Skip hosts below:" msgstr "次のホストをスキップします: " -#: ops/api/celery.py:64 ops/api/celery.py:79 +#: ops/api/celery.py:65 ops/api/celery.py:80 msgid "Waiting task start" msgstr "タスク開始待ち" -#: ops/api/celery.py:162 +#: ops/api/celery.py:203 msgid "Task {} not found" msgstr "タスクは存在しません" -#: ops/api/celery.py:167 +#: ops/api/celery.py:208 msgid "Task {} args or kwargs error" msgstr "タスク実行パラメータエラー" -#: ops/api/job.py:128 +#: ops/api/job.py:124 msgid "Duplicate file exists" msgstr "重複したファイルが存在する" @@ -5493,7 +5493,7 @@ msgstr "発表" msgid "Enable announcement" msgstr "アナウンスの有効化" -#: settings/serializers/feature.py:46 settings/serializers/feature.py:64 +#: settings/serializers/feature.py:46 msgid "Enable Vault" msgstr "有効化 Vault" @@ -5505,6 +5505,10 @@ msgstr "マウントポイント" msgid "Chat AI" msgstr "チャットAI" +#: settings/serializers/feature.py:64 +msgid "Enable Chat AI" +msgstr "チャットAIを起動する" + #: settings/serializers/feature.py:67 msgid "Base Url" msgstr "基本的なUrl" @@ -6622,15 +6626,21 @@ msgstr "PostgreSQL ポート" msgid "Redis port" msgstr "Redis ポート" -#: terminal/models/component/endpoint.py:29 -#: terminal/models/component/endpoint.py:102 +#: terminal/models/component/endpoint.py:23 +#, fuzzy +#| msgid "SQLServer" +msgid "SQLServer port" +msgstr "SQLServer" + +#: terminal/models/component/endpoint.py:30 +#: terminal/models/component/endpoint.py:103 #: terminal/serializers/endpoint.py:73 terminal/serializers/storage.py:41 #: terminal/serializers/storage.py:53 terminal/serializers/storage.py:83 #: terminal/serializers/storage.py:93 terminal/serializers/storage.py:101 msgid "Endpoint" msgstr "エンドポイント" -#: terminal/models/component/endpoint.py:108 +#: terminal/models/component/endpoint.py:109 msgid "Endpoint rule" msgstr "エンドポイントルール" diff --git a/apps/locale/zh/LC_MESSAGES/django.mo b/apps/locale/zh/LC_MESSAGES/django.mo index 16c60122c..8f6f29a95 100644 --- a/apps/locale/zh/LC_MESSAGES/django.mo +++ b/apps/locale/zh/LC_MESSAGES/django.mo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d4a9a61bf1b247d3843001737ebfa6d5f8580f2d9c1ae0fc76649ecc535f5d96 -size 137563 +oid sha256:37662b3fc6df22480304d2a5f90cf156ba7d4e0249ec11076e5018daab545714 +size 137610 diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po index 29b3e9c50..65b65073a 100644 --- a/apps/locale/zh/LC_MESSAGES/django.po +++ b/apps/locale/zh/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: JumpServer 0.3.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-11 14:54+0800\n" +"POT-Creation-Date: 2023-12-12 15:24+0800\n" "PO-Revision-Date: 2021-05-20 10:54+0800\n" "Last-Translator: ibuler \n" "Language-Team: JumpServer team\n" @@ -605,7 +605,7 @@ msgstr "密码规则" #: perms/models/asset_permission.py:61 rbac/models/role.py:29 #: settings/models.py:32 settings/serializers/msg.py:82 #: terminal/models/applet/applet.py:33 terminal/models/component/endpoint.py:12 -#: terminal/models/component/endpoint.py:94 +#: terminal/models/component/endpoint.py:95 #: terminal/models/component/storage.py:26 terminal/models/component/task.py:13 #: terminal/models/component/terminal.py:84 #: terminal/models/virtualapp/provider.py:10 @@ -626,7 +626,7 @@ msgstr "特权账号" #: assets/models/label.py:22 #: authentication/serializers/connect_token_secret.py:117 #: terminal/models/applet/applet.py:40 -#: terminal/models/component/endpoint.py:105 +#: terminal/models/component/endpoint.py:106 #: terminal/models/virtualapp/virtualapp.py:23 users/serializers/user.py:167 msgid "Is active" msgstr "激活" @@ -922,8 +922,8 @@ msgstr "关联平台,可配置推送参数,如果不关联,将使用默认 #: ops/models/job.py:157 ops/models/playbook.py:32 rbac/models/role.py:37 #: settings/models.py:37 terminal/models/applet/applet.py:45 #: terminal/models/applet/applet.py:321 terminal/models/applet/host.py:143 -#: terminal/models/component/endpoint.py:24 -#: terminal/models/component/endpoint.py:104 +#: terminal/models/component/endpoint.py:25 +#: terminal/models/component/endpoint.py:105 #: terminal/models/session/session.py:46 #: terminal/models/virtualapp/virtualapp.py:28 tickets/models/comment.py:32 #: tickets/models/ticket/general.py:297 users/models/user.py:834 @@ -975,7 +975,7 @@ msgstr "自动化任务执行历史" #: accounts/serializers/automations/change_secret.py:149 audits/const.py:61 #: audits/models.py:64 audits/signal_handlers/activity_log.py:33 -#: common/const/choices.py:18 ops/const.py:73 ops/serializers/celery.py:40 +#: common/const/choices.py:18 ops/const.py:73 ops/serializers/celery.py:46 #: terminal/const.py:78 terminal/models/session/sharing.py:121 #: tickets/views/approve.py:117 msgid "Success" @@ -1078,13 +1078,13 @@ msgid "Notifications" msgstr "通知" #: acls/models/base.py:37 assets/models/_user.py:51 -#: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:97 +#: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:98 #: xpack/plugins/cloud/models.py:275 msgid "Priority" msgstr "优先级" #: acls/models/base.py:38 assets/models/_user.py:51 -#: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:98 +#: assets/models/cmd_filter.py:76 terminal/models/component/endpoint.py:99 #: xpack/plugins/cloud/models.py:276 msgid "1-100, the lower the value will be match first" msgstr "优先级可选范围为 1-100 (数值越小越优先)" @@ -3029,7 +3029,7 @@ msgid "Please change your password" msgstr "请修改密码" #: authentication/models/access_key.py:22 -#: terminal/models/component/endpoint.py:95 +#: terminal/models/component/endpoint.py:96 msgid "IP group" msgstr "IPグループ" @@ -3991,19 +3991,19 @@ msgstr "Ansible 已禁用" msgid "Skip hosts below:" msgstr "跳过以下主机: " -#: ops/api/celery.py:64 ops/api/celery.py:79 +#: ops/api/celery.py:65 ops/api/celery.py:80 msgid "Waiting task start" msgstr "等待任务开始" -#: ops/api/celery.py:162 +#: ops/api/celery.py:203 msgid "Task {} not found" msgstr "任务 {} 不存在" -#: ops/api/celery.py:167 +#: ops/api/celery.py:208 msgid "Task {} args or kwargs error" msgstr "任务 {} 执行参数错误" -#: ops/api/job.py:128 +#: ops/api/job.py:124 msgid "Duplicate file exists" msgstr "存在同名文件" @@ -5435,7 +5435,7 @@ msgstr "公告" msgid "Enable announcement" msgstr "启用公告" -#: settings/serializers/feature.py:46 settings/serializers/feature.py:64 +#: settings/serializers/feature.py:46 msgid "Enable Vault" msgstr "启用 Vault" @@ -5447,6 +5447,10 @@ msgstr "挂在点" msgid "Chat AI" msgstr "聊天 AI" +#: settings/serializers/feature.py:64 +msgid "Enable Chat AI" +msgstr "启动聊天 AI" + #: settings/serializers/feature.py:67 msgid "Base Url" msgstr "基本地址" @@ -6530,15 +6534,21 @@ msgstr "PostgreSQL 端口" msgid "Redis port" msgstr "Redis 端口" -#: terminal/models/component/endpoint.py:29 -#: terminal/models/component/endpoint.py:102 +#: terminal/models/component/endpoint.py:23 +#, fuzzy +#| msgid "SQLServer" +msgid "SQLServer port" +msgstr "SQLServer" + +#: terminal/models/component/endpoint.py:30 +#: terminal/models/component/endpoint.py:103 #: terminal/serializers/endpoint.py:73 terminal/serializers/storage.py:41 #: terminal/serializers/storage.py:53 terminal/serializers/storage.py:83 #: terminal/serializers/storage.py:93 terminal/serializers/storage.py:101 msgid "Endpoint" msgstr "端点" -#: terminal/models/component/endpoint.py:108 +#: terminal/models/component/endpoint.py:109 msgid "Endpoint rule" msgstr "端点规则" @@ -8796,7 +8806,6 @@ msgstr "企业专业版" msgid "Ultimate edition" msgstr "企业旗舰版" - #~ msgid "FeiShu query user failed" #~ msgstr "飞书查询用户失败" diff --git a/apps/settings/serializers/feature.py b/apps/settings/serializers/feature.py index c301585ff..1235b29b7 100644 --- a/apps/settings/serializers/feature.py +++ b/apps/settings/serializers/feature.py @@ -61,7 +61,7 @@ class ChatAISettingSerializer(serializers.Serializer): GPT_MODEL_CHOICES = [] CHAT_AI_ENABLED = serializers.BooleanField( - required=False, label=_('Enable Vault') + required=False, label=_('Enable Chat AI') ) GPT_BASE_URL = serializers.CharField( max_length=256, allow_blank=True, required=False, label=_('Base Url')