# Error\_messages\_for missing translation header and body

**URL:** <https://www.ruby-forum.com/t/error-messages-for-missing-translation-header-and-body/191220>\
**Category:** Rails\
**Created:** [July 7, 2010, 5:12pm UTC](https://www.ruby-forum.com/t/error-messages-for-missing-translation-header-and-body/191220 "2010-07-07T17:12:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rgagnon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e95f7d/32.png) [@rgagnon](https://www.ruby-forum.com/u/rgagnon)\
**Post date:** [July 7, 2010, 5:12pm UTC](https://www.ruby-forum.com/t/error-messages-for-missing-translation-header-and-body/191220/1 "2010-07-07T17:12:14Z")

</div>

Hi,

I’m maybe wrong but just in case. I’m on rails 2.3.5 and when I use  
error\_messages\_for with I18n I got a translation missing Header and  
translation missing body.

I went deeper in the active\_record\_helper.rb and for some reason it  
looks like the scope is not kept in the call when used with  
I18n.with\_options :

Not working :  
I18n.with\_options :locale =\> options[:locale], :scope =\>  
[:activerecord, :errors, :template] do |locale|  
…  
locale.t :header, :count =\> count, :model =\> object\_name  
…  
end

Working:  
I18n.with\_options :locale =\> options[:locale], :scope =\>  
[:activerecord, :errors, :template] do |locale|  
…  
#{locale.t :header, :count =\> count, :model =\>  
object\_name, :scope =\> [:activerecord, :errors, :template]}"  
…  
end

Correct me if I’m wrong.

Rémi
