I'm having trouble with translations (I18n) in Rails 3. There are a couple of words that I can't realize from where Rails/I18n is trying to read the translation.
My form has a simple_form inside a custom_form. Something like this:
<%= custom_form_for(@prospect) do |f| %>
<div class="row-fluid">
<div class="span4">
<%= f.input :usuario_id, :wrapper => :prepend, :label => false do %>
<%= f.label :usuario_id, :class => "add-on", :required => false %>
<%= f.input_field :usuario_id, :collection => @usuarios %>
<% end %>
</div>
<%= f.simple_fields_for :crm_dados_entidade_attributes do |cde| %>
<div class="span4">
<%= cde.input :origem_lead_id, :wrapper => :prepend, :label => false do %>
<%= cde.label :origem_lead_id, :class => "add-on", :required => false %>
<%= cde.input_field :origem_lead_id, :collection => @origem_leads %>
<% end %>
</div>
<% end -%>
</div>
<% end -%>
I have translation files for each model. For example: prospects.yml, leads.yml, and son on...
My problem is that the fields in the custom_form_for are translated correctly, but the fields in the simple_fields_for are not translated. Actually, the output for origem_lead_id is: 'Origem lead', when my translation file is like this:
pt-BR:
activerecord:
models:
'crm/crm_dados_entidades': 'Pessoa'
attributes:
'crm/crm_dados_entidade':
origem_lead_id: 'Origem do Lead'
origem_lead: 'Origem do Lead'
I've tried to put this code in several files and in different ways, like (prospects.yml, crm_dados_entidades.yml), attributes for ( 'crm/crm_dados_entidade', 'crm/prospects').
Nothing seems to work. So, my question is: Is there anyway to track where Rails/I18n is looking for the translation?
Aucun commentaire:
Enregistrer un commentaire