Improve AR translations documentation
Reported by Yaroslav Markin | September 1st, 2008 @ 09:21 PM
Need to improve AR translations documentation.
Here's a snipped from Iain:
activerecord:
models:
topic: Custom Topic Name
attributes:
topic:
title: Custom Title
errors:
models:
topic:
blank: "Custom Invalid Message for {{model}}: {{attribute}}"
attributes:
title:
blank: "Even more custom invalid message for {{model}}: {{attribute}}"
Topic.human_name # => "Custom Topic Name"
Topic.human_attribute_name("title") # => "Custom Title"
t = Topic.new
t.valid?
t.errors
# =>
# :content => "Custom Invalid Message for Custom Topic Name: Content",
# :title => "Even more custom invalid message for Custom Topic Name: Custom Title"
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Repository for collecting Locale data for Ruby on Rails I18n as well as other interesting, Rails related I18n stuff
People watching this ticket
Attachments
Tags
Referenced by
- 17 Rails edge tests fail when there is no activerecord.errors.models key present See http://i18n.lighthouseapp.com/pr... .