perf: Translate (#13620)

Co-authored-by: feng <1304903146@qq.com>
pull/13624/head
fit2bot 2024-07-05 18:09:39 +08:00 committed by GitHub
parent 8a3fb6bd4d
commit 57d689bee6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 85 additions and 61 deletions

View File

@ -226,6 +226,9 @@ class ChangeSecretManager(AccountBasePlaybookManager):
def run(self, *args, **kwargs):
if self.secret_type and not self.check_secret():
self.execution.status = 'success'
self.execution.date_finished = timezone.now()
self.execution.save()
return
super().run(*args, **kwargs)
recorders = list(self.name_recorder_mapper.values())

View File

@ -36,6 +36,7 @@ class BaseAutomationSerializer(PeriodTaskSerializerMixin, BulkOrgResourceModelSe
class AutomationExecutionSerializer(serializers.ModelSerializer):
snapshot = serializers.SerializerMethodField(label=_('Automation snapshot'))
status = serializers.SerializerMethodField(label=_("Status"))
trigger = LabeledChoiceField(choices=Trigger.choices, read_only=True, label=_("Trigger mode"))
class Meta:
@ -45,6 +46,14 @@ class AutomationExecutionSerializer(serializers.ModelSerializer):
]
fields = ['id', 'automation'] + read_only_fields
@staticmethod
def get_status(obj):
if obj.status == 'success':
return _("Success")
elif obj.status == 'pending':
return _("Pending")
return obj.status
@staticmethod
def get_snapshot(obj):
from assets.const import AutomationTypes as AssetTypes

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-07-05 16:34+0800\n"
"POT-Creation-Date: 2024-07-05 18:00+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -64,7 +64,8 @@ msgstr ""
#: accounts/automations/backup_account/handlers.py:219
#: accounts/const/automation.py:110
#: accounts/serializers/automations/change_secret.py:166 audits/const.py:64
#: accounts/serializers/automations/change_secret.py:166
#: assets/serializers/automations/base.py:52 audits/const.py:64
#: audits/models.py:64 audits/signal_handlers/activity_log.py:33
#: common/const/choices.py:18 ops/const.py:74 ops/serializers/celery.py:48
#: terminal/const.py:78 terminal/models/session/sharing.py:121
@ -303,8 +304,9 @@ msgstr ""
msgid "SFTP"
msgstr ""
#: accounts/const/automation.py:111 common/const/choices.py:16
#: terminal/const.py:77 tickets/const.py:29 tickets/const.py:38
#: accounts/const/automation.py:111 assets/serializers/automations/base.py:54
#: common/const/choices.py:16 terminal/const.py:77 tickets/const.py:29
#: tickets/const.py:38
msgid "Pending"
msgstr ""
@ -482,7 +484,7 @@ msgstr ""
#: accounts/serializers/account/backup.py:48
#: accounts/serializers/automations/base.py:56
#: assets/models/automations/base.py:122
#: assets/serializers/automations/base.py:39
#: assets/serializers/automations/base.py:40
msgid "Trigger mode"
msgstr ""
@ -575,7 +577,8 @@ msgid "Date finished"
msgstr ""
#: accounts/models/automations/change_secret.py:44
#: assets/models/automations/base.py:113 audits/models.py:208
#: assets/models/automations/base.py:113
#: assets/serializers/automations/base.py:39 audits/models.py:208
#: audits/serializers.py:54 ops/models/base.py:49 ops/models/job.py:234
#: terminal/models/applet/applet.py:320 terminal/models/applet/host.py:140
#: terminal/models/component/status.py:30
@ -707,9 +710,9 @@ msgstr ""
#: ops/models/celery.py:80 ops/models/job.py:142 ops/models/playbook.py:28
#: ops/serializers/job.py:18 orgs/models.py:82
#: perms/models/asset_permission.py:61 rbac/models/role.py:29
#: settings/models.py:34 settings/models.py:183 settings/serializers/msg.py:86
#: settings/serializers/terminal.py:9 terminal/models/applet/applet.py:33
#: terminal/models/component/endpoint.py:12
#: rbac/serializers/role.py:28 settings/models.py:34 settings/models.py:183
#: settings/serializers/msg.py:86 settings/serializers/terminal.py:9
#: terminal/models/applet/applet.py:33 terminal/models/component/endpoint.py:12
#: terminal/models/component/endpoint.py:109
#: terminal/models/component/storage.py:26 terminal/models/component/task.py:13
#: terminal/models/component/terminal.py:85
@ -4966,11 +4969,6 @@ msgstr ""
msgid "Perms"
msgstr ""
#: rbac/serializers/role.py:28 terminal/models/applet/applet.py:34
#: terminal/models/virtualapp/virtualapp.py:20
msgid "Display name"
msgstr ""
#: rbac/serializers/rolebinding.py:60
msgid "Has bound this role"
msgstr ""
@ -6853,6 +6851,11 @@ msgstr ""
msgid "Enterprise"
msgstr ""
#: terminal/models/applet/applet.py:34
#: terminal/models/virtualapp/virtualapp.py:20
msgid "Display name"
msgstr ""
#: terminal/models/applet/applet.py:36
#: terminal/models/virtualapp/virtualapp.py:22
msgid "Author"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-07-05 16:34+0800\n"
"POT-Creation-Date: 2024-07-05 18:00+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -64,7 +64,8 @@ msgstr "仕上げ"
#: accounts/automations/backup_account/handlers.py:219
#: accounts/const/automation.py:110
#: accounts/serializers/automations/change_secret.py:166 audits/const.py:64
#: accounts/serializers/automations/change_secret.py:166
#: assets/serializers/automations/base.py:52 audits/const.py:64
#: audits/models.py:64 audits/signal_handlers/activity_log.py:33
#: common/const/choices.py:18 ops/const.py:74 ops/serializers/celery.py:48
#: terminal/const.py:78 terminal/models/session/sharing.py:121
@ -303,8 +304,9 @@ msgstr "メール"
msgid "SFTP"
msgstr "SFTP"
#: accounts/const/automation.py:111 common/const/choices.py:16
#: terminal/const.py:77 tickets/const.py:29 tickets/const.py:38
#: accounts/const/automation.py:111 assets/serializers/automations/base.py:54
#: common/const/choices.py:16 terminal/const.py:77 tickets/const.py:29
#: tickets/const.py:38
msgid "Pending"
msgstr "未定"
@ -482,7 +484,7 @@ msgstr "アカウントのバックアップスナップショット"
#: accounts/serializers/account/backup.py:48
#: accounts/serializers/automations/base.py:56
#: assets/models/automations/base.py:122
#: assets/serializers/automations/base.py:39
#: assets/serializers/automations/base.py:40
msgid "Trigger mode"
msgstr "トリガーモード"
@ -575,7 +577,8 @@ msgid "Date finished"
msgstr "終了日"
#: accounts/models/automations/change_secret.py:44
#: assets/models/automations/base.py:113 audits/models.py:208
#: assets/models/automations/base.py:113
#: assets/serializers/automations/base.py:39 audits/models.py:208
#: audits/serializers.py:54 ops/models/base.py:49 ops/models/job.py:234
#: terminal/models/applet/applet.py:320 terminal/models/applet/host.py:140
#: terminal/models/component/status.py:30
@ -707,9 +710,9 @@ msgstr "パスワードルール"
#: ops/models/celery.py:80 ops/models/job.py:142 ops/models/playbook.py:28
#: ops/serializers/job.py:18 orgs/models.py:82
#: perms/models/asset_permission.py:61 rbac/models/role.py:29
#: settings/models.py:34 settings/models.py:183 settings/serializers/msg.py:86
#: settings/serializers/terminal.py:9 terminal/models/applet/applet.py:33
#: terminal/models/component/endpoint.py:12
#: rbac/serializers/role.py:28 settings/models.py:34 settings/models.py:183
#: settings/serializers/msg.py:86 settings/serializers/terminal.py:9
#: terminal/models/applet/applet.py:33 terminal/models/component/endpoint.py:12
#: terminal/models/component/endpoint.py:109
#: terminal/models/component/storage.py:26 terminal/models/component/task.py:13
#: terminal/models/component/terminal.py:85
@ -5073,11 +5076,6 @@ msgstr "システムロールバインディング"
msgid "Perms"
msgstr "パーマ"
#: rbac/serializers/role.py:28 terminal/models/applet/applet.py:34
#: terminal/models/virtualapp/virtualapp.py:20
msgid "Display name"
msgstr "表示名"
#: rbac/serializers/rolebinding.py:60
msgid "Has bound this role"
msgstr "この役割をバインドしました"
@ -7097,6 +7095,11 @@ msgstr "コミュニティ版"
msgid "Enterprise"
msgstr "エンタープライズ版"
#: terminal/models/applet/applet.py:34
#: terminal/models/virtualapp/virtualapp.py:20
msgid "Display name"
msgstr "表示名"
#: terminal/models/applet/applet.py:36
#: terminal/models/virtualapp/virtualapp.py:22
msgid "Author"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: JumpServer 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-07-05 16:34+0800\n"
"POT-Creation-Date: 2024-07-05 18:00+0800\n"
"PO-Revision-Date: 2021-05-20 10:54+0800\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: JumpServer team<ibuler@qq.com>\n"
@ -63,7 +63,8 @@ msgstr "完成"
#: accounts/automations/backup_account/handlers.py:219
#: accounts/const/automation.py:110
#: accounts/serializers/automations/change_secret.py:166 audits/const.py:64
#: accounts/serializers/automations/change_secret.py:166
#: assets/serializers/automations/base.py:52 audits/const.py:64
#: audits/models.py:64 audits/signal_handlers/activity_log.py:33
#: common/const/choices.py:18 ops/const.py:74 ops/serializers/celery.py:48
#: terminal/const.py:78 terminal/models/session/sharing.py:121
@ -302,8 +303,9 @@ msgstr "邮箱"
msgid "SFTP"
msgstr "SFTP"
#: accounts/const/automation.py:111 common/const/choices.py:16
#: terminal/const.py:77 tickets/const.py:29 tickets/const.py:38
#: accounts/const/automation.py:111 assets/serializers/automations/base.py:54
#: common/const/choices.py:16 terminal/const.py:77 tickets/const.py:29
#: tickets/const.py:38
msgid "Pending"
msgstr "待定的"
@ -481,7 +483,7 @@ msgstr "账号备份快照"
#: accounts/serializers/account/backup.py:48
#: accounts/serializers/automations/base.py:56
#: assets/models/automations/base.py:122
#: assets/serializers/automations/base.py:39
#: assets/serializers/automations/base.py:40
msgid "Trigger mode"
msgstr "触发模式"
@ -574,7 +576,8 @@ msgid "Date finished"
msgstr "结束日期"
#: accounts/models/automations/change_secret.py:44
#: assets/models/automations/base.py:113 audits/models.py:208
#: assets/models/automations/base.py:113
#: assets/serializers/automations/base.py:39 audits/models.py:208
#: audits/serializers.py:54 ops/models/base.py:49 ops/models/job.py:234
#: terminal/models/applet/applet.py:320 terminal/models/applet/host.py:140
#: terminal/models/component/status.py:30
@ -706,9 +709,9 @@ msgstr "密码规则"
#: ops/models/celery.py:80 ops/models/job.py:142 ops/models/playbook.py:28
#: ops/serializers/job.py:18 orgs/models.py:82
#: perms/models/asset_permission.py:61 rbac/models/role.py:29
#: settings/models.py:34 settings/models.py:183 settings/serializers/msg.py:86
#: settings/serializers/terminal.py:9 terminal/models/applet/applet.py:33
#: terminal/models/component/endpoint.py:12
#: rbac/serializers/role.py:28 settings/models.py:34 settings/models.py:183
#: settings/serializers/msg.py:86 settings/serializers/terminal.py:9
#: terminal/models/applet/applet.py:33 terminal/models/component/endpoint.py:12
#: terminal/models/component/endpoint.py:109
#: terminal/models/component/storage.py:26 terminal/models/component/task.py:13
#: terminal/models/component/terminal.py:85
@ -5010,11 +5013,6 @@ msgstr "系统角色绑定"
msgid "Perms"
msgstr "权限"
#: rbac/serializers/role.py:28 terminal/models/applet/applet.py:34
#: terminal/models/virtualapp/virtualapp.py:20
msgid "Display name"
msgstr "显示名称"
#: rbac/serializers/rolebinding.py:60
msgid "Has bound this role"
msgstr "已经绑定"
@ -6967,6 +6965,11 @@ msgstr "社区版"
msgid "Enterprise"
msgstr "企业版"
#: terminal/models/applet/applet.py:34
#: terminal/models/virtualapp/virtualapp.py:20
msgid "Display name"
msgstr "显示名称"
#: terminal/models/applet/applet.py:36
#: terminal/models/virtualapp/virtualapp.py:22
msgid "Author"
@ -8560,7 +8563,7 @@ msgstr "组织管理员"
#: users/serializers/user.py:140
msgid "Can public key authentication"
msgstr "可以公钥认证"
msgstr "可以使用公钥认证"
#: users/serializers/user.py:242
msgid "Full name"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: JumpServer 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-07-05 16:34+0800\n"
"POT-Creation-Date: 2024-07-05 18:00+0800\n"
"PO-Revision-Date: 2021-05-20 10:54+0800\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: JumpServer team<ibuler@qq.com>\n"
@ -65,7 +65,8 @@ msgstr "完成"
#: accounts/automations/backup_account/handlers.py:219
#: accounts/const/automation.py:110
#: accounts/serializers/automations/change_secret.py:166 audits/const.py:64
#: accounts/serializers/automations/change_secret.py:166
#: assets/serializers/automations/base.py:52 audits/const.py:64
#: audits/models.py:64 audits/signal_handlers/activity_log.py:33
#: common/const/choices.py:18 ops/const.py:74 ops/serializers/celery.py:48
#: terminal/const.py:78 terminal/models/session/sharing.py:121
@ -304,8 +305,9 @@ msgstr "信箱"
msgid "SFTP"
msgstr "SFTP"
#: accounts/const/automation.py:111 common/const/choices.py:16
#: terminal/const.py:77 tickets/const.py:29 tickets/const.py:38
#: accounts/const/automation.py:111 assets/serializers/automations/base.py:54
#: common/const/choices.py:16 terminal/const.py:77 tickets/const.py:29
#: tickets/const.py:38
msgid "Pending"
msgstr "待定的"
@ -483,7 +485,7 @@ msgstr "帳號備份快照"
#: accounts/serializers/account/backup.py:48
#: accounts/serializers/automations/base.py:56
#: assets/models/automations/base.py:122
#: assets/serializers/automations/base.py:39
#: assets/serializers/automations/base.py:40
msgid "Trigger mode"
msgstr "觸發模式"
@ -576,7 +578,8 @@ msgid "Date finished"
msgstr "結束日期"
#: accounts/models/automations/change_secret.py:44
#: assets/models/automations/base.py:113 audits/models.py:208
#: assets/models/automations/base.py:113
#: assets/serializers/automations/base.py:39 audits/models.py:208
#: audits/serializers.py:54 ops/models/base.py:49 ops/models/job.py:234
#: terminal/models/applet/applet.py:320 terminal/models/applet/host.py:140
#: terminal/models/component/status.py:30
@ -708,9 +711,9 @@ msgstr "密碼規則"
#: ops/models/celery.py:80 ops/models/job.py:142 ops/models/playbook.py:28
#: ops/serializers/job.py:18 orgs/models.py:82
#: perms/models/asset_permission.py:61 rbac/models/role.py:29
#: settings/models.py:34 settings/models.py:183 settings/serializers/msg.py:86
#: settings/serializers/terminal.py:9 terminal/models/applet/applet.py:33
#: terminal/models/component/endpoint.py:12
#: rbac/serializers/role.py:28 settings/models.py:34 settings/models.py:183
#: settings/serializers/msg.py:86 settings/serializers/terminal.py:9
#: terminal/models/applet/applet.py:33 terminal/models/component/endpoint.py:12
#: terminal/models/component/endpoint.py:109
#: terminal/models/component/storage.py:26 terminal/models/component/task.py:13
#: terminal/models/component/terminal.py:85
@ -5015,11 +5018,6 @@ msgstr "系統角色綁定"
msgid "Perms"
msgstr "權限"
#: rbac/serializers/role.py:28 terminal/models/applet/applet.py:34
#: terminal/models/virtualapp/virtualapp.py:20
msgid "Display name"
msgstr "顯示名稱"
#: rbac/serializers/rolebinding.py:60
msgid "Has bound this role"
msgstr "已經綁定"
@ -6973,6 +6971,11 @@ msgstr "社區版"
msgid "Enterprise"
msgstr "企業版"
#: terminal/models/applet/applet.py:34
#: terminal/models/virtualapp/virtualapp.py:20
msgid "Display name"
msgstr "顯示名稱"
#: terminal/models/applet/applet.py:36
#: terminal/models/virtualapp/virtualapp.py:22
msgid "Author"

View File

@ -699,7 +699,7 @@
"LoginAssetToday": "本日のアクティブな資産数",
"LoginAssets": "アクティブな資産",
"LoginConfirm": "ログインレビュー",
"LoginConfirmUser": "確認方法",
"LoginConfirmUser": "ログインレビュー担当者",
"LoginCount": "ログイン回数",
"LoginDate": "ログイン日",
"LoginFailed": "ログイン失敗",

View File

@ -676,7 +676,7 @@
"LoginAssetToday": "今日活跃资产数",
"LoginAssets": "活跃资产",
"LoginConfirm": "登录复核",
"LoginConfirmUser": "确认方式",
"LoginConfirmUser": "登录复核 受理人",
"LoginCount": "登录次数",
"LoginDate": "登录日期",
"LoginFailed": "登录失败",

View File

@ -903,7 +903,7 @@
"LoginCity": "登入城市",
"LoginConfig": "登入配置",
"LoginConfirm": "登入覆核",
"LoginConfirmUser": "確認方式",
"LoginConfirmUser": "登錄複核 受理人",
"LoginCount": "登入次數",
"LoginDate": "登入日期",
"LoginFailed": "登入失敗",

View File

@ -25,7 +25,7 @@ class RoleSerializer(serializers.ModelSerializer):
extra_kwargs = {
'permissions': {'write_only': True},
'users_amount': {'label': _('Users amount')},
'display_name': {'label': _('Display name')}
'display_name': {'label': _('Name')}
}