mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-25 06:42:49 +00:00
perf: translate some word
This commit is contained in:
@@ -31,7 +31,7 @@ class UserLoginForm(forms.Form):
|
||||
auto_login = forms.BooleanField(
|
||||
required=False, initial=False,
|
||||
widget=forms.CheckboxInput(),
|
||||
label=_('Auto login next')
|
||||
label=_('Auto-login')
|
||||
)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
@@ -215,13 +215,7 @@
|
||||
}
|
||||
|
||||
.auto-login input[type=checkbox] {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin-top: 0;
|
||||
vertical-align: middle;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
.error-info {
|
||||
|
@@ -25,6 +25,7 @@ from django.views.generic.base import TemplateView, RedirectView
|
||||
from django.views.generic.edit import FormView
|
||||
|
||||
from common.utils import FlashMessageUtil, static_or_direct, safe_next_url
|
||||
from common.const import Language
|
||||
from users.utils import (
|
||||
redirect_user_first_login_or_index
|
||||
)
|
||||
@@ -116,21 +117,10 @@ class UserLoginContextMixin:
|
||||
def get_support_langs():
|
||||
langs = [
|
||||
{
|
||||
'title': '中文(简体)',
|
||||
'code': 'zh-hans'
|
||||
},
|
||||
{
|
||||
'title': '中文(繁體)',
|
||||
'code': 'zh-hant'
|
||||
},
|
||||
{
|
||||
'title': 'English',
|
||||
'code': 'en'
|
||||
},
|
||||
{
|
||||
'title': '日本語',
|
||||
'code': 'ja'
|
||||
'title': title,
|
||||
'code': code
|
||||
}
|
||||
for code, title in Language.choices
|
||||
]
|
||||
return langs
|
||||
|
||||
@@ -338,7 +328,6 @@ class UserLoginGuardView(mixins.AuthMixin, RedirectView):
|
||||
self.check_user_mfa_if_need(user)
|
||||
self.check_user_login_confirm_if_need(user)
|
||||
except (errors.CredentialError, errors.SessionEmptyError) as e:
|
||||
print("Error: ", e)
|
||||
return self.format_redirect_url(self.login_url)
|
||||
except errors.MFARequiredError:
|
||||
return self.format_redirect_url(self.login_mfa_url)
|
||||
|
Reference in New Issue
Block a user