perf: i18n bai

pull/13283/head
Bai 6 months ago
parent 43215d27c5
commit a1e9382275

@ -12,6 +12,7 @@ def _find(attr):
def add_encrypted_field_set(label):
return
if label:
with translation.override('en'):
encrypted_field_set.add(str(label))

@ -3941,7 +3941,7 @@ msgstr ""
#: jumpserver/context_processor.py:14
msgid "JumpServer Open Source Bastion Host"
msgstr ""
msgstr "JumpServer"
#: jumpserver/views/celery_flower.py:22
msgid "<h1>Flower service unavailable, check it</h1>"
@ -5734,10 +5734,6 @@ msgstr ""
msgid "Virtual App"
msgstr ""
#: settings/serializers/feature.py:148
msgid "vApp"
msgstr ""
#: settings/serializers/feature.py:150
msgid ""
"Virtual applications, you can use the Linux operating system as an "
@ -6385,7 +6381,7 @@ msgstr ""
#: templates/_without_nav_base.html:26
msgid "Home page"
msgstr ""
msgstr "Home"
#: templates/resource_download.html:18 templates/resource_download.html:33
#: users/const.py:65

@ -5954,10 +5954,6 @@ msgstr "コマンドフィルタリング"
msgid "Virtual App"
msgstr "仮想アプリケーション"
#: settings/serializers/feature.py:148
msgid "vApp"
msgstr ""
#: settings/serializers/feature.py:150
msgid ""
"Virtual applications, you can use the Linux operating system as an "

@ -5824,10 +5824,6 @@ msgstr "作业中心命令黑名单"
msgid "Virtual App"
msgstr "虚拟应用"
#: settings/serializers/feature.py:148
msgid "vApp"
msgstr ""
#: settings/serializers/feature.py:150
msgid ""
"Virtual applications, you can use the Linux operating system as an "

@ -405,7 +405,7 @@
"DisplayName": "Name",
"Docs": "Document",
"Download": "Download",
"DownloadCenter": "Download center",
"DownloadCenter": "Download",
"DownloadFTPFileTip": "The current action does not record files, or the file size exceeds the threshold (default 100m), or it has not yet been saved to the corresponding storage",
"DownloadImportTemplateMsg": "Download creation template",
"DownloadReplay": "Download recording",

@ -624,6 +624,7 @@ class Config(dict):
'LOKI_LOG_ENABLED': False,
'LOKI_BASE_URL': 'http://loki:3100',
'TOOL_USER_ENABLED': False,
}
old_config_map = {

@ -238,3 +238,5 @@ ANSIBLE_RECEPTOR_TCP_LISTEN_ADDRESS = CONFIG.ANSIBLE_RECEPTOR_TCP_LISTEN_ADDRESS
LOKI_LOG_ENABLED = CONFIG.LOKI_LOG_ENABLED
LOKI_BASE_URL = CONFIG.LOKI_BASE_URL
TOOL_USER_ENABLED = CONFIG.TOOL_USER_ENABLED

@ -63,6 +63,7 @@ class SettingsApi(generics.RetrieveUpdateAPIView):
'ticket': serializers.TicketSettingSerializer,
'ops': serializers.OpsSettingSerializer,
'virtualapp': serializers.VirtualAppSerializer,
'tool': serializers.ToolSerializer,
}
rbac_category_permissions = {

@ -13,3 +13,4 @@ from .public import *
from .security import *
from .settings import *
from .terminal import *
from .tool import *

@ -145,7 +145,7 @@ class VirtualAppSerializer(serializers.Serializer):
PREFIX_TITLE = _('Virtual app')
VIRTUAL_APP_ENABLED = serializers.BooleanField(
required=False, label=_('vApp'),
required=False, label=_('Virtual App'),
help_text=_(
'Virtual applications, you can use the Linux operating system as an application server '
'in remote applications.'

@ -63,6 +63,7 @@ class PrivateSettingSerializer(PublicSettingSerializer):
GPT_MODEL = serializers.CharField()
FILE_UPLOAD_SIZE_LIMIT_MB = serializers.IntegerField()
LOKI_LOG_ENABLED = serializers.BooleanField()
TOOL_USER_ENABLED = serializers.BooleanField()
class ServerInfoSerializer(serializers.Serializer):

@ -0,0 +1,15 @@
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
__all__ = [
'ToolSerializer'
]
class ToolSerializer(serializers.Serializer):
PREFIX_TITLE = _('Tool')
TOOL_USER_ENABLED = serializers.BooleanField(
label=_('User tool'), default=True,
help_text=_("If enabled, users can utilize all tools in the workspace")
)

@ -176,7 +176,7 @@ class Applet(JMSBaseModel):
label_value = spec_label.label.value
matched = [host for host in hosts if host.name == label_value]
if matched:
return matched[0]
return random.choice(matched)
hosts = [h for h in hosts if h.auto_create_accounts]
prefer_key = self.host_prefer_key_tpl.format(user.id)

@ -8,7 +8,7 @@ from ...models import Preference
class BasicSerializer(serializers.Serializer):
has_secret_key = serializers.SerializerMethodField(
help_text=_(
'The password for file encryption, '
'*! The password for file encryption, '
'used for decryption when the system sends emails containing file attachments. '
'<br>'
'Such as: account backup files, account password change results files'
@ -43,4 +43,4 @@ class BasicSerializer(serializers.Serializer):
class LinaSerializer(serializers.Serializer):
basic = BasicSerializer(required=False, label=_('Basic'))
basic = BasicSerializer(required=False, label=_('File Encryption'))

Loading…
Cancel
Save