perf: i18n System Settings -> Features

pull/13273/head
Bai 2024-05-21 16:11:13 +08:00
parent 5ab55b823c
commit 4a5205c5ac
5 changed files with 31 additions and 20 deletions

View File

@ -5505,7 +5505,7 @@ msgid "Subject"
msgstr ""
#: settings/serializers/feature.py:22
msgid "More URL"
msgid "More Link"
msgstr ""
#: settings/serializers/feature.py:36 settings/serializers/feature.py:38

View File

@ -5723,7 +5723,7 @@ msgid "Subject"
msgstr "件名"
#: settings/serializers/feature.py:22
msgid "More URL"
msgid "More Link"
msgstr "もっとURL"
#: settings/serializers/feature.py:36 settings/serializers/feature.py:38

View File

@ -5682,7 +5682,7 @@ msgid "Subject"
msgstr "主题"
#: settings/serializers/feature.py:22
msgid "More URL"
msgid "More Link"
msgstr "更多信息 URL"
#: settings/serializers/feature.py:36 settings/serializers/feature.py:38

View File

@ -223,7 +223,7 @@
"ChangeSecretParams": "Change password parameters",
"ChangeViewHelpText": "Click to switch different views",
"Chat": "Chat",
"ChatAI": "Chat ai",
"ChatAI": "Chat AI",
"ChatHello": "Hello! can i help you?",
"ChdirHelpText": "By default, the execution directory is the user's home directory",
"CheckAssetsAmount": "Check asset quantity",
@ -1276,9 +1276,9 @@
"VirtualAccountHelpMsg": "Virtual accounts are specialized accounts with specific purposes when connecting assets.",
"VirtualAccountUpdate": "Virtual account update",
"VirtualAccounts": "Virtual accounts",
"VirtualApp": "Virtual app",
"VirtualApp": "Virtual App",
"VirtualAppDetail": "Virtual app details",
"VirtualApps": "Virtual app",
"VirtualApps": "VApp",
"Volcengine": "Volcengine",
"Warning": "Warning",
"WeCom": "Wecom",

View File

@ -19,7 +19,7 @@ class AnnouncementSerializer(serializers.Serializer):
CONTENT = serializers.CharField(label=_("Content"))
LINK = serializers.URLField(
required=False, allow_null=True, allow_blank=True,
label=_("More URL"), default='',
label=_("More Link"), default='',
)
def to_representation(self, instance):
@ -57,12 +57,13 @@ class VaultSettingSerializer(serializers.Serializer):
HISTORY_ACCOUNT_CLEAN_LIMIT = serializers.IntegerField(
default=999, max_value=999, min_value=1,
required=False, label=_('Historical accounts retained count'),
required=False, label=_('Record limit'),
help_text=_(
'If the specific value is less than 999, '
'If the specific value is less than 999 (default), '
'the system will automatically perform a task every night: '
'check and delete historical accounts that exceed the predetermined number. '
'If the value reaches or exceeds 999, no historical account deletion will be performed.'
'If the value reaches or exceeds 999 (default), '
'no historical account deletion will be performed'
)
)
@ -75,13 +76,15 @@ class ChatAISettingSerializer(serializers.Serializer):
required=False, label=_('Chat AI')
)
GPT_BASE_URL = serializers.CharField(
allow_blank=True, required=False, label=_('Base Url')
allow_blank=True, required=False, label=_('Base URL'),
help_text=_('The base URL of the GPT service. For example: https://api.openai.com/v1')
)
GPT_API_KEY = EncryptedField(
allow_blank=True, required=False, label=_('API Key'),
)
GPT_PROXY = serializers.CharField(
allow_blank=True, required=False, label=_('Proxy')
allow_blank=True, required=False, label=_('Proxy'),
help_text=_('The proxy server address of the GPT service. For example: http://ip:port')
)
GPT_MODEL = serializers.ChoiceField(
default='', choices=GPT_MODEL_CHOICES, label=_("GPT Model"), required=False,
@ -108,15 +111,19 @@ class ChatAISettingSerializer(serializers.Serializer):
class TicketSettingSerializer(serializers.Serializer):
PREFIX_TITLE = _('Ticket')
TICKETS_ENABLED = serializers.BooleanField(required=False, default=True, label=_("Enable tickets"))
TICKETS_DIRECT_APPROVE = serializers.BooleanField(required=False, default=False, label=_("No login approval"))
TICKETS_ENABLED = serializers.BooleanField(required=False, default=True, label=_("Ticket"))
TICKETS_DIRECT_APPROVE = serializers.BooleanField(
required=False, default=False, label=_("Approval without login"),
help_text=_('Allow direct approval ticket without login')
)
TICKET_AUTHORIZE_DEFAULT_TIME = serializers.IntegerField(
min_value=1, max_value=999999, required=False,
label=_("Default period")
label=_("Period"),
help_text=_("The default authorization time period when applying for assets via a ticket")
)
TICKET_AUTHORIZE_DEFAULT_TIME_UNIT = serializers.ChoiceField(
choices=[('day', _("day")), ('hour', _("hour"))],
label=_("Default unit"), required=False,
label=_("Unit"), required=False, help_text=_("The unit of period")
)
@ -124,13 +131,13 @@ class OpsSettingSerializer(serializers.Serializer):
PREFIX_TITLE = _('Feature')
SECURITY_COMMAND_EXECUTION = serializers.BooleanField(
required=False, label=_('Job center'),
help_text=_('Allow user run batch command or not using ansible')
required=False, label=_('Adhoc'),
help_text=_('Allow users to execute batch commands in the Workbench - Job Center - Adhoc')
)
SECURITY_COMMAND_BLACKLIST = serializers.ListField(
child=serializers.CharField(max_length=1024, ),
label=_('Command blacklist'),
help_text=_("Commands that are not allowed execute.")
help_text=_("Command blacklist in Adhoc")
)
@ -138,5 +145,9 @@ class VirtualAppSerializer(serializers.Serializer):
PREFIX_TITLE = _('Virtual app')
VIRTUAL_APP_ENABLED = serializers.BooleanField(
required=False, label=_('Virtual app'),
required=False, label=_('vApp'),
help_text=_(
'Virtual applications, you can use the Linux operating system as an application server '
'in remote applications.'
)
)