]> source.dussan.org Git - gitea.git/commitdiff
Fix wrong i18n keys (#17150) (#17153)
author6543 <6543@obermui.de>
Sun, 26 Sep 2021 00:25:12 +0000 (02:25 +0200)
committerGitHub <noreply@github.com>
Sun, 26 Sep 2021 00:25:12 +0000 (08:25 +0800)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
routers/web/user/setting/keys.go
routers/web/user/setting/security_twofa.go

index d875d84a7603f3ad46857402e4a4acb65821a884..e87ee1dabfab219a30df107e117ddefab1f963eb 100644 (file)
@@ -208,7 +208,7 @@ func DeleteKey(ctx *context.Context) {
                        return
                }
                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")
                        return
                }
index 7b08a05939b30129b89d4c7dc6886029784e0db3..b2530f52fe6ea12fd917d656c5764425deb5763a 100644 (file)
@@ -32,7 +32,7 @@ func RegenerateScratchTwoFactor(ctx *context.Context) {
        t, err := models.GetTwoFactorByUID(ctx.User.ID)
        if err != nil {
                if models.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.ServerError("SettingsTwoFactor: Failed to GetTwoFactorByUID", err)
@@ -62,7 +62,7 @@ func DisableTwoFactor(ctx *context.Context) {
        t, err := models.GetTwoFactorByUID(ctx.User.ID)
        if err != nil {
                if models.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.ServerError("SettingsTwoFactor: Failed to GetTwoFactorByUID", err)
@@ -150,7 +150,7 @@ func EnrollTwoFactor(ctx *context.Context) {
        if t != nil {
                // already enrolled - we should redirect back!
                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")
                return
        }
@@ -175,7 +175,7 @@ func EnrollTwoFactorPost(ctx *context.Context) {
        t, err := models.GetTwoFactorByUID(ctx.User.ID)
        if t != nil {
                // 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")
                return
        }