perf: i18n

pull/13188/head
wangruidong 2024-05-09 16:47:57 +08:00 committed by w940853815
parent 8bad88e798
commit 83835747c5
11 changed files with 44 additions and 41 deletions

View File

@ -4,7 +4,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('audits', '0010_auto_20200811_1122'),
]
@ -13,6 +12,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='userloginlog',
name='backend',
field=models.CharField(default='', max_length=32, verbose_name='Authentication backend'),
field=models.CharField(default='', max_length=32, verbose_name='Auth backend'),
),
]

View File

@ -8,7 +8,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('audits', '0023_auto_20230906_1322'),
@ -23,11 +22,14 @@ class Migration(migrations.Migration):
('key', models.CharField(max_length=128, verbose_name='Session key')),
('city', models.CharField(blank=True, max_length=254, null=True, verbose_name='Login city')),
('user_agent', models.CharField(blank=True, max_length=254, null=True, verbose_name='User agent')),
('type', models.CharField(choices=[('W', 'Web'), ('T', 'Terminal'), ('U', 'Unknown')], max_length=2, verbose_name='Login type')),
('backend', models.CharField(default='', max_length=32, verbose_name='Authentication backend')),
('type', models.CharField(choices=[('W', 'Web'), ('T', 'Terminal'), ('U', 'Unknown')], max_length=2,
verbose_name='Login type')),
('backend', models.CharField(default='', max_length=32, verbose_name='Auth backend')),
('date_created', models.DateTimeField(blank=True, null=True, verbose_name='Date created')),
('date_expired', models.DateTimeField(blank=True, db_index=True, null=True, verbose_name='Date expired')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sessions', to=settings.AUTH_USER_MODEL, verbose_name='User')),
('date_expired',
models.DateTimeField(blank=True, db_index=True, null=True, verbose_name='Date expired')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sessions',
to=settings.AUTH_USER_MODEL, verbose_name='User')),
],
options={
'verbose_name': 'User session',

View File

@ -209,7 +209,7 @@ class UserLoginLog(models.Model):
)
datetime = models.DateTimeField(default=timezone.now, verbose_name=_("Login Date"), db_index=True)
backend = models.CharField(
max_length=32, default="", verbose_name=_("Authentication backend")
max_length=32, default="", verbose_name=_("Auth backend")
)
def __str__(self):
@ -263,7 +263,7 @@ class UserSession(models.Model):
city = models.CharField(max_length=254, blank=True, null=True, verbose_name=_("Login city"))
user_agent = models.CharField(max_length=254, blank=True, null=True, verbose_name=_("User agent"))
type = models.CharField(choices=LoginTypeChoices.choices, max_length=2, verbose_name=_("Login type"))
backend = models.CharField(max_length=32, default="", verbose_name=_("Authentication backend"))
backend = models.CharField(max_length=32, default="", verbose_name=_("Auth backend"))
date_created = models.DateTimeField(null=True, blank=True, verbose_name=_('Date created'))
user = models.ForeignKey(
'users.User', verbose_name=_('User'), related_name='sessions', on_delete=models.CASCADE

View File

@ -67,7 +67,7 @@ class UserLoginLogSerializer(serializers.ModelSerializer):
extra_kwargs = {
"user_agent": {"label": _("User agent")},
"reason_display": {"label": _("Reason display")},
"backend_display": {"label": _("Authentication backend")},
"backend_display": {"label": _("Auth backend display")},
}
@ -181,7 +181,7 @@ class UserSessionSerializer(serializers.ModelSerializer):
]
fields = fields_small
extra_kwargs = {
"backend_display": {"label": _("Authentication backend")},
"backend_display": {"label": _("Auth backend display")},
}
def get_is_current_user_session(self, obj):

View File

@ -2551,7 +2551,7 @@ msgstr ""
#: audits/models.py:212 audits/models.py:266 audits/serializers.py:70
#: audits/serializers.py:184
msgid "Authentication backend"
msgid "Auth backend"
msgstr ""
#: audits/models.py:256
@ -6628,7 +6628,7 @@ msgid "Can download session replay"
msgstr ""
#: terminal/models/session/session.py:34
msgid "Account id"
msgid "Account ID"
msgstr ""
#: terminal/models/session/session.py:36 terminal/models/session/sharing.py:118

View File

@ -2676,7 +2676,7 @@ msgstr "日付ログイン"
#: audits/models.py:212 audits/models.py:266 audits/serializers.py:70
#: audits/serializers.py:184
msgid "Authentication backend"
msgid "Auth backend"
msgstr "認証バックエンド"
#: audits/models.py:256
@ -7027,7 +7027,7 @@ msgid "Can download session replay"
msgstr "セッション再生をダウンロードできます"
#: terminal/models/session/session.py:35
msgid "Account id"
msgid "Account ID"
msgstr "アカウント ID"
#: terminal/models/session/session.py:37 terminal/models/session/sharing.py:118

View File

@ -2627,7 +2627,7 @@ msgstr "登录日期"
#: audits/models.py:212 audits/models.py:266 audits/serializers.py:70
#: audits/serializers.py:184
msgid "Authentication backend"
msgid "Auth backend"
msgstr "认证方式"
#: audits/models.py:256
@ -6812,7 +6812,7 @@ msgid "Can download session replay"
msgstr "可以下载会话录像"
#: terminal/models/session/session.py:35
msgid "Account id"
msgid "Account ID"
msgstr "账号 ID"
#: terminal/models/session/session.py:37 terminal/models/session/sharing.py:118

View File

@ -58,19 +58,19 @@
"AddAssetToThisPermission": "Add Assets",
"AddInDetailText": "After successful creation or update, add to the details",
"AddNode": "Add Node",
"AddNodeToThisPermission": "Add Node",
"AddNodeToThisPermission": "Add Nodes",
"AddPassKey": "Add Passkey",
"AddRolePermissions": "Add permissions to the details after successful creation/update",
"AddSuccessMsg": "Add Successful",
"AddUserGroupToThisPermission": "Add User Group",
"AddUserToThisPermission": "Add User",
"AddUserGroupToThisPermission": "Add User Groups",
"AddUserToThisPermission": "Add Users",
"Address": "Address",
"Addressee": "Recipient",
"AdhocDetail": "Command Details",
"AdhocManage": "Command",
"AdhocUpdate": "Update the Command",
"Advanced": "Advanced Settings",
"AfterChange": "After Changes",
"AfterChange": "After Change",
"AjaxError404": "404 Request Error",
"AlibabaCloud": "Alibaba Cloud",
"Aliyun": "Alibaba Cloud",
@ -83,7 +83,7 @@
"AllUser": "All users",
"AllowInvalidCert": "Ignore certificate check",
"Announcement": "Announcement",
"AnonymousAccount": "Anonymous account",
"AnonymousAccount": "Anonymous accounts",
"AnonymousAccountTip": "Connect to Assets Without Using Username and Password, Only Support Web Type and Custom Type Assets",
"ApiKey": "API Key",
"ApiKeyList": "Authenticate via Api key in the header of each request, which differs from one request to another, offering greater security than Token method. Please consult the documentation for usage.<br>To minimize the risk of leaks, the Secret can only be viewed upon creation, and each user can create up to 10",
@ -350,14 +350,14 @@
"DateExpired": "Expiration Date",
"DateFinished": "Completion Date",
"DateJoined": "Creation Date",
"DateLast24Hours": "Last Day",
"DateLast3Months": "Quarter of Year",
"DateLastHarfYear": "Half of Year",
"DateLast24Hours": "Last day",
"DateLast3Months": "Last 3 months",
"DateLastHarfYear": "Last 6 months",
"DateLastLogin": "Last Login Date",
"DateLastMonth": "Last Month",
"DateLastMonth": "Last month",
"DateLastSync": "Last synchronization date",
"DateLastWeek": "Last Week",
"DateLastYear": "Last Year",
"DateLastWeek": "Last week",
"DateLastYear": "Last year",
"DatePasswordLastUpdated": "Last Password Update Date",
"DateStart": "Start Date",
"DateSync": "Sync Date",
@ -573,7 +573,7 @@
"IsAlwaysUpdate": "Keeping Assets Up to Date",
"IsAlwaysUpdateHelpTip": "Whether to synchronize and update asset information, including hostname, IP, platform, domain, node, etc. each time a synchronization task is performed",
"IsFinished": "Is It Done",
"IsLocked": "Suspend?",
"IsLocked": "Suspend",
"IsSuccess": "Success",
"IsSyncAccountHelpText": "Upon Collection Completion, the Collected Account Will Be Synced to Asset",
"IsSyncAccountLabel": "Sync to Assets",
@ -648,7 +648,7 @@
"MFAOfUserFirstLoginUserGuidePage": "In order to protect your and the company's security, please carefully safeguard important sensitive information such as your account, password, and key (for example, set a complex password, and enable multi-factor authentication) <br/> Personal information such as email, mobile number, and WeChat are only used for user authentication and platform internal message notifications.",
"MailRecipient": "Email Recipient",
"MailSend": "Sending",
"ManualAccount": "Manual account",
"ManualAccount": "Manual accounts",
"ManualAccountTip": "Manual input of Username/Password upon Login",
"ManualExecute": "Manual execution",
"ManyChoose": "Select Multiple",
@ -776,7 +776,7 @@
"Pause": "Pause",
"PauseTaskSendSuccessMsg": "Task Pausing Issued, Please Refresh and Check Later",
"Pending": "Pending",
"PermAccount": "Authorized Account",
"PermAccount": "Authorized Accounts",
"PermUserList": "Authorized Users",
"PermissionCompany": "Authorized Companies",
"PermissionName": "Authorization Rule Name",
@ -945,7 +945,7 @@
"SSHPort": "SSH Port",
"SSHSecretKey": "SSH Key",
"SafeCommand": "Secure Command",
"SameAccount": "Same account",
"SameAccount": "Same accounts",
"SameAccountTip": "Accounts with the Same Username as Authorized Users",
"SameTypeAccountTip": "An account with the same username and key type already exists",
"Saturday": "Sat",
@ -1229,7 +1229,7 @@
"UsernamePlaceholder": "Please Enter Username",
"Users": "User",
"UsersAmount": "User",
"UsersAndUserGroups": "User/User Group",
"UsersAndUserGroups": "Users/User Groups",
"UsersTotal": "Total accounts",
"Valid": "Valid",
"Variable": "Variable",

View File

@ -2583,7 +2583,7 @@ msgstr "登錄日期"
#: audits/models.py:212 audits/models.py:266 audits/serializers.py:70
#: audits/serializers.py:184
msgid "Authentication backend"
msgid "Auth backend"
msgstr "認證方式"
#: audits/models.py:256
@ -6852,7 +6852,7 @@ msgid "Can download session replay"
msgstr "可以下載會話錄影"
#: terminal/models/session/session.py:35
msgid "Account id"
msgid "Account ID"
msgstr "帳號 ID"
#: terminal/models/session/session.py:37 terminal/models/session/sharing.py:118

View File

@ -32,7 +32,7 @@ class Session(OrgModelMixin):
asset = models.CharField(max_length=128, verbose_name=_("Asset"), db_index=True)
asset_id = models.CharField(blank=True, default='', max_length=36, db_index=True)
account = models.CharField(max_length=128, verbose_name=_("Account"), db_index=True)
account_id = models.CharField(max_length=128, verbose_name=_("Account id"), db_index=True)
account_id = models.CharField(max_length=128, verbose_name=_("Account ID"), db_index=True)
protocol = models.CharField(default='ssh', max_length=16, db_index=True)
login_from = models.CharField(max_length=2, choices=LOGIN_FROM.choices, default="ST", verbose_name=_("Login from"))
type = models.CharField(max_length=16, default='normal', db_index=True)

View File

@ -8,7 +8,6 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0043_remove_user_secret_key_preference'),
]
@ -22,11 +21,14 @@ class Migration(migrations.Migration):
('key', models.CharField(max_length=128, verbose_name='Session key')),
('city', models.CharField(blank=True, max_length=254, null=True, verbose_name='Login city')),
('user_agent', models.CharField(blank=True, max_length=254, null=True, verbose_name='User agent')),
('type', models.CharField(choices=[('W', 'Web'), ('T', 'Terminal'), ('U', 'Unknown')], max_length=2, verbose_name='Login type')),
('backend', models.CharField(default='', max_length=32, verbose_name='Authentication backend')),
('type', models.CharField(choices=[('W', 'Web'), ('T', 'Terminal'), ('U', 'Unknown')], max_length=2,
verbose_name='Login type')),
('backend', models.CharField(default='', max_length=32, verbose_name='Auth backend')),
('date_created', models.DateTimeField(blank=True, null=True, verbose_name='Date created')),
('date_expired', models.DateTimeField(blank=True, db_index=True, null=True, verbose_name='Date expired')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sessions', to=settings.AUTH_USER_MODEL, verbose_name='User')),
('date_expired',
models.DateTimeField(blank=True, db_index=True, null=True, verbose_name='Date expired')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sessions',
to=settings.AUTH_USER_MODEL, verbose_name='User')),
],
options={
'verbose_name': 'User session',