diff --git a/app/controllers/devise/registrations_controller.rb b/app/controllers/devise/registrations_controller.rb index 835a8607..bc486942 100644 --- a/app/controllers/devise/registrations_controller.rb +++ b/app/controllers/devise/registrations_controller.rb @@ -19,7 +19,7 @@ class Devise::RegistrationsController < ApplicationController sign_in(resource_name, resource) respond_with resource, :location => redirect_location(resource_name, resource) else - set_flash_message :notice, :inactive_signed_up, :reason => resource.inactive_message.to_s if is_navigational_format? + set_flash_message :notice, :inactive_signed_up, :reason => I18n.t("devise.registrations.reasons." << resource.inactive_message.to_s) if is_navigational_format? expire_session_data_after_sign_in! respond_with resource, :location => after_inactive_sign_up_path_for(resource) end diff --git a/config/locales/en.yml b/config/locales/en.yml index a5cf3bf6..80c84bba 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -37,6 +37,10 @@ en: inactive_signed_up: 'You have signed up successfully. However, we could not sign you in because your account is %{reason}.' updated: 'You updated your account successfully.' destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.' + reasons: + inactive: 'inactive' + unconfirmed: 'unconfirmed' + locked: 'locked' unlocks: send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.' unlocked: 'Your account was successfully unlocked. You are now signed in.'