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 #: acls/apps.py:7
msgid "App Acls" msgid "App Acls"
msgstr "" msgstr "ACLs"
#: acls/const.py:6 audits/const.py:36 terminal/const.py:11 tickets/const.py:44 #: acls/const.py:6 audits/const.py:36 terminal/const.py:11 tickets/const.py:44
#: tickets/templates/tickets/approve_check_password.html:47 #: tickets/templates/tickets/approve_check_password.html:47
@ -1358,7 +1358,7 @@ msgstr ""
#: assets/apps.py:9 #: assets/apps.py:9
msgid "App Assets" msgid "App Assets"
msgstr "" msgstr "Assets"
#: assets/automations/base/manager.py:191 #: assets/automations/base/manager.py:191
msgid "{} disabled" msgid "{} disabled"
@ -2282,7 +2282,7 @@ msgstr ""
#: audits/apps.py:9 #: audits/apps.py:9
msgid "App Audits" msgid "App Audits"
msgstr "" msgstr "Activities"
#: audits/backends/db.py:16 #: audits/backends/db.py:16
msgid "The text content is too long. Use Elasticsearch to store operation logs" msgid "The text content is too long. Use Elasticsearch to store operation logs"
@ -2687,7 +2687,7 @@ msgstr ""
#: authentication/apps.py:7 #: authentication/apps.py:7
msgid "App Authentication" msgid "App Authentication"
msgstr "" msgstr "Authentication"
#: authentication/backends/custom.py:59 #: authentication/backends/custom.py:59
#: authentication/backends/oauth2/backends.py:173 #: authentication/backends/oauth2/backends.py:173
@ -3946,7 +3946,7 @@ msgstr ""
#: labels/apps.py:8 #: labels/apps.py:8
msgid "App Labels" msgid "App Labels"
msgstr "" msgstr "Labels"
#: labels/models.py:36 #: labels/models.py:36
msgid "Resource ID" msgid "Resource ID"
@ -4546,7 +4546,7 @@ msgstr ""
#: perms/apps.py:9 #: perms/apps.py:9
msgid "App Permissions" msgid "App Permissions"
msgstr "" msgstr "Policies"
#: perms/const.py:12 #: perms/const.py:12
msgid "Connect (All protocols)" msgid "Connect (All protocols)"
@ -4684,7 +4684,7 @@ msgstr ""
#: rbac/apps.py:7 #: rbac/apps.py:7
msgid "App RBAC" msgid "App RBAC"
msgstr "" msgstr "RBAC"
#: rbac/builtin.py:115 #: rbac/builtin.py:115
msgid "SystemAdmin" msgid "SystemAdmin"
@ -4801,15 +4801,15 @@ msgstr ""
#: rbac/tree.py:24 #: rbac/tree.py:24
msgid "Console view" msgid "Console view"
msgstr "" msgstr "Console"
#: rbac/tree.py:25 #: rbac/tree.py:25
msgid "Workbench view" msgid "Workbench view"
msgstr "" msgstr "Workbench"
#: rbac/tree.py:26 #: rbac/tree.py:26
msgid "Audit view" msgid "Audit view"
msgstr "" msgstr "Audits"
#: rbac/tree.py:27 settings/models.py:161 #: rbac/tree.py:27 settings/models.py:161
msgid "System setting" msgid "System setting"
@ -4817,7 +4817,7 @@ msgstr ""
#: rbac/tree.py:37 #: rbac/tree.py:37
msgid "Session audits" msgid "Session audits"
msgstr "" msgstr "Session"
#: rbac/tree.py:49 xpack/plugins/cloud/manager.py:74 #: rbac/tree.py:49 xpack/plugins/cloud/manager.py:74
msgid "Cloud import" msgid "Cloud import"
@ -4837,7 +4837,7 @@ msgstr ""
#: rbac/tree.py:54 #: rbac/tree.py:54
msgid "Terminal setting" msgid "Terminal setting"
msgstr "" msgstr "Terminal"
#: rbac/tree.py:55 settings/serializers/feature.py:127 #: rbac/tree.py:55 settings/serializers/feature.py:127
msgid "Job center" msgid "Job center"
@ -4849,7 +4849,7 @@ msgstr ""
#: rbac/tree.py:57 #: rbac/tree.py:57
msgid "App ops" msgid "App ops"
msgstr "" msgstr "Ops"
#: rbac/tree.py:58 terminal/models/applet/applet.py:52 #: rbac/tree.py:58 terminal/models/applet/applet.py:52
#: terminal/models/applet/applet.py:317 terminal/models/applet/host.py:30 #: terminal/models/applet/applet.py:317 terminal/models/applet/host.py:30
@ -4859,7 +4859,7 @@ msgstr ""
#: rbac/tree.py:128 #: rbac/tree.py:128
msgid "App organizations" msgid "App organizations"
msgstr "" msgstr "Organizations"
#: rbac/tree.py:129 #: rbac/tree.py:129
msgid "Ticket comment" msgid "Ticket comment"
@ -4907,7 +4907,7 @@ msgstr ""
#: settings/apps.py:7 #: settings/apps.py:7
msgid "App Settings" msgid "App Settings"
msgstr "" msgstr "Settings"
#: settings/models.py:37 users/models/preference.py:14 #: settings/models.py:37 users/models/preference.py:14
msgid "Encrypted" msgid "Encrypted"
@ -6352,7 +6352,7 @@ msgstr ""
#: terminal/apps.py:9 #: terminal/apps.py:9
msgid "App Terminals" msgid "App Terminals"
msgstr "" msgstr "Terminals"
#: terminal/backends/command/models.py:19 #: terminal/backends/command/models.py:19
msgid "Input" msgid "Input"
@ -7301,7 +7301,7 @@ msgstr ""
#: tickets/apps.py:7 #: tickets/apps.py:7
msgid "App Tickets" msgid "App Tickets"
msgstr "" msgstr "Tickets"
#: tickets/const.py:10 #: tickets/const.py:10
msgid "Apply for asset" msgid "Apply for asset"
@ -7645,7 +7645,7 @@ msgstr ""
#: users/apps.py:9 #: users/apps.py:9
msgid "App Users" msgid "App Users"
msgstr "" msgstr "Users"
#: users/const.py:10 #: users/const.py:10
msgid "System administrator" 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.", "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", "AccountPushCreate": "Create push account",
"AccountPushList": "Push accounts", "AccountPushList": "Push accounts",
"MenuAccountTemplates": "Templates",
"AccountPushUpdate": "Update push account", "AccountPushUpdate": "Update push account",
"AccountStorage": "Account storage", "AccountStorage": "Account storage",
"AccountTemplate": "Account templates", "AccountTemplate": "Account templates",
@ -216,7 +217,7 @@
"ChangeViewHelpText": "Click to switch different views", "ChangeViewHelpText": "Click to switch different views",
"Chat": "Chat", "Chat": "Chat",
"ChatAI": "Chat ai", "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", "ChdirHelpText": "By default, the execution directory is the user's home directory",
"CheckAssetsAmount": "Check asset quantity", "CheckAssetsAmount": "Check asset quantity",
"CheckViewAcceptor": "Click to view the acceptance person", "CheckViewAcceptor": "Click to view the acceptance person",

View File

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

View File

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

View File

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

View File

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