My default locale is :ja
, and I have this for user.ja.yml
:
ja:
activerecord:
models:
user: プロフィール
attributes:
user:
account_id: アカウントID
birth_day: 生年月日
email: メールアドレス
errors:
user:
invalid_zip_code: 郵便番号に該当する住所がみつかりません。
enumerize:
user:
sex:
man: 男性
woman: 女性
My application raises a translation missing error on a specific model on the production server. It works fine on other models and on development and local production environments.
On local production environment:
I18n.t('activerecord.attributes.user.account_id')
# => "アカウントID"
On production server:
I18n.t('activerecord.attributes.user.account_id')
# => "translation missing: ja.activerecord.attributes.user.account_id"
activerecord.model
does not raise an error:
I18n.t('activerecord.models.user')
# => "プロフィール"
I've found the solution. There was a locale file which has no content on attributes.
ja:
activerecord:
models:
authentication: SNS連携
attributes:
This file affects other files.