mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 07:57:21 +08:00
fix: 翻译错误
This commit is contained in:
@@ -157,7 +157,7 @@ func (r *userRepo) UpdateTwoFA(id uint, code, secret string) error {
|
||||
|
||||
// 保存前先验证一次,防止错误开启
|
||||
if secret != "" && !totp.Validate(code, secret) {
|
||||
return errors.New(r.t.Get("invalid 2fa code"))
|
||||
return errors.New(r.t.Get("invalid 2FA code"))
|
||||
}
|
||||
|
||||
user.TwoFA = secret
|
||||
@@ -175,7 +175,7 @@ func (r *userRepo) CheckTwoFA(id uint, code string) (bool, error) {
|
||||
}
|
||||
|
||||
if !totp.Validate(code, user.TwoFA) {
|
||||
return false, errors.New(r.t.Get("invalid 2fa code"))
|
||||
return false, errors.New(r.t.Get("invalid 2FA code"))
|
||||
}
|
||||
|
||||
return true, nil
|
||||
|
||||
@@ -93,7 +93,7 @@ func (s *UserService) Login(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
if user.TwoFA != "" {
|
||||
if !totp.Validate(req.PassCode, user.TwoFA) {
|
||||
Error(w, http.StatusForbidden, s.t.Get("invalid 2fa code"))
|
||||
Error(w, http.StatusForbidden, s.t.Get("invalid 2FA code"))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ const columns: any = [
|
||||
}
|
||||
},
|
||||
{
|
||||
default: () => $gettext('Access Token'),
|
||||
default: () => $gettext('Access Tokens'),
|
||||
icon: renderIcon('material-symbols:edit-outline', { size: 14 })
|
||||
}
|
||||
),
|
||||
|
||||
@@ -66,7 +66,7 @@ const columns: any = [
|
||||
}
|
||||
},
|
||||
{
|
||||
default: () => $gettext('Change'),
|
||||
default: () => $gettext('Modify'),
|
||||
icon: renderIcon('material-symbols:edit-outline', { size: 14 })
|
||||
}
|
||||
),
|
||||
@@ -142,7 +142,7 @@ const handleCreate = () => {
|
||||
{
|
||||
default: () =>
|
||||
$gettext(
|
||||
'Token is only displayed once, please save it before closing the dialog'
|
||||
'Token is only displayed once, please save it before closing the dialog.'
|
||||
)
|
||||
}
|
||||
),
|
||||
@@ -201,7 +201,7 @@ watch(
|
||||
<n-modal
|
||||
v-model:show="show"
|
||||
preset="card"
|
||||
:title="$gettext('Access Token')"
|
||||
:title="$gettext('Access Tokens')"
|
||||
style="width: 60vw"
|
||||
size="huge"
|
||||
:bordered="false"
|
||||
@@ -272,7 +272,7 @@ watch(
|
||||
<n-modal
|
||||
v-model:show="updateModal"
|
||||
preset="card"
|
||||
:title="$gettext('Update Access Token')"
|
||||
:title="$gettext('Modify Access Token')"
|
||||
style="width: 60vw"
|
||||
size="huge"
|
||||
:bordered="false"
|
||||
|
||||
Reference in New Issue
Block a user