<commit_before><% content_for :locale do %><span class="locale"><%= @locale.language_name %></span>
<% end %>

<h3 class="switch">Completed translations <span>(<%= link_to 'See phrases missing translation', @locale %>)</span></h3>

<% if @locale.has_updated_translations? && action_name != 'updated' %>
  <span class="notice">Some phrases have changed. <%= link_to "Update translations", updated_tolk_locale_path(@locale) %>.</span>
<% end %>

<div class="translations">
<% if @phrases.any? %>
  <% form_for @locale do |locale_form| %>
        <table class="translations">
      <tr>
        <th class="translation"><%= @locale.language_name -%></th>
        <th class="key"><%= Tolk::Locale.primary_language_name -%></th>
      </tr>
      <% @phrases.each do |phrase| %>
        <tr>
          <td class="translation">
            <%= hidden_field_tag :"translations[][id]", phrase.translation.id %>
            <%= hidden_field_tag :"translations[][locale_id]", phrase.translation.locale_id %>
            <%= text_area_tag :"translations[][text]", format_i18n_text_area_value(phrase.translation.text), :class => 'locale',
                              :onfocus => "$(this).up('tr').addClassName('active');", :onblur => "$(this).up('tr').removeClassName('active');" %>
          </td>
          <td class="phrase">

            <% if action_name == 'updated' %>
              <div class="updated">
                <span class="key">Updated</span>
                <%= format_i18n_value(phrase.translations.primary.text) -%>
                <%=h phrase.translations.primary.text -%>
              </div>
              <div class="original"><commit_msg>Removed extra primary text from updated view<commit_after><% content_for :locale do %><span class="locale"><%= @locale.language_name %></span>
<% end %>

<h3 class="switch">Completed translations <span>(<%= link_to 'See phrases missing translation', @locale %>)</span></h3>

<% if @locale.has_updated_translations? && action_name != 'updated' %>
  <span class="notice">Some phrases have changed. <%= link_to "Update translations", updated_tolk_locale_path(@locale) %>.</span>
<% end %>

<div class="translations">
<% if @phrases.any? %>
  <% form_for @locale do |locale_form| %>
        <table class="translations">
      <tr>
        <th class="translation"><%= @locale.language_name -%></th>
        <th class="key"><%= Tolk::Locale.primary_language_name -%></th>
      </tr>
      <% @phrases.each do |phrase| %>
        <tr>
          <td class="translation">
            <%= hidden_field_tag :"translations[][id]", phrase.translation.id %>
            <%= hidden_field_tag :"translations[][locale_id]", phrase.translation.locale_id %>
            <%= text_area_tag :"translations[][text]", format_i18n_text_area_value(phrase.translation.text), :class => 'locale',
                              :onfocus => "$(this).up('tr').addClassName('active');", :onblur => "$(this).up('tr').removeClassName('active');" %>
          </td>
          <td class="phrase">

            <% if action_name == 'updated' %>
              <div class="updated">
                <span class="key">Updated</span>
                <%= format_i18n_value(phrase.translations.primary.text) -%>
              </div>
              <div class="original">
{'fraction_non_alphanumeric': 0.18999695028972247, 'fraction_numerical': 0.0036596523330283625, 'mean_word_length': 3.0294840294840295, 'pattern_counts': {'":': 0, '<': 88, '<?xml version=': 0, '>': 94, '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': '5982955', 'n_tokens_mistral': 1043, 'n_tokens_neox': 962, 'n_words': 187}