I'm having a really weird issue with i18n on a current rails project. I get translation missing messages whenever I attempt to use the key notifications
. For example:
#en-US.yml
en-US:
notifications:
index:
title: 'notification page'
#/notifications/index.html.erb
<%= content_for :title, t('.title') -%>
This will fail and tell me the translation is missing
#en-US.yml
en-US:
notifications:
index:
title: 'notification page'
#/notifications/index.html.erb
<%= content_for :title, t('notifications.index.title') -%>
This will also fail.
#en-US.yml
en-US:
notification:
index:
title: 'notification page'
#/notifications/index.html.erb
<%= content_for :title, t('notification.index.title') -%>
This oddly, will work, removing the s
will allow it to find the translation.
#en-US.yml
en-US:
notifications1:
index:
title: 'notification page'
#/notifications/index.html.erb
<%= content_for :title, t('notifications1.index.title') -%>
This also will work, adding a 1
to the end of notifications works.
It appears that rails does not like the word notifications. This is a problem because I don't want to have to rename the entire model for this, and also I want to use the i18n.t view shortcuts for consistency. Is notifications
a reserved word? Is there any reason why it is failing to find it?