perf: 修改 platform 翻译

pull/12928/head
ibuler 2024-03-13 18:40:35 +08:00
parent bffcd6107c
commit cae9f03892
2 changed files with 37 additions and 14 deletions

View File

@ -30,17 +30,29 @@ class PlatformAutomationSerializer(serializers.ModelSerializer):
]
extra_kwargs = {
# 启用资产探测
"ping_enabled": {"label": _("Ping enabled")},
"ping_enabled": {"label": _("Ping enabled"), "help_text": _("Enable asset detection")},
"ping_method": {"label": _("Ping method")},
"gather_facts_enabled": {"label": _("Gather facts enabled")},
"gather_facts_enabled": {
"label": _("Gather facts enabled"),
"help_text": _("Enable asset facts collection")
},
"gather_facts_method": {"label": _("Gather facts method")},
"verify_account_enabled": {"label": _("Verify account enabled")},
"verify_account_enabled": {
"label": _("Verify account enabled"),
"help_text": _("Enable account verification")
},
"verify_account_method": {"label": _("Verify account method")},
"change_secret_enabled": {"label": _("Change secret enabled")},
"change_secret_enabled": {
"label": _("Change secret enabled"),
"help_text": _("Enable account secret auto change")
},
"change_secret_method": {"label": _("Change secret method")},
"push_account_enabled": {"label": _("Push account enabled")},
"push_account_enabled": {"label": _("Push account enabled"), "help_text": _("Enable account auto push")},
"push_account_method": {"label": _("Push account method")},
"gather_accounts_enabled": {"label": _("Gather accounts enabled")},
"gather_accounts_enabled": {
"label": _("Gather accounts enabled"),
"help_text": _("Enable account collection")
},
"gather_accounts_method": {"label": _("Gather accounts method")},
}
@ -158,13 +170,21 @@ class PlatformSerializer(ResourceLabelsMixin, WritableNestedModelSerializer):
'created_by', 'updated_by'
]
fields = fields_small + [
"protocols", "domain_enabled", "su_enabled",
"su_method", "automation", "comment", "custom_fields",
"labels"
"protocols", "domain_enabled", "su_enabled", "su_method",
"automation", "comment", "custom_fields", "labels"
] + read_only_fields
extra_kwargs = {
"su_enabled": {"label": _('Su enabled')},
"domain_enabled": {"label": _('Domain enabled')},
"su_enabled": {
"label": _('Su enabled'),
"help_text": _(
"Login with account when accessing assets, then automatically switch to another, "
"similar to logging in with a regular account and then switching to root"
)
},
"domain_enabled": {
"label": _('Domain enabled'),
"help_text": _("Assets can be connected using a domain gateway")
},
"domain_default": {"label": _('Default Domain')},
}

View File

@ -358,7 +358,7 @@
"DefaultDatabase": "Default Database",
"DefaultPort": "Default Port",
"Delete": "Delete",
"DeleteConfirmMessage": "\"Deletion is irreversible, do you wish to continue?",
"DeleteConfirmMessage": "Deletion is irreversible, do you wish to continue?",
"DeleteErrorMsg": "Delete Failed",
"DeleteNode": "Delete Node",
"DeleteOrgMsg": "User List, User Group, Asset List, Network Domain List, Manage Users, System Users, Tag Management, Asset Authorization Rules",
@ -729,6 +729,7 @@
"OrgAuditor": "Org Auditors",
"OrgName": "Authorized Organization Name",
"OrgRole": "Org Roles",
"OrgRoleHelpMsg": "Organization roles are roles tailored to individual organizations within the platform. These roles are assigned when inviting users to join a particular organization and dictate their permissions and access levels within that organization. Unlike system roles, organization roles are customizable and apply only within the scope of the organization they are assigned to.",
"OrgRoleHelpText": "The Org role is the user's role within the current organization",
"OrgRoles": "Org Role",
"OrgUser": "Organize Users",
@ -1049,7 +1050,7 @@
"SuperAdmin": "Super Administrator",
"SuperOrgAdmin": "Super Admin + Organization Admin",
"Support": "Support",
"SupportedProtocol": "Supported Protocols",
"SupportedProtocol": "Protocols",
"SupportedProtocolHelpText": "Set supported protocols for the asset, you can modify the custom configurations, such as SFTP directory, RDP AD domain, etc., by clicking on the set button",
"Sync": "Sync",
"SyncDelete": "Sync Deletion",
@ -1069,6 +1070,7 @@
"SyncedCount": "Synchronized",
"SystemError": "System Error",
"SystemRole": "System Roles",
"SystemRoleHelpMsg": "System roles are roles that apply universally across all organizations within the platform. These roles allow you to define specific permissions and access levels for users across the entire system. Changes made to system roles will affect all organizations using the platform.",
"SystemRoles": "System Roles",
"SystemSetting": "System Settings",
"SystemTools": "System Tools",
@ -1215,6 +1217,7 @@
"ViewPerm": "View",
"ViewSecret": "View Ciphertext",
"VirtualAccountDetail": "Details of virtual account",
"VirtualAccountHelpMsg": "Virtual accounts are specialized accounts with specific purposes when connecting assets.",
"VirtualAccountUpdate": "Virtual Account Update",
"VirtualAccounts": "Virtual Accounts",
"VirtualApp": "Virtual App",
@ -1238,4 +1241,4 @@
"Workspace": "Workspace",
"Yes": "Yes",
"ZStack": "ZStack"
}
}