Rails アプリケーションで次の問題が発生しました。たとえば、検証エラー メッセージに正しく表示されるように、いくつかのモデル属性をこのように変換したいと考えています。
de:
activerecord:
models:
account:
attributes:
email:
one: 'Email'
other: 'Emails'
Railsコンソールで確認できます
I18n.t 'activerecord.models.account.attributes.email', count: 1
「Email」を返し、すべて問題ないようです。
しかし、ブラウザにアクセスしてフォームを投稿すると、エラーが発生します
I18n::InvalidPluralizationData in AccountsController#create
translation data {:attributes=>{:email=>{:one=>"Email", :other=>"Emails"}}} can not be used with :count => 1
どうすればこれを解決できますか? Rails はどのような翻訳データを取得することを期待していますか?
ありがとう