# Error trying to translate a model name in a validation message

**URL:** <https://www.ruby-forum.com/t/error-trying-to-translate-a-model-name-in-a-validation-message/178438>\
**Category:** Rails I18n\
**Created:** [November 4, 2009, 5:11pm UTC](https://www.ruby-forum.com/t/error-trying-to-translate-a-model-name-in-a-validation-message/178438 "2009-11-04T17:11:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pezdude](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a87d85/32.png) [@pezdude](https://www.ruby-forum.com/u/pezdude)\
**Post date:** [November 4, 2009, 5:11pm UTC](https://www.ruby-forum.com/t/error-trying-to-translate-a-model-name-in-a-validation-message/178438/1 "2009-11-04T17:11:26Z")

</div>

So far I’ve found internationalization with Rails to be a very pleasant  
experience. But I’ve run into trouble trying to translate model names  
and I need a little help.

Here’s my fr.yml:  
fr:  
activerecord:  
models:  
person: Personne  
attributes:  
last\_name: “Nom de Famille”

Please forgive me if the French is bad - I’m just using it as a  
bootstrap example and it’s not an official translation.

Last name is a required field and when I try to save I get this error:

translation data {:person=\>“Personne”} can not be used with :count =\> 1

And here’s some more information from Rails:

Extracted source (around line #28 ): 25:  
26: \<% content\_for :title do %\>  
27: Edit Morbidity Event: \<%= h(patient\_name) %\>  
28: \<% end %\>  
29:  
30: \<% content\_for :tools\_two do %\>  
31: \<%= save\_buttons(@event) %\>

RAILS\_ROOT: /home/david/trisano-ee/webapp Application Trace | Framework  
Trace | Full Trace  
/home/david/trisano-ee/webapp/vendor/rails/activesupport/lib/active\_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:139:in  
`pluralize' /home/david/trisano-ee/webapp/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:40:in`translate’  
/home/david/trisano-ee/webapp/vendor/rails/activesupport/lib/active\_support/vendor/i18n-0.1.3/lib/i18n.rb:165:in  
`t' /home/david/trisano-ee/webapp/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb:197:in`error\_messages\_for’  
/home/david/trisano-ee/webapp/vendor/rails/activesupport/lib/active\_support/core\_ext/object/misc.rb:78:in  
`with_options' /home/david/trisano-ee/webapp/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb:192:in`error\_messages\_for’  
/home/david/trisano-ee/webapp/app/views/morbidity\_events/edit.html.erb:28:in  
`_run_erb_app47views47morbidity_events47edit46html46erb' /home/david/trisano-ee/webapp/app/controllers/morbidity_events_controller.rb:141:in`update’  
/home/david/trisano-ee/webapp/app/controllers/morbidity\_events\_controller.rb:123:in  
`update’

Anybody have any ideas what’s going on?

Thanks in advance for the help .

Dave C.  
Senior Developer  
Collaborative Software Initiative  
503-545-5350 (CSI TriSanoâ„¢ Support)  
317-966-6154 (personal)  
removed\_email\_address@domain.invalid
