开发者

Rails 3 translate from errors

开发者 https://www.devze.com 2023-01-28 00:17 出处:网络
Hi I\'m using the simple_form GEM. I\'m also translating form labels, that is working fine, so \'Name\' becomes \'Navn\'

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.


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

精彩评论

暂无评论...
验证码 换一张
取 消