mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Locale file changed to yaml
This commit is contained in:
parent
a6a62004c9
commit
febe2ea977
3 changed files with 35 additions and 2 deletions
|
@ -82,6 +82,6 @@ require 'active_record/connection_adapters/abstract_adapter'
|
|||
require 'active_record/schema_dumper'
|
||||
|
||||
I18n.backend.populate do
|
||||
I18n.load_translations File.dirname(__FILE__) + '/active_record/locale/en-US.rb'
|
||||
I18n.load_translations File.dirname(__FILE__) + '/active_record/locale/en-US.yml'
|
||||
end
|
||||
|
||||
|
|
33
activerecord/lib/active_record/locale/en-US.yml
Normal file
33
activerecord/lib/active_record/locale/en-US.yml
Normal file
|
@ -0,0 +1,33 @@
|
|||
en-US:
|
||||
activerecord:
|
||||
errors:
|
||||
# The values :model, :attribute and :value are always available for interpolation
|
||||
# The value :count is available when applicable. Can be used for pluralization.
|
||||
messages:
|
||||
inclusion: "is not included in the list"
|
||||
exclusion: "is reserved"
|
||||
invalid: "is invalid"
|
||||
confirmation: "doesn't match confirmation"
|
||||
accepted: "must be accepted"
|
||||
empty: "can't be empty"
|
||||
blank: "can't be blank"
|
||||
too_long: "is too long (maximum is {{count}} characters)"
|
||||
too_short: "is too short (minimum is {{count}} characters)"
|
||||
wrong_length: "is the wrong length (should be {{count}} characters)"
|
||||
taken: "has already been taken"
|
||||
not_a_number: "is not a number"
|
||||
greater_than: "must be greater than {{count}}"
|
||||
greater_than_or_equal_to: "must be greater than or equal to {{count}}"
|
||||
equal_to: "must be equal to {{count}}"
|
||||
less_than: "must be less than {{count}}"
|
||||
less_than_or_equal_to: "must be less than or equal to {{count}}"
|
||||
odd: "must be odd"
|
||||
even: "must be even"
|
||||
# Append your own errors here or at the model/attributes scope.
|
||||
|
||||
models:
|
||||
# Overrides default messages
|
||||
|
||||
attributes:
|
||||
# Overrides model and default messages.
|
||||
|
|
@ -11,7 +11,7 @@ class ActiveRecordValidationsI18nTests < Test::Unit::TestCase
|
|||
|
||||
def teardown
|
||||
reset_callbacks Topic
|
||||
I18n.load_translations File.dirname(__FILE__) + '/../../lib/active_record/locale/en-US.rb'
|
||||
I18n.load_translations File.dirname(__FILE__) + '/../../lib/active_record/locale/en-US.yml'
|
||||
end
|
||||
|
||||
def unique_topic
|
||||
|
|
Loading…
Reference in a new issue