Fix wrong i18n keys (#17150)

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Lunny Xiao 2021-09-25 22:27:01 +08:00 committed by GitHub
parent 91e21d4fca
commit 58d81835e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -209,7 +209,7 @@ func DeleteKey(ctx *context.Context) {
return return
} }
if external { if external {
ctx.Flash.Error(ctx.Tr("setting.ssh_externally_managed")) ctx.Flash.Error(ctx.Tr("settings.ssh_externally_managed"))
ctx.Redirect(setting.AppSubURL + "/user/settings/keys") ctx.Redirect(setting.AppSubURL + "/user/settings/keys")
return return
} }

View File

@ -32,7 +32,7 @@ func RegenerateScratchTwoFactor(ctx *context.Context) {
t, err := login.GetTwoFactorByUID(ctx.User.ID) t, err := login.GetTwoFactorByUID(ctx.User.ID)
if err != nil { if err != nil {
if login.IsErrTwoFactorNotEnrolled(err) { if login.IsErrTwoFactorNotEnrolled(err) {
ctx.Flash.Error(ctx.Tr("setting.twofa_not_enrolled")) ctx.Flash.Error(ctx.Tr("settings.twofa_not_enrolled"))
ctx.Redirect(setting.AppSubURL + "/user/settings/security") ctx.Redirect(setting.AppSubURL + "/user/settings/security")
} }
ctx.ServerError("SettingsTwoFactor: Failed to GetTwoFactorByUID", err) ctx.ServerError("SettingsTwoFactor: Failed to GetTwoFactorByUID", err)
@ -62,7 +62,7 @@ func DisableTwoFactor(ctx *context.Context) {
t, err := login.GetTwoFactorByUID(ctx.User.ID) t, err := login.GetTwoFactorByUID(ctx.User.ID)
if err != nil { if err != nil {
if login.IsErrTwoFactorNotEnrolled(err) { if login.IsErrTwoFactorNotEnrolled(err) {
ctx.Flash.Error(ctx.Tr("setting.twofa_not_enrolled")) ctx.Flash.Error(ctx.Tr("settings.twofa_not_enrolled"))
ctx.Redirect(setting.AppSubURL + "/user/settings/security") ctx.Redirect(setting.AppSubURL + "/user/settings/security")
} }
ctx.ServerError("SettingsTwoFactor: Failed to GetTwoFactorByUID", err) ctx.ServerError("SettingsTwoFactor: Failed to GetTwoFactorByUID", err)
@ -150,7 +150,7 @@ func EnrollTwoFactor(ctx *context.Context) {
if t != nil { if t != nil {
// already enrolled - we should redirect back! // already enrolled - we should redirect back!
log.Warn("Trying to re-enroll %-v in twofa when already enrolled", ctx.User) log.Warn("Trying to re-enroll %-v in twofa when already enrolled", ctx.User)
ctx.Flash.Error(ctx.Tr("setting.twofa_is_enrolled")) ctx.Flash.Error(ctx.Tr("settings.twofa_is_enrolled"))
ctx.Redirect(setting.AppSubURL + "/user/settings/security") ctx.Redirect(setting.AppSubURL + "/user/settings/security")
return return
} }
@ -175,7 +175,7 @@ func EnrollTwoFactorPost(ctx *context.Context) {
t, err := login.GetTwoFactorByUID(ctx.User.ID) t, err := login.GetTwoFactorByUID(ctx.User.ID)
if t != nil { if t != nil {
// already enrolled // already enrolled
ctx.Flash.Error(ctx.Tr("setting.twofa_is_enrolled")) ctx.Flash.Error(ctx.Tr("settings.twofa_is_enrolled"))
ctx.Redirect(setting.AppSubURL + "/user/settings/security") ctx.Redirect(setting.AppSubURL + "/user/settings/security")
return return
} }