aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-02-06 01:06:26 +0900
committerGitHub <noreply@github.com>2023-02-06 00:06:26 +0800
commitc07199f9ab4ac5a1ecbfd27616ad44bf35d00fc1 (patch)
tree6d31b5d8c057f405a53ba7d061a9f75e8f67496c
parentd74d16a4b1c79b5b1fc58998aa38bf299cee10ec (diff)
downloadgitea-c07199f9ab4ac5a1ecbfd27616ad44bf35d00fc1.tar.gz
gitea-c07199f9ab4ac5a1ecbfd27616ad44bf35d00fc1.zip
remove update language in ProfilePost (#22748)
Fixes https://github.com/go-gitea/gitea/issues/22703 Change language has been moved to `UpdateUserLang` Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
-rw-r--r--routers/web/user/setting/profile.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/routers/web/user/setting/profile.go b/routers/web/user/setting/profile.go
index e01f3cdeea..f0f053a514 100644
--- a/routers/web/user/setting/profile.go
+++ b/routers/web/user/setting/profile.go
@@ -137,11 +137,8 @@ func ProfilePost(ctx *context.Context) {
return
}
- // Update the language to the one we just set
- middleware.SetLocaleCookie(ctx.Resp, ctx.Doer.Language, 0)
-
log.Trace("User settings updated: %s", ctx.Doer.Name)
- ctx.Flash.Success(translation.NewLocale(ctx.Doer.Language).Tr("settings.update_profile_success"))
+ ctx.Flash.Success(ctx.Tr("settings.update_profile_success"))
ctx.Redirect(setting.AppSubURL + "/user/settings")
}