added I18n support to inactive_message in RegistrationsController
This commit is contained in:
parent
bc9ea93f50
commit
7264bb55b2
|
@ -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
|
||||
|
|
|
@ -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.'
|
||||
|
|
Loading…
Reference in New Issue