mirror of https://github.com/jumpserver/jumpserver
perf: Translate
parent
d07c476507
commit
78bd3f581a
|
@ -40,6 +40,7 @@ class ConnectionTokenSerializer(CommonModelSerializer):
|
||||||
'from_ticket': {'read_only': True},
|
'from_ticket': {'read_only': True},
|
||||||
'value': {'read_only': True},
|
'value': {'read_only': True},
|
||||||
'is_expired': {'read_only': True, 'label': _('Is expired')},
|
'is_expired': {'read_only': True, 'label': _('Is expired')},
|
||||||
|
'org_name': {'label': _("Org name")},
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_request_user(self):
|
def get_request_user(self):
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2024-07-04 18:09+0800\n"
|
"POT-Creation-Date: 2024-07-05 16:34+0800\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -3357,6 +3357,11 @@ msgstr ""
|
||||||
msgid "Is expired"
|
msgid "Is expired"
|
||||||
msgstr "Expired"
|
msgstr "Expired"
|
||||||
|
|
||||||
|
#: authentication/serializers/connection_token.py:43
|
||||||
|
#: orgs/mixins/serializers.py:26 rbac/serializers/rolebinding.py:27
|
||||||
|
msgid "Org name"
|
||||||
|
msgstr "Organization"
|
||||||
|
|
||||||
#: authentication/serializers/password_mfa.py:29
|
#: authentication/serializers/password_mfa.py:29
|
||||||
#: users/templates/users/forgot_password.html:153
|
#: users/templates/users/forgot_password.html:153
|
||||||
msgid "The {} cannot be empty"
|
msgid "The {} cannot be empty"
|
||||||
|
@ -4473,7 +4478,8 @@ msgstr ""
|
||||||
msgid "Run as policy"
|
msgid "Run as policy"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ops/models/job.py:222 terminal/notifications.py:174
|
#: ops/models/job.py:222 ops/serializers/job.py:92
|
||||||
|
#: terminal/notifications.py:174
|
||||||
msgid "Job"
|
msgid "Job"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -4485,7 +4491,7 @@ msgstr ""
|
||||||
msgid "Material Type"
|
msgid "Material Type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ops/models/job.py:545
|
#: ops/models/job.py:547
|
||||||
msgid "Job Execution"
|
msgid "Job Execution"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -4549,7 +4555,11 @@ msgstr ""
|
||||||
msgid "Is finished"
|
msgid "Is finished"
|
||||||
msgstr "Finished"
|
msgstr "Finished"
|
||||||
|
|
||||||
#: ops/serializers/job.py:90
|
#: ops/serializers/job.py:89
|
||||||
|
msgid "Task id"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ops/serializers/job.py:98
|
||||||
msgid "You do not have permission for the current job."
|
msgid "You do not have permission for the current job."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -4652,10 +4662,6 @@ msgstr "請選擇一個組織後再保存"
|
||||||
msgid "Organization"
|
msgid "Organization"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: orgs/mixins/serializers.py:26 rbac/serializers/rolebinding.py:27
|
|
||||||
msgid "Org name"
|
|
||||||
msgstr "Organization"
|
|
||||||
|
|
||||||
#: orgs/models.py:14
|
#: orgs/models.py:14
|
||||||
msgid "GLOBAL"
|
msgid "GLOBAL"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2024-07-04 18:09+0800\n"
|
"POT-Creation-Date: 2024-07-05 16:34+0800\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -3423,6 +3423,11 @@ msgstr "アクション"
|
||||||
msgid "Is expired"
|
msgid "Is expired"
|
||||||
msgstr "期限切れです"
|
msgstr "期限切れです"
|
||||||
|
|
||||||
|
#: authentication/serializers/connection_token.py:43
|
||||||
|
#: orgs/mixins/serializers.py:26 rbac/serializers/rolebinding.py:27
|
||||||
|
msgid "Org name"
|
||||||
|
msgstr "組織名"
|
||||||
|
|
||||||
#: authentication/serializers/password_mfa.py:29
|
#: authentication/serializers/password_mfa.py:29
|
||||||
#: users/templates/users/forgot_password.html:153
|
#: users/templates/users/forgot_password.html:153
|
||||||
msgid "The {} cannot be empty"
|
msgid "The {} cannot be empty"
|
||||||
|
@ -4575,7 +4580,8 @@ msgstr "ユーザーとして実行"
|
||||||
msgid "Run as policy"
|
msgid "Run as policy"
|
||||||
msgstr "ユーザー ポリシー"
|
msgstr "ユーザー ポリシー"
|
||||||
|
|
||||||
#: ops/models/job.py:222 terminal/notifications.py:174
|
#: ops/models/job.py:222 ops/serializers/job.py:92
|
||||||
|
#: terminal/notifications.py:174
|
||||||
msgid "Job"
|
msgid "Job"
|
||||||
msgstr "ジョブ#ジョブ#"
|
msgstr "ジョブ#ジョブ#"
|
||||||
|
|
||||||
|
@ -4587,7 +4593,7 @@ msgstr "Material"
|
||||||
msgid "Material Type"
|
msgid "Material Type"
|
||||||
msgstr "Material を選択してオプションを設定します。"
|
msgstr "Material を選択してオプションを設定します。"
|
||||||
|
|
||||||
#: ops/models/job.py:545
|
#: ops/models/job.py:547
|
||||||
msgid "Job Execution"
|
msgid "Job Execution"
|
||||||
msgstr "ジョブ実行"
|
msgstr "ジョブ実行"
|
||||||
|
|
||||||
|
@ -4651,7 +4657,11 @@ msgstr "タスクの種類"
|
||||||
msgid "Is finished"
|
msgid "Is finished"
|
||||||
msgstr "終了しました"
|
msgstr "終了しました"
|
||||||
|
|
||||||
#: ops/serializers/job.py:90
|
#: ops/serializers/job.py:89
|
||||||
|
msgid "Task id"
|
||||||
|
msgstr "タスク ID"
|
||||||
|
|
||||||
|
#: ops/serializers/job.py:98
|
||||||
msgid "You do not have permission for the current job."
|
msgid "You do not have permission for the current job."
|
||||||
msgstr "あなたは現在のジョブの権限を持っていません。"
|
msgstr "あなたは現在のジョブの権限を持っていません。"
|
||||||
|
|
||||||
|
@ -4755,10 +4765,6 @@ msgstr "組織を選択してから保存してください"
|
||||||
msgid "Organization"
|
msgid "Organization"
|
||||||
msgstr "組織"
|
msgstr "組織"
|
||||||
|
|
||||||
#: orgs/mixins/serializers.py:26 rbac/serializers/rolebinding.py:27
|
|
||||||
msgid "Org name"
|
|
||||||
msgstr "組織名"
|
|
||||||
|
|
||||||
#: orgs/models.py:14
|
#: orgs/models.py:14
|
||||||
msgid "GLOBAL"
|
msgid "GLOBAL"
|
||||||
msgstr "グローバル組織"
|
msgstr "グローバル組織"
|
||||||
|
|
|
@ -7,7 +7,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: JumpServer 0.3.3\n"
|
"Project-Id-Version: JumpServer 0.3.3\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2024-07-04 18:09+0800\n"
|
"POT-Creation-Date: 2024-07-05 16:34+0800\n"
|
||||||
"PO-Revision-Date: 2021-05-20 10:54+0800\n"
|
"PO-Revision-Date: 2021-05-20 10:54+0800\n"
|
||||||
"Last-Translator: ibuler <ibuler@qq.com>\n"
|
"Last-Translator: ibuler <ibuler@qq.com>\n"
|
||||||
"Language-Team: JumpServer team<ibuler@qq.com>\n"
|
"Language-Team: JumpServer team<ibuler@qq.com>\n"
|
||||||
|
@ -3386,6 +3386,11 @@ msgstr "动作"
|
||||||
msgid "Is expired"
|
msgid "Is expired"
|
||||||
msgstr "已过期"
|
msgstr "已过期"
|
||||||
|
|
||||||
|
#: authentication/serializers/connection_token.py:43
|
||||||
|
#: orgs/mixins/serializers.py:26 rbac/serializers/rolebinding.py:27
|
||||||
|
msgid "Org name"
|
||||||
|
msgstr "组织名称"
|
||||||
|
|
||||||
#: authentication/serializers/password_mfa.py:29
|
#: authentication/serializers/password_mfa.py:29
|
||||||
#: users/templates/users/forgot_password.html:153
|
#: users/templates/users/forgot_password.html:153
|
||||||
msgid "The {} cannot be empty"
|
msgid "The {} cannot be empty"
|
||||||
|
@ -4514,7 +4519,8 @@ msgstr "运行用户"
|
||||||
msgid "Run as policy"
|
msgid "Run as policy"
|
||||||
msgstr "用户策略"
|
msgstr "用户策略"
|
||||||
|
|
||||||
#: ops/models/job.py:222 terminal/notifications.py:174
|
#: ops/models/job.py:222 ops/serializers/job.py:92
|
||||||
|
#: terminal/notifications.py:174
|
||||||
msgid "Job"
|
msgid "Job"
|
||||||
msgstr "作业"
|
msgstr "作业"
|
||||||
|
|
||||||
|
@ -4526,7 +4532,7 @@ msgstr "Material"
|
||||||
msgid "Material Type"
|
msgid "Material Type"
|
||||||
msgstr "Material 类型"
|
msgstr "Material 类型"
|
||||||
|
|
||||||
#: ops/models/job.py:545
|
#: ops/models/job.py:547
|
||||||
msgid "Job Execution"
|
msgid "Job Execution"
|
||||||
msgstr "作业执行"
|
msgstr "作业执行"
|
||||||
|
|
||||||
|
@ -4590,7 +4596,11 @@ msgstr "任务类型"
|
||||||
msgid "Is finished"
|
msgid "Is finished"
|
||||||
msgstr "是否完成"
|
msgstr "是否完成"
|
||||||
|
|
||||||
#: ops/serializers/job.py:90
|
#: ops/serializers/job.py:89
|
||||||
|
msgid "Task id"
|
||||||
|
msgstr "任务 ID"
|
||||||
|
|
||||||
|
#: ops/serializers/job.py:98
|
||||||
msgid "You do not have permission for the current job."
|
msgid "You do not have permission for the current job."
|
||||||
msgstr "你没有当前作业的权限。"
|
msgstr "你没有当前作业的权限。"
|
||||||
|
|
||||||
|
@ -4693,10 +4703,6 @@ msgstr "请选择一个组织后再保存"
|
||||||
msgid "Organization"
|
msgid "Organization"
|
||||||
msgstr "组织"
|
msgstr "组织"
|
||||||
|
|
||||||
#: orgs/mixins/serializers.py:26 rbac/serializers/rolebinding.py:27
|
|
||||||
msgid "Org name"
|
|
||||||
msgstr "组织名称"
|
|
||||||
|
|
||||||
#: orgs/models.py:14
|
#: orgs/models.py:14
|
||||||
msgid "GLOBAL"
|
msgid "GLOBAL"
|
||||||
msgstr "全局组织"
|
msgstr "全局组织"
|
||||||
|
|
|
@ -7,7 +7,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: JumpServer 0.3.3\n"
|
"Project-Id-Version: JumpServer 0.3.3\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2024-07-04 18:09+0800\n"
|
"POT-Creation-Date: 2024-07-05 16:34+0800\n"
|
||||||
"PO-Revision-Date: 2021-05-20 10:54+0800\n"
|
"PO-Revision-Date: 2021-05-20 10:54+0800\n"
|
||||||
"Last-Translator: ibuler <ibuler@qq.com>\n"
|
"Last-Translator: ibuler <ibuler@qq.com>\n"
|
||||||
"Language-Team: JumpServer team<ibuler@qq.com>\n"
|
"Language-Team: JumpServer team<ibuler@qq.com>\n"
|
||||||
|
@ -3388,6 +3388,11 @@ msgstr "動作"
|
||||||
msgid "Is expired"
|
msgid "Is expired"
|
||||||
msgstr "已過期"
|
msgstr "已過期"
|
||||||
|
|
||||||
|
#: authentication/serializers/connection_token.py:43
|
||||||
|
#: orgs/mixins/serializers.py:26 rbac/serializers/rolebinding.py:27
|
||||||
|
msgid "Org name"
|
||||||
|
msgstr "組織名稱"
|
||||||
|
|
||||||
#: authentication/serializers/password_mfa.py:29
|
#: authentication/serializers/password_mfa.py:29
|
||||||
#: users/templates/users/forgot_password.html:153
|
#: users/templates/users/forgot_password.html:153
|
||||||
msgid "The {} cannot be empty"
|
msgid "The {} cannot be empty"
|
||||||
|
@ -4517,7 +4522,8 @@ msgstr "執行使用者"
|
||||||
msgid "Run as policy"
|
msgid "Run as policy"
|
||||||
msgstr "使用者策略"
|
msgstr "使用者策略"
|
||||||
|
|
||||||
#: ops/models/job.py:222 terminal/notifications.py:174
|
#: ops/models/job.py:222 ops/serializers/job.py:92
|
||||||
|
#: terminal/notifications.py:174
|
||||||
msgid "Job"
|
msgid "Job"
|
||||||
msgstr "作業"
|
msgstr "作業"
|
||||||
|
|
||||||
|
@ -4529,7 +4535,7 @@ msgstr "Material"
|
||||||
msgid "Material Type"
|
msgid "Material Type"
|
||||||
msgstr "Material 類型"
|
msgstr "Material 類型"
|
||||||
|
|
||||||
#: ops/models/job.py:545
|
#: ops/models/job.py:547
|
||||||
msgid "Job Execution"
|
msgid "Job Execution"
|
||||||
msgstr "作業執行"
|
msgstr "作業執行"
|
||||||
|
|
||||||
|
@ -4593,7 +4599,11 @@ msgstr "任務類型"
|
||||||
msgid "Is finished"
|
msgid "Is finished"
|
||||||
msgstr "是否完成"
|
msgstr "是否完成"
|
||||||
|
|
||||||
#: ops/serializers/job.py:90
|
#: ops/serializers/job.py:89
|
||||||
|
msgid "Task id"
|
||||||
|
msgstr "任務 ID"
|
||||||
|
|
||||||
|
#: ops/serializers/job.py:98
|
||||||
msgid "You do not have permission for the current job."
|
msgid "You do not have permission for the current job."
|
||||||
msgstr "你沒有當前作業的權限。"
|
msgstr "你沒有當前作業的權限。"
|
||||||
|
|
||||||
|
@ -4696,10 +4706,6 @@ msgstr "請選擇一個組織後再保存"
|
||||||
msgid "Organization"
|
msgid "Organization"
|
||||||
msgstr "組織"
|
msgstr "組織"
|
||||||
|
|
||||||
#: orgs/mixins/serializers.py:26 rbac/serializers/rolebinding.py:27
|
|
||||||
msgid "Org name"
|
|
||||||
msgstr "組織名稱"
|
|
||||||
|
|
||||||
#: orgs/models.py:14
|
#: orgs/models.py:14
|
||||||
msgid "GLOBAL"
|
msgid "GLOBAL"
|
||||||
msgstr "全局組織"
|
msgstr "全局組織"
|
||||||
|
|
|
@ -1383,5 +1383,8 @@
|
||||||
"ZoneList": "Zones",
|
"ZoneList": "Zones",
|
||||||
"ZoneUpdate": "Update the zone",
|
"ZoneUpdate": "Update the zone",
|
||||||
"forceEnableMFAHelpText": "If force enable, user can not disable by themselves",
|
"forceEnableMFAHelpText": "If force enable, user can not disable by themselves",
|
||||||
"removeWarningMsg": "Are you sure you want to remove"
|
"removeWarningMsg": "Are you sure you want to remove",
|
||||||
|
"RetrySelected": "Retry selected",
|
||||||
|
"ApproveSelected": "Approve selected",
|
||||||
|
"Running": "Running"
|
||||||
}
|
}
|
|
@ -1385,5 +1385,8 @@
|
||||||
"ZoneUpdate": "更新网域",
|
"ZoneUpdate": "更新网域",
|
||||||
"forceEnableMFAHelpText": "如果强制启用,用户无法自行禁用",
|
"forceEnableMFAHelpText": "如果强制启用,用户无法自行禁用",
|
||||||
"removeWarningMsg": "你确定要移除",
|
"removeWarningMsg": "你确定要移除",
|
||||||
"VaultHCPMountPoint": "Vault 服务器的挂载点,默认为 jumpserver"
|
"VaultHCPMountPoint": "Vault 服务器的挂载点,默认为 jumpserver",
|
||||||
|
"RetrySelected": "重试所选",
|
||||||
|
"ApproveSelected": "审批所选",
|
||||||
|
"Running": "运行中"
|
||||||
}
|
}
|
|
@ -271,7 +271,10 @@ class JobExecutionTaskDetail(APIView):
|
||||||
execution = get_object_or_404(JobExecution, pk=task_id, creator=request.user)
|
execution = get_object_or_404(JobExecution, pk=task_id, creator=request.user)
|
||||||
|
|
||||||
return Response(data={
|
return Response(data={
|
||||||
'status': execution.status,
|
'status': {
|
||||||
|
'value': execution.status,
|
||||||
|
'label': execution.get_status_display()
|
||||||
|
},
|
||||||
'is_finished': execution.is_finished,
|
'is_finished': execution.is_finished,
|
||||||
'is_success': execution.is_success,
|
'is_success': execution.is_success,
|
||||||
'time_cost': execution.time_cost,
|
'time_cost': execution.time_cost,
|
||||||
|
|
|
@ -247,6 +247,8 @@ class JobExecution(JMSOrgBaseModel):
|
||||||
verbose_name=_("Material Type"))
|
verbose_name=_("Material Type"))
|
||||||
|
|
||||||
# clean up zombie execution
|
# clean up zombie execution
|
||||||
|
def get_status_display(self):
|
||||||
|
return dict(JobStatus.choices).get(self.status, self.status)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def clean_unexpected_execution(cls):
|
def clean_unexpected_execution(cls):
|
||||||
|
|
|
@ -84,6 +84,14 @@ class JobExecutionSerializer(BulkOrgResourceModelSerializer):
|
||||||
fields = read_only_fields + [
|
fields = read_only_fields + [
|
||||||
"job", "parameters", "creator"
|
"job", "parameters", "creator"
|
||||||
]
|
]
|
||||||
|
extra_kwargs = {
|
||||||
|
"task_id": {
|
||||||
|
"label": _("Task id"),
|
||||||
|
},
|
||||||
|
"job": {
|
||||||
|
"label": _("Job"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
def validate_job(self, job_obj):
|
def validate_job(self, job_obj):
|
||||||
if job_obj.creator != self.context['request'].user:
|
if job_obj.creator != self.context['request'].user:
|
||||||
|
|
Loading…
Reference in New Issue