Closed mooreniemi closed 3 years ago
All mailers are done, and I think all views. Need to change the feature tests to use the different elements.
Devise gave me basically everything except explanatory text on login...
Note: upgrading devise generates a lot of errors as it was major version bump, so not doing that now.
Problem: for some reason somewhere devise is generating the wrong locale path...
It's actually here:
main development » I18n.t("devise.failure.not_found_in_database")
=> "Invalid email or password."
I would need to override the controller I think to fix this...
I did bundle open
on devise and hopped into lib/devise/failure_app.rb
:
#<Devise::FailureApp:0x0056148c071718> development » I18n.t("devise.failure")
=> {:already_authenticated=>"您已經登入。",
:inactive=>"您的帳號尚未被啟用。",
:invalid=>nil,
:last_attempt=>"您還有最後一次嘗試機會,再次失敗您的帳號將會被鎖定。",
:locked=>"您的帳號已被鎖定。",
:not_found_in_database=>nil,
:timeout=>"您的登入時效過期,請重新登入。",
:unauthenticated=>"您需要先登入或註冊後才能繼續。",
:unconfirmed=>"您的帳號需要經過驗證後,才能繼續。"}
#<Devise::FailureApp:0x0056148c071718> development » I18n.t("devise.failure")
Ok this translation is somehow literally missing in this version. It's not an overall bug.
Note for later. Current method works ok for some users but won't help foreign language SEO.
This is about set: https://github.com/mooreniemi/Transbucket_Rails/pull/100
For our i18n users, translations of the sign up instructions would be really helpful. Ignoring English variants, these are our top other languages, with German being quite a bit more than all the others combined.
Top pages to i18nize:
References:
https://github.com/svenfuchs/rails-i18n