问题
I've subclassed Devise::RegistrationsController
. The subclassed controller, in my case, is AdminRegistrationsController
.
But, when I sign up a new admin, for example, the flash
shows the message:
translation missing: en.devise.admin_registrations.admin.signed_up
I've verified an entry exists in config/locales/devise.en.yml
. Here's the snippet:
en:
devise:
registrations:
signed_up: 'Welcome! You have signed up successfully.'
What am I missing?
回答1:
You must do this :
en:
devise:
admin_registrations:
admin:
signed_up: 'Welcome! You have signed up successfully.'
来源:https://stackoverflow.com/questions/11620767/devise-translation-missing-error-with-subclassed-controller