I have a Rails 3.1.1 Project using the Gem ActiveFrom an extension of ActiveModel to validate non persistant models. In my i18n yml File I have the following Code:
activemodel:
attributes:
contact_form:
name: "Name"
phone: "Telefon"
errors:
models:
contact_form:
attributes:
name:
blank: "Sie müssen Ihren Namen angeben."
phone:
blank: "Sie müssen eine Telefonnummer angeben."
When I get all error messages with @contact_form.errors.full_messages
in my view the messages are translated but the attributes not, like:
Phone Sie müssen eine Telefonnummer angeben.
Phone should be translated to Telefon too.
When I do the same thing with persistent models and ActiveRecord this is working? Can anyone tell me the difference from ActiveRecord and ActiveModel in attribute translation?