Skip to content

Prepend around action SessionsController#set_locale

Baodong请求将fix/sessions-controller-set-locale合并到main-jh

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
截屏2022-12-29_16.12.33 截屏2022-12-29_16.12.45 截屏2022-12-29_16.13.22

/cc EM @prajnamas

Baodong 编辑于

合并请求报告