From ae2b807235e4ae81b3b084647b8ca88b2a259b00 Mon Sep 17 00:00:00 2001 From: Yaroslav Markin Date: Tue, 2 Sep 2008 11:10:41 +0400 Subject: [PATCH] Improve ActiveRecord I18n translations documentation --- activerecord/lib/active_record/locale/en-US.yml | 32 +++++++++++++++++++--- 1 files changed, 27 insertions(+), 5 deletions(-) diff --git a/activerecord/lib/active_record/locale/en-US.yml b/activerecord/lib/active_record/locale/en-US.yml index 8148f31..6cc0c25 100644 --- a/activerecord/lib/active_record/locale/en-US.yml +++ b/activerecord/lib/active_record/locale/en-US.yml @@ -24,10 +24,32 @@ en-US: 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. + # 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: + # Translate model names. Used in Model.human_name(). + # + # For example, + # user: "Dude" + # will translate User model name to "Dude" + + attributes: + # Translate model attribute names. Used in Model.human_attribute_name(attribute). + # + # For example, + # user: + # login: "Handle" + # will translate User attribute "login" as "Handle" -- 1.6.0