From 867fc613b0ebfea3a4fc53efc64f9f849ec3609e Mon Sep 17 00:00:00 2001 From: Yaroslav Markin Date: Sat, 13 Sep 2008 00:02:54 +0400 Subject: [PATCH] Improve ActiveRecord I18n translations documentation --- activerecord/lib/active_record/locale/en-US.yml | 29 +++++++++++++++++++--- 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 8148f31..421f0eb 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" -- 1.6.0