Skip to content

Commit

Permalink
remove update language in ProfilePost (#22748)
Browse files Browse the repository at this point in the history
Fixes #22703

Change language has been moved to `UpdateUserLang`

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
  • Loading branch information
yp05327 and lunny authored Feb 5, 2023
1 parent d74d16a commit c07199f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions routers/web/user/setting/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit c07199f

Please sign in to comment.