perf: 修改翻译

pull/13250/head
ibuler 2024-05-17 16:31:39 +08:00
parent 49d2bd93b7
commit 90826b358c
6 changed files with 30 additions and 27 deletions

View File

@ -1108,7 +1108,7 @@ msgstr ""
#: acls/apps.py:7
msgid "App Acls"
msgstr ""
msgstr "ACLs"
#: acls/const.py:6 audits/const.py:36 terminal/const.py:11 tickets/const.py:44
#: tickets/templates/tickets/approve_check_password.html:47
@ -1358,7 +1358,7 @@ msgstr ""
#: assets/apps.py:9
msgid "App Assets"
msgstr ""
msgstr "Assets"
#: assets/automations/base/manager.py:191
msgid "{} disabled"
@ -2282,7 +2282,7 @@ msgstr ""
#: audits/apps.py:9
msgid "App Audits"
msgstr ""
msgstr "Activities"
#: audits/backends/db.py:16
msgid "The text content is too long. Use Elasticsearch to store operation logs"
@ -2687,7 +2687,7 @@ msgstr ""
#: authentication/apps.py:7
msgid "App Authentication"
msgstr ""
msgstr "Authentication"
#: authentication/backends/custom.py:59
#: authentication/backends/oauth2/backends.py:173
@ -3946,7 +3946,7 @@ msgstr ""
#: labels/apps.py:8
msgid "App Labels"
msgstr ""
msgstr "Labels"
#: labels/models.py:36
msgid "Resource ID"
@ -4546,7 +4546,7 @@ msgstr ""
#: perms/apps.py:9
msgid "App Permissions"
msgstr ""
msgstr "Policies"
#: perms/const.py:12
msgid "Connect (All protocols)"
@ -4684,7 +4684,7 @@ msgstr ""
#: rbac/apps.py:7
msgid "App RBAC"
msgstr ""
msgstr "RBAC"
#: rbac/builtin.py:115
msgid "SystemAdmin"
@ -4801,15 +4801,15 @@ msgstr ""
#: rbac/tree.py:24
msgid "Console view"
msgstr ""
msgstr "Console"
#: rbac/tree.py:25
msgid "Workbench view"
msgstr ""
msgstr "Workbench"
#: rbac/tree.py:26
msgid "Audit view"
msgstr ""
msgstr "Audits"
#: rbac/tree.py:27 settings/models.py:161
msgid "System setting"
@ -4817,7 +4817,7 @@ msgstr ""
#: rbac/tree.py:37
msgid "Session audits"
msgstr ""
msgstr "Session"
#: rbac/tree.py:49 xpack/plugins/cloud/manager.py:74
msgid "Cloud import"
@ -4837,7 +4837,7 @@ msgstr ""
#: rbac/tree.py:54
msgid "Terminal setting"
msgstr ""
msgstr "Terminal"
#: rbac/tree.py:55 settings/serializers/feature.py:127
msgid "Job center"
@ -4849,7 +4849,7 @@ msgstr ""
#: rbac/tree.py:57
msgid "App ops"
msgstr ""
msgstr "Ops"
#: rbac/tree.py:58 terminal/models/applet/applet.py:52
#: terminal/models/applet/applet.py:317 terminal/models/applet/host.py:30
@ -4859,7 +4859,7 @@ msgstr ""
#: rbac/tree.py:128
msgid "App organizations"
msgstr ""
msgstr "Organizations"
#: rbac/tree.py:129
msgid "Ticket comment"
@ -4907,7 +4907,7 @@ msgstr ""
#: settings/apps.py:7
msgid "App Settings"
msgstr ""
msgstr "Settings"
#: settings/models.py:37 users/models/preference.py:14
msgid "Encrypted"
@ -6352,7 +6352,7 @@ msgstr ""
#: terminal/apps.py:9
msgid "App Terminals"
msgstr ""
msgstr "Terminals"
#: terminal/backends/command/models.py:19
msgid "Input"
@ -7301,7 +7301,7 @@ msgstr ""
#: tickets/apps.py:7
msgid "App Tickets"
msgstr ""
msgstr "Tickets"
#: tickets/const.py:10
msgid "Apply for asset"
@ -7645,7 +7645,7 @@ msgstr ""
#: users/apps.py:9
msgid "App Users"
msgstr ""
msgstr "Users"
#: users/const.py:10
msgid "System administrator"

View File

@ -30,6 +30,7 @@
"AccountPolicyHelpText": "For accounts that do not meet the requirements when creating, such as: non-compliant key types and unique key constraints, you can choose the above strategy.",
"AccountPushCreate": "Create push account",
"AccountPushList": "Push accounts",
"MenuAccountTemplates": "Templates",
"AccountPushUpdate": "Update push account",
"AccountStorage": "Account storage",
"AccountTemplate": "Account templates",
@ -216,7 +217,7 @@
"ChangeViewHelpText": "Click to switch different views",
"Chat": "Chat",
"ChatAI": "Chat ai",
"ChatHello": "Hello! can i help you?",
"ChatHello": "Hello! Can i help you?",
"ChdirHelpText": "By default, the execution directory is the user's home directory",
"CheckAssetsAmount": "Check asset quantity",
"CheckViewAcceptor": "Click to view the acceptance person",

View File

@ -1,5 +1,6 @@
{
"ACL reject login asset": "本次登录已拒绝,原因是访问控制策略的限制",
"MenuAccountTemplates": "账号模版",
"Account info": "账号信息",
"Account not found": "账号未找到",
"Account: ": "账号: {{value}}",
@ -205,4 +206,4 @@
"success": "成功",
"system user": "系统用户",
"user": "用户"
}
}

View File

@ -178,6 +178,7 @@ class Migration(migrations.Migration):
],
options={
'ordering': ['date_created'],
'verbose_name': 'Playbook'
},
),
]

View File

@ -85,4 +85,5 @@ class Playbook(JMSOrgBaseModel):
class Meta:
unique_together = [('name', 'org_id', 'creator')]
verbose_name = _("Playbook")
ordering = ['date_created']

View File

@ -234,10 +234,10 @@ class CounterTree(Tree):
class PermissionTreeUtil:
get_permissions: Callable
action_mapper = {
'add': _('Create'),
'view': _('View'),
'change': _('Update'),
'delete': _('Delete')
'add': _('create'),
'view': _('view'),
'change': _('update'),
'delete': _('delete')
}
action_icon = {
'add': 'add',
@ -408,8 +408,6 @@ class PermissionTreeUtil:
node = TreeNode(**node_data)
if settings.DEBUG_DEV:
node.name += ('[' + node.id + ']')
if settings.DEBUG_DEV:
node.name += ('-' + node.id)
return node
def _create_root_tree_node(self):
@ -459,7 +457,8 @@ class PermissionTreeUtil:
checked_count, total_count = counter
if total_count == 0:
continue
node.name += '({}/{})'.format(checked_count, total_count)
if node.isParent:
node.name += ' ({}/{})'.format(checked_count, total_count)
if checked_count != 0:
node.checked = True
nodes.append(node)