Skip to content

Commit 58d8183

Browse files
lunny6543
andauthored
Fix wrong i18n keys (#17150)
Co-authored-by: 6543 <[email protected]>
1 parent 91e21d4 commit 58d8183

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

routers/web/user/setting/keys.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func DeleteKey(ctx *context.Context) {
209209
return
210210
}
211211
if external {
212-
ctx.Flash.Error(ctx.Tr("setting.ssh_externally_managed"))
212+
ctx.Flash.Error(ctx.Tr("settings.ssh_externally_managed"))
213213
ctx.Redirect(setting.AppSubURL + "/user/settings/keys")
214214
return
215215
}

routers/web/user/setting/security_twofa.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func RegenerateScratchTwoFactor(ctx *context.Context) {
3232
t, err := login.GetTwoFactorByUID(ctx.User.ID)
3333
if err != nil {
3434
if login.IsErrTwoFactorNotEnrolled(err) {
35-
ctx.Flash.Error(ctx.Tr("setting.twofa_not_enrolled"))
35+
ctx.Flash.Error(ctx.Tr("settings.twofa_not_enrolled"))
3636
ctx.Redirect(setting.AppSubURL + "/user/settings/security")
3737
}
3838
ctx.ServerError("SettingsTwoFactor: Failed to GetTwoFactorByUID", err)
@@ -62,7 +62,7 @@ func DisableTwoFactor(ctx *context.Context) {
6262
t, err := login.GetTwoFactorByUID(ctx.User.ID)
6363
if err != nil {
6464
if login.IsErrTwoFactorNotEnrolled(err) {
65-
ctx.Flash.Error(ctx.Tr("setting.twofa_not_enrolled"))
65+
ctx.Flash.Error(ctx.Tr("settings.twofa_not_enrolled"))
6666
ctx.Redirect(setting.AppSubURL + "/user/settings/security")
6767
}
6868
ctx.ServerError("SettingsTwoFactor: Failed to GetTwoFactorByUID", err)
@@ -150,7 +150,7 @@ func EnrollTwoFactor(ctx *context.Context) {
150150
if t != nil {
151151
// already enrolled - we should redirect back!
152152
log.Warn("Trying to re-enroll %-v in twofa when already enrolled", ctx.User)
153-
ctx.Flash.Error(ctx.Tr("setting.twofa_is_enrolled"))
153+
ctx.Flash.Error(ctx.Tr("settings.twofa_is_enrolled"))
154154
ctx.Redirect(setting.AppSubURL + "/user/settings/security")
155155
return
156156
}
@@ -175,7 +175,7 @@ func EnrollTwoFactorPost(ctx *context.Context) {
175175
t, err := login.GetTwoFactorByUID(ctx.User.ID)
176176
if t != nil {
177177
// already enrolled
178-
ctx.Flash.Error(ctx.Tr("setting.twofa_is_enrolled"))
178+
ctx.Flash.Error(ctx.Tr("settings.twofa_is_enrolled"))
179179
ctx.Redirect(setting.AppSubURL + "/user/settings/security")
180180
return
181181
}

0 commit comments

Comments
 (0)