Prepend around action SessionsController#set_locale
Related issue link: #2198 (closed)
What does this MR do and why?
Fix I18N for SessionsController#create
,
when the captcha is wrong, the page incorrectly uses en
, but should use the language selected by the user.
Root reason
SessionsController#check_captcha
The execution order of check_captcha
is higher than that of set_locale
.
When check_captcha
returns early, render :new
is executed immediately, that is, set_locale
is skipped.
Screenshots
First Page | Fixed Behavior | Bug Behavior |
---|---|---|
/cc EM @prajnamas
由 Baodong 编辑于