aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/locale
diff options
context:
space:
mode:
authorAndrew DiMichele <backflip@gmail.com>2012-10-19 12:21:01 -0700
committerAndrew DiMichele <backflip@gmail.com>2012-10-19 17:36:34 -0700
commitf48b7cc053a991404f973ca59dfede87ff6492db (patch)
tree773e469a6fd3ebeb1e1b1cf91dd115f0c8fbc1a7 /activerecord/lib/active_record/locale
parent2268859dafadebc054087751c4349225979550f1 (diff)
downloadrails-f48b7cc053a991404f973ca59dfede87ff6492db.tar.gz
rails-f48b7cc053a991404f973ca59dfede87ff6492db.tar.bz2
rails-f48b7cc053a991404f973ca59dfede87ff6492db.zip
Changed scope for "taken" error message translation to decrease precedence
Moved activerecord.errors.messages.taken to errors.messages.taken so that translations for, e.g., errors.attributes.email.taken don't get overridden. Test that the translation for 'taken' can be overridden
Diffstat (limited to 'activerecord/lib/active_record/locale')
-rw-r--r--activerecord/lib/active_record/locale/en.yml6
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/locale/en.yml b/activerecord/lib/active_record/locale/en.yml
index 896132d566..b1fbd38622 100644
--- a/activerecord/lib/active_record/locale/en.yml
+++ b/activerecord/lib/active_record/locale/en.yml
@@ -4,11 +4,15 @@ en:
#created_at: "Created at"
#updated_at: "Updated at"
+ # Default error messages
+ errors:
+ messages:
+ taken: "has already been taken"
+
# Active Record models configuration
activerecord:
errors:
messages:
- taken: "has already been taken"
record_invalid: "Validation failed: %{errors}"
restrict_dependent_destroy:
one: "Cannot delete record because a dependent %{record} exists"