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 "" msgstr ""
#: settings/serializers/feature.py:22 #: settings/serializers/feature.py:22
msgid "More URL" msgid "More Link"
msgstr "" msgstr ""
#: settings/serializers/feature.py:36 settings/serializers/feature.py:38 #: settings/serializers/feature.py:36 settings/serializers/feature.py:38

View File

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

View File

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

View File

@ -223,7 +223,7 @@
"ChangeSecretParams": "Change password parameters", "ChangeSecretParams": "Change password parameters",
"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",
@ -1276,9 +1276,9 @@
"VirtualAccountHelpMsg": "Virtual accounts are specialized accounts with specific purposes when connecting assets.", "VirtualAccountHelpMsg": "Virtual accounts are specialized accounts with specific purposes when connecting assets.",
"VirtualAccountUpdate": "Virtual account update", "VirtualAccountUpdate": "Virtual account update",
"VirtualAccounts": "Virtual accounts", "VirtualAccounts": "Virtual accounts",
"VirtualApp": "Virtual app", "VirtualApp": "Virtual App",
"VirtualAppDetail": "Virtual app details", "VirtualAppDetail": "Virtual app details",
"VirtualApps": "Virtual app", "VirtualApps": "VApp",
"Volcengine": "Volcengine", "Volcengine": "Volcengine",
"Warning": "Warning", "Warning": "Warning",
"WeCom": "Wecom", "WeCom": "Wecom",

View File

@ -19,7 +19,7 @@ class AnnouncementSerializer(serializers.Serializer):
CONTENT = serializers.CharField(label=_("Content")) CONTENT = serializers.CharField(label=_("Content"))
LINK = serializers.URLField( LINK = serializers.URLField(
required=False, allow_null=True, allow_blank=True, required=False, allow_null=True, allow_blank=True,
label=_("More URL"), default='', label=_("More Link"), default='',
) )
def to_representation(self, instance): def to_representation(self, instance):
@ -57,12 +57,13 @@ class VaultSettingSerializer(serializers.Serializer):
HISTORY_ACCOUNT_CLEAN_LIMIT = serializers.IntegerField( HISTORY_ACCOUNT_CLEAN_LIMIT = serializers.IntegerField(
default=999, max_value=999, min_value=1, default=999, max_value=999, min_value=1,
required=False, label=_('Historical accounts retained count'), required=False, label=_('Record limit'),
help_text=_( 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: ' 'the system will automatically perform a task every night: '
'check and delete historical accounts that exceed the predetermined number. ' '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') required=False, label=_('Chat AI')
) )
GPT_BASE_URL = serializers.CharField( 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( GPT_API_KEY = EncryptedField(
allow_blank=True, required=False, label=_('API Key'), allow_blank=True, required=False, label=_('API Key'),
) )
GPT_PROXY = serializers.CharField( 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( GPT_MODEL = serializers.ChoiceField(
default='', choices=GPT_MODEL_CHOICES, label=_("GPT Model"), required=False, default='', choices=GPT_MODEL_CHOICES, label=_("GPT Model"), required=False,
@ -108,15 +111,19 @@ class ChatAISettingSerializer(serializers.Serializer):
class TicketSettingSerializer(serializers.Serializer): class TicketSettingSerializer(serializers.Serializer):
PREFIX_TITLE = _('Ticket') PREFIX_TITLE = _('Ticket')
TICKETS_ENABLED = serializers.BooleanField(required=False, default=True, label=_("Enable tickets")) TICKETS_ENABLED = serializers.BooleanField(required=False, default=True, label=_("Ticket"))
TICKETS_DIRECT_APPROVE = serializers.BooleanField(required=False, default=False, label=_("No login approval")) 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( TICKET_AUTHORIZE_DEFAULT_TIME = serializers.IntegerField(
min_value=1, max_value=999999, required=False, 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( TICKET_AUTHORIZE_DEFAULT_TIME_UNIT = serializers.ChoiceField(
choices=[('day', _("day")), ('hour', _("hour"))], 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') PREFIX_TITLE = _('Feature')
SECURITY_COMMAND_EXECUTION = serializers.BooleanField( SECURITY_COMMAND_EXECUTION = serializers.BooleanField(
required=False, label=_('Job center'), required=False, label=_('Adhoc'),
help_text=_('Allow user run batch command or not using ansible') help_text=_('Allow users to execute batch commands in the Workbench - Job Center - Adhoc')
) )
SECURITY_COMMAND_BLACKLIST = serializers.ListField( SECURITY_COMMAND_BLACKLIST = serializers.ListField(
child=serializers.CharField(max_length=1024, ), child=serializers.CharField(max_length=1024, ),
label=_('Command blacklist'), 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') PREFIX_TITLE = _('Virtual app')
VIRTUAL_APP_ENABLED = serializers.BooleanField( 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.'
)
) )