aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaroslav Markin <yaroslav@markin.net>2008-09-13 00:02:54 +0400
committerYaroslav Markin <yaroslav@markin.net>2008-09-13 00:02:54 +0400
commit867fc613b0ebfea3a4fc53efc64f9f849ec3609e (patch)
tree694e390eadbb031d3f4630faafcbc45cb3111ce4
parent4f33f1fff38ae5afd0d44b0f8cb6a4643c86051e (diff)
downloadrails-867fc613b0ebfea3a4fc53efc64f9f849ec3609e.tar.gz
rails-867fc613b0ebfea3a4fc53efc64f9f849ec3609e.tar.bz2
rails-867fc613b0ebfea3a4fc53efc64f9f849ec3609e.zip
Improve ActiveRecord I18n translations documentation
-rw-r--r--activerecord/lib/active_record/locale/en-US.yml29
1 files changed, 25 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/locale/en-US.yml b/activerecord/lib/active_record/locale/en-US.yml
index 8148f31a81..421f0ebd60 100644
--- a/activerecord/lib/active_record/locale/en-US.yml
+++ b/activerecord/lib/active_record/locale/en-US.yml
@@ -25,9 +25,30 @@ en-US:
even: "must be even"
# Append your own errors here or at the model/attributes scope.
+ # You can define own errors for models or model attributes.
+ # The values :model, :attribute and :value are always available for interpolation.
+ #
+ # For example,
+ # models:
+ # user:
+ # blank: "This is a custom blank message for {{model}}: {{attribute}}"
+ # attributes:
+ # login:
+ # blank: "This is a custom blank message for User login"
+ # Will define custom blank validation message for User model and
+ # custom blank validation message for login attribute of User model.
models:
- # Overrides default messages
-
- attributes:
- # Overrides model and default messages.
+
+ # Translate model names. Used in Model.human_name().
+ #models:
+ # For example,
+ # user: "Dude"
+ # will translate User model name to "Dude"
+
+ # Translate model attribute names. Used in Model.human_attribute_name(attribute).
+ #attributes:
+ # For example,
+ # user:
+ # login: "Handle"
+ # will translate User attribute "login" as "Handle"