<commit_before><div id='translations'>
  <div id="header">
    <h1>Translations</h1>
    <ul id="groups">
      <li><%= link_to_unless_current "All", translations_group_path("all"), :class => 'button' %></li>
      <li><%= link_to_unless_current "Application", translations_group_path("application"), :class => 'button' %></li>
      <li><%= link_to_unless_current "Framework", translations_group_path("framework"), :class => 'button' %></li>
      <li><%= link_to_unless_current "Deleted", translations_group_path("deleted"), :class => 'button' %></li>
    </ul>

    <%= form_tag translations_group_path(params[:group]), :method => "get" do %>
      <%= label_tag :key, "Filter: " %>
      <%= text_field_tag :search, params[:search], :placeholder => "Search for text..." %>
      <%= select_tag :key, options_for_select(@sections.collect {|k| [k.humanize, k]}.unshift(["All sections", nil]), params[:key]) %>
      <%= submit_tag "Submit" %>
    <% end %>
  </div>
  <% if params[:group] && params[:group] == 'deleted' %>
    <div>
      You can delete those translations from database as application doesn't use them anymore.
    </div>
  <% end %>

  <% @keys.each do |key| %>
    <div id="<%= key.gsub('.','-')  %>" class="translation">
      <h2>
        <%-
          parts = key.split('.').map(&:humanize)
          if params[:key].present?
            parts.delete_at(0)
          elsif parts.size > 1
            parts[0] = link_to(parts[0], translations_path(:group => params[:group], :key => parts[0].underscore), :title => "Go to section " + parts[0])
          end
        %>
        <%= parts.join(' > ').html_safe %>
      </h2>

      <% if params[:group] && params[:group] == 'deleted' %>
        <%= link_to 'destroy', translation_path(:id => key.gsub('.','-')),
                      :remote => true,
                      :method => :delete,
                      :confirm => 'Are you sure? This operation is irreversible.',
                      :class =>: 'button warning',
                      :title => 'Clear form database as translation no longer exists in default language file.'
        %>
      <% end %>
      <% Translator.locales.each do |locale| %>
        <%= render :partial => "form", :locals => {:locale => locale, :key => key} %>
      <% end %><commit_msg>syntax errors in controller and view fixed<commit_after><div id='translations'>
  <div id="header">
    <h1>Translations</h1>
    <ul id="groups">
      <li><%= link_to_unless_current "All", translations_group_path("all"), :class => 'button' %></li>
      <li><%= link_to_unless_current "Application", translations_group_path("application"), :class => 'button' %></li>
      <li><%= link_to_unless_current "Framework", translations_group_path("framework"), :class => 'button' %></li>
      <li><%= link_to_unless_current "Deleted", translations_group_path("deleted"), :class => 'button' %></li>
    </ul>

    <%= form_tag translations_group_path(params[:group]), :method => "get" do %>
      <%= label_tag :key, "Filter: " %>
      <%= text_field_tag :search, params[:search], :placeholder => "Search for text..." %>
      <%= select_tag :key, options_for_select(@sections.collect {|k| [k.humanize, k]}.unshift(["All sections", nil]), params[:key]) %>
      <%= submit_tag "Submit" %>
    <% end %>
  </div>
  <% if params[:group] && params[:group] == 'deleted' %>
    <div>
      You can delete those translations from database as application doesn't use them anymore.
    </div>
  <% end %>

  <% @keys.each do |key| %>
    <div id="<%= key.gsub('.','-')  %>" class="translation">
      <h2>
        <%-
          parts = key.split('.').map(&:humanize)
          if params[:key].present?
            parts.delete_at(0)
          elsif parts.size > 1
            parts[0] = link_to(parts[0], translations_path(:group => params[:group], :key => parts[0].underscore), :title => "Go to section " + parts[0])
          end
        %>
        <%= parts.join(' > ').html_safe %>
      </h2>

      <% if params[:group] && params[:group] == 'deleted' %>
        <%= link_to 'destroy', translation_path(:id => key.gsub('.','-')),
                      :remote => true,
                      :method => :delete,
                      :confirm => 'Are you sure? This operation is irreversible.',
                      :class => 'button warning',
                      :title => 'Clear form database as translation no longer exists in default language file.'
        %>
      <% end %>
      <% Translator.locales.each do |locale| %>
        <%= render :partial => "form", :locals => {:locale => locale, :key => key} %>
      <% end %>
{'fraction_non_alphanumeric': 0.1948529411764706, 'fraction_numerical': 0.004325259515570935, 'mean_word_length': 2.691141260973663, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 129, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3218804', 'n_tokens_mistral': 1508, 'n_tokens_neox': 1389, 'n_words': 334}