Allow yml messages to be configured by not using engine locales, which, due to a Rails bug, always have higher priority than application locales

This commit is contained in:
José Valim
2009-10-30 07:33:55 -02:00
parent 3209e7d988
commit 9d56aa9603
3 changed files with 5 additions and 1 deletions

View File

@@ -66,6 +66,7 @@ end
Rails.configuration.after_initialize do
ActiveRecord::Base.extend Devise::ActiveRecord
ActiveRecord::ConnectionAdapters::TableDefinition.send :include, Devise::Migrations
I18n.load_path.unshift File.expand_path(File.join(File.dirname(__FILE__), 'devise', 'locales', 'en.yml'))
end
require 'devise/warden'

18
lib/devise/locales/en.yml Normal file
View File

@@ -0,0 +1,18 @@
en:
devise:
sessions:
signed_in: 'Signed in successfully.'
signed_out: 'Signed out successfully.'
unauthenticated: 'You need to sign in or sign up before continuing.'
unconfirmed: 'You have to confirm your account before continuing.'
invalid: 'Invalid email or password.'
passwords:
send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
updated: 'Your password was changed successfully. You are now signed in.'
confirmations:
send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
confirmed: 'Your account was successfully confirmed. You are now signed in.'
notifier:
confirmation_instructions: 'Confirmation instructions'
reset_password_instructions: 'Reset password instructions'