Forum: Rails I18n Localization problem in nested-attributes validation

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
112c3dcf580abee701d2f5630e767ac2?d=identicon&s=25 Benjamin Meichsner (benni)
on 2009-04-08 17:58
Hey,

I recently run into a problem with the new feature for activerecord:
nested attributes. When the nested object (Activist) is invalid, the
error messages are shown, but the object name is noch translated. (My
project is in german)
So I get int the error box:

"Bitte überprüfen Sie die folgenden Felder:

    * Activist surename muss ausgefüllt werden
    * Activist city muss ausgefüllt werden"

In my appropriate localization file (de.yml) I defined the object/
attributes names correctly.

de:
  activerecord:
    models:
      protest_mail: Protestmail
      activist: Aktivistin
    attributes:
      protest_mail:
        subject: Betreff
        body: Inhalt
      activist:
        surename: Nachname
        city: Stadt

The error messages for protest_mail are transalated correctly, so I
guess, the problems applies to the new nested-attributes feature.

Any idea how to fix this?

best regards,
benni
This topic is locked and can not be replied to.