Skip to content

Commit c07199f

Browse files
yp05327lunny
andauthored
remove update language in ProfilePost (#22748)
Fixes #22703 Change language has been moved to `UpdateUserLang` Co-authored-by: Lunny Xiao <[email protected]>
1 parent d74d16a commit c07199f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

routers/web/user/setting/profile.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,8 @@ func ProfilePost(ctx *context.Context) {
137137
return
138138
}
139139

140-
// Update the language to the one we just set
141-
middleware.SetLocaleCookie(ctx.Resp, ctx.Doer.Language, 0)
142-
143140
log.Trace("User settings updated: %s", ctx.Doer.Name)
144-
ctx.Flash.Success(translation.NewLocale(ctx.Doer.Language).Tr("settings.update_profile_success"))
141+
ctx.Flash.Success(ctx.Tr("settings.update_profile_success"))
145142
ctx.Redirect(setting.AppSubURL + "/user/settings")
146143
}
147144

0 commit comments

Comments
 (0)