]> source.dussan.org Git - gitea.git/commitdiff
Fix wrong i18n keys (#17150)
authorLunny Xiao <xiaolunwen@gmail.com>
Sat, 25 Sep 2021 14:27:01 +0000 (22:27 +0800)
committerGitHub <noreply@github.com>
Sat, 25 Sep 2021 14:27:01 +0000 (16:27 +0200)
Co-authored-by: 6543 <6543@obermui.de>
routers/web/user/setting/keys.go
routers/web/user/setting/security_twofa.go

index bb7a50841bb8a5771ce207b772052d45acdba5b0..22a0fe474171fc5c1663cafe63cf19a82d8ababe 100644 (file)
@@ -209,7 +209,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 5b1cbab17fe74a31e58964fcfc53998351f60e9d..94f975f9fe6f8de5638c65dc656e7490289785b9 100644 (file)
@@ -32,7 +32,7 @@ func RegenerateScratchTwoFactor(ctx *context.Context) {
        t, err := login.GetTwoFactorByUID(ctx.User.ID)
        if err != nil {
                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.ServerError("SettingsTwoFactor: Failed to GetTwoFactorByUID", err)
@@ -62,7 +62,7 @@ func DisableTwoFactor(ctx *context.Context) {
        t, err := login.GetTwoFactorByUID(ctx.User.ID)
        if err != nil {
                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.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 := login.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
        }