aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorSven Fuchs <svenfuchs@artweb-design.de>2008-08-20 18:44:41 +0200
committerSven Fuchs <svenfuchs@artweb-design.de>2008-08-20 18:44:41 +0200
commitc324ef2785f82f03bb0e703da27ba2b8d97a2da1 (patch)
tree6a047af2d2917afa7fe6390ea106af750de715cb /activerecord/lib
parentfc0358ae16d5631dd1d996b2cf95a8987f9d0c8d (diff)
parent950b9792baae14e42b894f113ae8dfc95df34da9 (diff)
downloadrails-c324ef2785f82f03bb0e703da27ba2b8d97a2da1.tar.gz
rails-c324ef2785f82f03bb0e703da27ba2b8d97a2da1.tar.bz2
rails-c324ef2785f82f03bb0e703da27ba2b8d97a2da1.zip
Merge branch 'iain' into i18n
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record.rb2
-rw-r--r--activerecord/lib/active_record/locale/en-US.rb28
-rw-r--r--activerecord/lib/active_record/locale/en-US.yml33
3 files changed, 34 insertions, 29 deletions
diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb
index 08b6b19f7f..bc27d17ccd 100644
--- a/activerecord/lib/active_record.rb
+++ b/activerecord/lib/active_record.rb
@@ -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
diff --git a/activerecord/lib/active_record/locale/en-US.rb b/activerecord/lib/active_record/locale/en-US.rb
deleted file mode 100644
index 89a5baba06..0000000000
--- a/activerecord/lib/active_record/locale/en-US.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-{ :'en-US' => {
- :activerecord => {
- :errors => {
- :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"
- }
- }
- }
- }
-}
diff --git a/activerecord/lib/active_record/locale/en-US.yml b/activerecord/lib/active_record/locale/en-US.yml
new file mode 100644
index 0000000000..8148f31a81
--- /dev/null
+++ b/activerecord/lib/active_record/locale/en-US.yml
@@ -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.
+