# Translation %{model} and other issues

**URL:** <https://www.ruby-forum.com/t/translation-model-and-other-issues/205880>\
**Category:** Rails I18n\
**Created:** [April 18, 2011, 12:46am UTC](https://www.ruby-forum.com/t/translation-model-and-other-issues/205880 "2011-04-18T00:46:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [April 18, 2011, 12:46am UTC](https://www.ruby-forum.com/t/translation-model-and-other-issues/205880/1 "2011-04-18T00:46:08Z")

</div>

I just downloaded “es-CL” translation file from git repo  
but thanslation for Errors are not working good, for example

12 errors prohibited this client from being saved:  
Contact phone no puede estar en blanco  
Contact phone es demasiado corto (6 caracteres mínimo)  
Contact cellphone no puede estar en blanco  
Contact cellphone es demasiado corto (7 caracteres mínimo)  
Contact address no puede estar en blanco  
Contact email es demasiado corto (5 caracteres mínimo)  
Contact email no es válido  
Name no puede estar en blanco  
Surname no puede estar en blanco  
Surname2 no puede estar en blanco  
Gender no está incluido en la lista  
Rut no puede estar en blanco

my es.yml has this lines

activerecord:  
errors:  
template:  
header:  
one: “No se pudo guardar este/a %{model} porque se encontró  
1 error”  
other: “No se pudo guardar este/a %{model} porque se  
encontraron %{count} errores”  
# The variable :count is also available  
body: “Se encontraron problemas con los siguientes campos:”

anyways %{model} is shown as %{model} not the model name  
Also I need to translate the attributes names

---

<div class="post-metadata">

**Author:** ![josetomas\_r](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@josetomas\_r](https://www.ruby-forum.com/u/josetomas_r)\
**Post date:** [May 7, 2011, 7:07pm UTC](https://www.ruby-forum.com/t/translation-model-and-other-issues/205880/2 "2011-05-07T19:07:59Z")

</div>

Tomas R. wrote in post #993402:

> …  
> my es.yml has this lines
> 
> activerecord:  
> errors:  
> template:  
> header:  
> one: “No se pudo guardar este/a %{model} porque se encontró  
> 1 error”  
> other: “No se pudo guardar este/a %{model} porque se  
> encontraron %{count} errores”  
> # The variable :count is also available  
> body: “Se encontraron problemas con los siguientes campos:”

activerecord:  
models:  
client: ‘client in chilenian spanish’

should do it for the models and if I’m not wrong for the attributes:

(activerecord:)  
attributes:  
client:  
phone: ‘phone in spanish’  
cellphone: ‘cellphone in spanish’  
…

I have a subdirectory for the model (activerecord) stuff locales/models  
and within that a subdirectory for each model (would be  
locales/models/clients in your case). So a locales/models/clients/es.yml  
could caontain:

es:  
attributes:  
phone: ‘phone in spanish’  
cellphone: ‘cellphone in spanish’  
…

But how to set the model names in this way (outside the default dir) I  
also would be interested in.

Regards T.
