If a project:
- has_many :tasks
- accepts_nested_attributes_for :tasks
and I am using simple_form like so (simplified):
simple_form_for @project do |f|
f.input :project_name
f.simple_fields_for :tasks do |j|
j.input :task_name
end
f.submit
end
How would I internationalize the label for :task_name? I have tried quite a few combinations in my simple_form.it.yml file, such as:
it:
simple_form:
labels:
project:
project_name: 'Nome progetto'
task:
task_name: 'Nome compito'
Haven’t been able to find examples in the docs. Google points out a couple of apparently relevant closed issues:
https://github.com/plataformatec/simple_form/issues/48
https://github.com/plataformatec/simple_form/issues/194
But so far I am at loss…
THANKS!
Giuseppe
As far as your form accepts many tasks you should pluralize
task. It works in simple_form: