en-GB.yml
Rails 4 アプリを作成していますが、モデルの検証で表示されるエラー メッセージを改善したいと考えています。以下に示すように、ロケール ファイルを更新しようとしています。
activemodel:
errors:
<<: *errors
activerecord:
errors:
<<: *errors
attributes:
batch:
sampletype_id: "Sample type"
process_id: "Process Identifier"
バッチ モデルには、次の検証が含まれています。
validates :sampletype_id, presence: true
batch
はモデルで、sampletype_id
はprocess_id
モデル属性です。
これらは取得されず、エラー メッセージの作成に使用されません。
Sampletype can't be blank
それよりもSample type can't be blank
編集: http://edgeguides.rubyonrails.org/i18n.html#translations-for-active-record-modelsからの翻訳をたどろうとしています
edit2: yml パストビンhttp://pastebin.com/j1v9asww