Editing translation

Key: <%= @tr_set.key %>

<%= form_for(@tr_set, as: :tr_set, url: update_key_set_path, method: :put, html: { class: 'form-horizontal', role: 'form' }) do |f| %>
<%= f.text_field :interpolations, class: "form-control", disabled: :disabled %>
<% @tr_set.translations.each do |translation| %> <% panel_color = translation.value.nil? ? "panel-danger" : "panel-info" %>
<%= f.fields_for "translation[]", translation do |tl_form| %>
<%= translation.locale %> <% rows = (translation.value.to_s.length / 100) + 1 %> <%= tl_form.text_area :value, class: "form-control", rows: "#{rows}" %>
<% end %>
<% end %>
<%= f.submit "Save changes", class: "btn btn-primary" %> <%= link_to 'Cancel', translations_path, class: "btn btn-default" %>
<% end %>