Devise i18n support
Proposal
We are using Devise as user auth package in GitLab, but it only has :en as the default language. We need to add our customized translation files to support languages like :zh_CN and :zh_HK.
The :en locale file is located at /config/locales/devise.en.yml
.
Devise translation example
# password recovery case
I18n.t('user.send_paranoid_instructions', {:scope=>"devise.passwords", :default=>[:send_paranoid_instructions, :send_paranoid_instructions], :resource_name=>:user})
Two Ways to Fix This
Integration with Gettext
Keep Using Rails I18n Helper
-
Add Devise zh_CN yaml file to upstream -
Set local for Devise -
Apply to SaaS and Self-managed
Screenshots
Login failed | Recover password |
---|---|
由 Martin Tan 编辑于