Rails 3 translate from errors

Hi I'm using the simple_form GEM. I'm also translating form labels, that is working fine, so 'Name' becomes 'Navn'

But my form error message displays it as 'Name'

Any clue about what's happening?

--EDIT-- I found out that i had to do the following in my translation file:

da:
    activerecord:
        models:
          brand: 'brand'
          user: 'bruger'
        attributes:
          brand:
            name: 'Navn'
          user:
            name: 'Navn'

I hope some other will find this info usefull.

Answers


da:
activerecord:
    models:
      brand: 'brand'
      user: 'bruger'
    attributes:
      brand:
        name: 'Navn'
      user:
        name: 'Navn'

Need Your Help

Spring MVC blocking queue with initializing of huge library

java multithreading spring

I am using a huge library in my application. I cannot initialize the library every time a request come so I put the initialization into the configuration. I have implemented a queue and a service for

Readline function in C outputs weird results

c linux shell gnu readline

I'm trying to implement auto completion and history in my shell using the GNU Readline library. I was using fgets() to retrieve user and after reading on how the readline function works, I decide on

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.