Add an Error Message for Users Who Are Trying to Login with an Unregistered Account
The previous user unauthenticated error message is Invalid login or password
. This error message is in Rails translation file /config/locales/devise.en.yml
, as far as I know, we can't overwrite it in gitlab.pot
.
We override the method unauthenticated_message
, which is implemented in Devise
, to customize that error message without side effect.
Proposal
An error message should be returned to frontend if a user submit an unregistered account on login page.
-
add zh_CN translation ”密码错误或该账户不存在,请检查后重试,非中国大陆手机号需添加地区码。”
-
add zh_HK translation ”密碼錯誤或該賬戶不存在,請檢查後重試,非中國大陸手機號需添加地區碼。”
-
update en translation to Your password may be incorrect, or this account may not exist,please check and try again. Add country calling codes if your mobile phone number is outside the Chinese mainland.
-
override i18n_message
in devise_failure
Related follow up issue #1057 about I18n dose not work properly.
由 Martin Tan 编辑于