aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/locale
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-01-07 02:45:50 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-07 15:31:50 +0100
commita25ef06956725f5c4c8833f86f61f1f12c4323e2 (patch)
tree0b5e91a6f83950e142758fe57ce768af057725b9 /activerecord/lib/active_record/locale
parentb0572ab2b670f00c96226d8ba29f4f153771e086 (diff)
downloadrails-a25ef06956725f5c4c8833f86f61f1f12c4323e2.tar.gz
rails-a25ef06956725f5c4c8833f86f61f1f12c4323e2.tar.bz2
rails-a25ef06956725f5c4c8833f86f61f1f12c4323e2.zip
Allow to specify default attributes names translation in I18n yml files.
For example, you could easily specify :created_at and :updated_at translations as: en: attributes: created_at: "Created at" updated_at: "Updated at" This configuration is built on ActiveModel, so it means those translations are shared between different ORMs as well (but always as a fallback).
Diffstat (limited to 'activerecord/lib/active_record/locale')
-rw-r--r--activerecord/lib/active_record/locale/en.yml5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/locale/en.yml b/activerecord/lib/active_record/locale/en.yml
index 75cdedb442..4115cc8e17 100644
--- a/activerecord/lib/active_record/locale/en.yml
+++ b/activerecord/lib/active_record/locale/en.yml
@@ -19,6 +19,11 @@ en:
# custom blank validation message for login attribute of User model.
#models:
+ # Attributes names common to most models
+ #attributes:
+ #created_at: "Created at"
+ #updated_at: "Updated at"
+
# ActiveRecord models configuration
#activerecord:
# Translate model names. Used in Model.human_name().