This project is archived and is in readonly mode.

#6448 ✓committed
yves.senn (at gmail)

i18n key collision with namespaced models

Reported by yves.senn (at gmail) | February 18th, 2011 @ 01:51 PM | in 3.0.6

I just upgraded from Rails 3.0.0 to Rails 3.0.4 and I noticed, that the way to add translations to namespaced models changed from using a "/" to nesting. I am now facing a problem that, I have an attribute, which has the same name as the namespaced model. This creates a key collision and one of the translations is overridden.

Outer model:

en:
  activerecord:
    models:
      article:
        one: Article
        other: Articles
    attributes:
      article:
        category: Category

Namespaced Model:

en:
  activerecord:
    models:
      article:
        category:
          one: Category
          other: Categories
    attributes:
      article:
        category:
          description: Description

In the example above I got a collision on the key: 'activerecord.attributes.article.category'

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages