Merge pull request #11240 from jumpserver/pr@dev@perf_i18n

perf: 修改翻译
pull/11242/head
老广 2023-08-10 12:22:31 +08:00 committed by GitHub
commit 259daaab38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 613 additions and 531 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:555045fe297b59d9a9f813738679419f34ae9296013f4576ee1e0037985c0f1c
size 152487
oid sha256:50d8a03cc8991f92c9e649b4eb1685a9bc862671e013a11ba7683a1b7fcd0ae4
size 152899

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:6a49d0a2a96656a3f98a0d13f64d426be5f60110ef629bed8d871c6525c16d82
size 124739
oid sha256:7ece6510d9392a16daca6d2729518ed6cf5df3a8c40c6e9e7881207df72a326b
size 125537

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,39 @@
# Generated by Django 4.1.10 on 2023-08-10 02:36
import common.db.encoder
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ops', '0025_auto_20230413_1531'),
]
operations = [
migrations.AlterField(
model_name='adhoc',
name='module',
field=models.CharField(choices=[('shell', 'Shell'), ('win_shell', 'Powershell'), ('python', 'Python'), ('mysql', 'MySQL'), ('postgresql', 'PostgreSQL'), ('sqlserver', 'SQLServer')], default='shell', max_length=128, verbose_name='Module'),
),
migrations.AlterField(
model_name='historicaljob',
name='module',
field=models.CharField(choices=[('shell', 'Shell'), ('win_shell', 'Powershell'), ('python', 'Python'), ('mysql', 'MySQL'), ('postgresql', 'PostgreSQL'), ('sqlserver', 'SQLServer')], default='shell', max_length=128, null=True, verbose_name='Module'),
),
migrations.AlterField(
model_name='job',
name='module',
field=models.CharField(choices=[('shell', 'Shell'), ('win_shell', 'Powershell'), ('python', 'Python'), ('mysql', 'MySQL'), ('postgresql', 'PostgreSQL'), ('sqlserver', 'SQLServer')], default='shell', max_length=128, null=True, verbose_name='Module'),
),
migrations.AlterField(
model_name='jobexecution',
name='result',
field=models.JSONField(blank=True, encoder=common.db.encoder.ModelJSONFieldEncoder, null=True, verbose_name='Result'),
),
migrations.AlterField(
model_name='jobexecution',
name='summary',
field=models.JSONField(default=dict, encoder=common.db.encoder.ModelJSONFieldEncoder, verbose_name='Summary'),
),
]

View File

@ -36,7 +36,7 @@ login_ip_limit_time_help_text = _(
class SecurityAuthSerializer(serializers.Serializer):
SECURITY_MFA_AUTH = serializers.ChoiceField(
choices=(
[0, _('Disable')],
[0, _('Not enabled')],
[1, _('All users')],
[2, _('Only admin users')],
),

View File

@ -0,0 +1,27 @@
# Generated by Django 4.1.10 on 2023-08-10 02:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('terminal', '0065_session_command_amount'),
]
operations = [
migrations.RemoveField(
model_name='applet',
name='edition',
),
migrations.AddField(
model_name='applet',
name='enterprise',
field=models.BooleanField(default=False, verbose_name='Enterprise'),
),
migrations.AlterField(
model_name='task',
name='name',
field=models.CharField(choices=[('kill_session', 'Kill Session'), ('lock_session', 'Lock Session'), ('unlock_session', 'Unlock Session')], max_length=128, verbose_name='Name'),
),
]

View File

@ -33,8 +33,7 @@ class Applet(JMSBaseModel):
display_name = models.CharField(max_length=128, verbose_name=_('Display name'))
version = models.CharField(max_length=16, verbose_name=_('Version'))
author = models.CharField(max_length=128, verbose_name=_('Author'))
edition = models.CharField(max_length=128, choices=Edition.choices, default=Edition.community,
verbose_name=_('Edition'))
enterprise = models.BooleanField(default=False, verbose_name=_('Enterprise'))
type = models.CharField(max_length=16, verbose_name=_('Type'), default='general', choices=Type.choices)
is_active = models.BooleanField(default=True, verbose_name=_('Is active'))
builtin = models.BooleanField(default=False, verbose_name=_('Builtin'))

View File

@ -27,8 +27,6 @@ class AppletPublicationSerializer(serializers.ModelSerializer):
class AppletSerializer(serializers.ModelSerializer):
icon = serializers.ReadOnlyField(label=_("Icon"))
type = LabeledChoiceField(choices=Applet.Type.choices, label=_("Type"))
edition = LabeledChoiceField(choices=Applet.Edition.choices, label=_("Edition"), required=False,
default=Applet.Edition.community)
class Meta:
model = Applet
@ -37,6 +35,6 @@ class AppletSerializer(serializers.ModelSerializer):
'icon', 'readme', 'date_created', 'date_updated',
]
fields = fields_mini + [
'version', 'author', 'type', 'edition',
'version', 'author', 'type', 'enterprise',
'can_concurrent', 'protocols', 'tags', 'comment',
] + read_only_fields