perf: Translate

pull/14012/head
wangruidong 2024-08-20 14:37:46 +08:00 committed by Bryan
parent 06aaf9e3d0
commit e46da9d741
12 changed files with 656 additions and 578 deletions

View File

@ -53,7 +53,8 @@ class Account(AbsConnectivity, LabeledMixin, BaseAccount):
on_delete=models.SET_NULL, verbose_name=_("Su from")
)
version = models.IntegerField(default=0, verbose_name=_('Version'))
history = AccountHistoricalRecords(included_fields=['id', '_secret', 'secret_type', 'version'])
history = AccountHistoricalRecords(included_fields=['id', '_secret', 'secret_type', 'version'],
verbose_name=_("historical Account"))
source = models.CharField(max_length=30, default=Source.LOCAL, verbose_name=_('Source'))
source_id = models.CharField(max_length=128, null=True, blank=True, verbose_name=_('Source ID'))

View File

@ -57,6 +57,9 @@ class OperateLogStore(object):
@classmethod
def convert_diff_friendly(cls, op_log):
diff_list = list()
# 标记翻译字符串
labels = _("labels")
operate_log_id = _("operate_log_id")
handler = cls._get_special_handler(op_log.resource_type)
for k, v in op_log.diff.items():
before, after = v.split(cls.SEP, 1)

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1b4d68932f593f0783a9b091c41d7d26ca3f61cb64ab29317a1392e6da3ebe84
size 178369
oid sha256:607f8df8c6cea454283e0bc371db3be0c81f7cfa981a5f00c20b5be139e16aac
size 178618

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8e2fbd8872d5ab2d503d98222b03e8f2177fe93aa07c90fdf624b7c0b6a5da5d
size 145926
oid sha256:fb60a2ebb525e5aaa2d2c64fb4956fcc56f1b608a6dfb186513e743e226af261
size 146172

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5094c79a6b828406dd63a963871bfffa70e31cd13b9d301412b3dc7b8810d2f0
size 146037
oid sha256:4aaedb4c31b1d11ddf63e5d0a27958ee5d42e78e2ce255746b8134d18ffc990f
size 146283

File diff suppressed because it is too large Load Diff

View File

@ -14,6 +14,10 @@ from .auth import (
)
from .basic import BasicSettingSerializer
from .cleaning import CleaningSerializer
from .feature import (
AnnouncementSettingSerializer, OpsSettingSerializer, VaultSettingSerializer,
TicketSettingSerializer, ChatAISettingSerializer, VirtualAppSerializer
)
from .msg import EmailSettingSerializer, EmailContentSettingSerializer
from .other import OtherSettingSerializer
from .security import SecuritySettingSerializer
@ -90,7 +94,13 @@ class SettingsSerializer(
TencentSMSSettingSerializer,
CMPP2SMSSettingSerializer,
CustomSMSSettingSerializer,
PasskeySettingSerializer
PasskeySettingSerializer,
ChatAISettingSerializer,
AnnouncementSettingSerializer,
OpsSettingSerializer,
VaultSettingSerializer,
TicketSettingSerializer,
VirtualAppSerializer,
):
PREFIX_TITLE = _('Setting')
CACHE_KEY = 'SETTING_FIELDS_MAPPING'

View File

@ -70,6 +70,7 @@ class Migration(migrations.Migration):
to='terminal.applethost', verbose_name='Host')),
],
options={
'verbose_name': 'Applet publication',
'unique_together': {('applet', 'host')},
},
),
@ -91,6 +92,7 @@ class Migration(migrations.Migration):
verbose_name='Hosting')),
],
options={
'verbose_name': 'Applet host deployment',
'ordering': ('-date_start',),
},
),
@ -115,11 +117,13 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='appletpublication',
name='applet',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='publications', to='terminal.applet', verbose_name='Applet'),
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='publications',
to='terminal.applet', verbose_name='Applet'),
),
migrations.AlterField(
model_name='appletpublication',
name='host',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='publications', to='terminal.applethost', verbose_name='Host'),
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='publications',
to='terminal.applethost', verbose_name='Host'),
),
]

View File

@ -333,3 +333,4 @@ class AppletPublication(JMSBaseModel):
class Meta:
unique_together = ('applet', 'host')
verbose_name = _("Applet publication")

View File

@ -145,6 +145,7 @@ class AppletHostDeployment(JMSBaseModel):
class Meta:
ordering = ('-date_start',)
verbose_name = _("Applet host deployment")
def start(self, **kwargs):
# 重新初始化部署applet host 关联的终端需要删除