<commit_before><%
  page_title = @resource.model_name.human(count: 2)
  admin_title(page_title)
%>

<% content_for :main_grid do %>

  <%= render 'index' %>

  <div class="row-fluid">
    <div class="span6">
      <h1><%= page_title %></h1>
    </div>
    <div class="pull-right" style="margin: 15px 5px 0 0;">
      <%= admin_search %>
    </div>
  </div>

  <%= admin_display_flash_message %>

  <% if @resource.typus_scopes.any? || predefined_filters.any? %>
    <div class="tabbable tabs-below">
      <ul class="nav nav-tabs">
        <% all_klass = params[:scope] ? "inactive" : "active" %>
        <li class="<%= all_klass %>">
          <%= link_to url_for(params.dup.cleanup.merge(:action => 'index')) do %>
            <%= Typus::I18n.t("All") %>
            <% if @resource.typus_options_for(:counters) %>
              <%= "&nbsp;<span class='badge'>#{resource.count}</span>".html_safe %>
            <% end %>
          <% end %>
        </li>

        <% @resource.typus_scopes.each do |scope| %>
          <% klass = params[:scope].eql?(scope) ? "active" : "inactive" %>
          <li class="<%= klass %>">
            <%= link_to url_for(:scope => scope) do %>
              <%= Typus::I18n.t(scope.humanize) %>
              <% if @resource.typus_options_for(:counters)  %>
                <%= "&nbsp; <span class='badge'>#{@resource.send(scope).count}</span>".html_safe %>
              <% end %>
          <% end %>
          </li>
        <% end %>

        <% predefined_filters.each do |filter, action, scope| %><commit_msg>Allow translating the scope names.<commit_after><%
  page_title = @resource.model_name.human(count: 2)
  admin_title(page_title)
%>

<% content_for :main_grid do %>

  <%= render 'index' %>

  <div class="row-fluid">
    <div class="span6">
      <h1><%= page_title %></h1>
    </div>
    <div class="pull-right" style="margin: 15px 5px 0 0;">
      <%= admin_search %>
    </div>
  </div>

  <%= admin_display_flash_message %>

  <% if @resource.typus_scopes.any? || predefined_filters.any? %>
    <div class="tabbable tabs-below">
      <ul class="nav nav-tabs">
        <% all_klass = params[:scope] ? "inactive" : "active" %>
        <li class="<%= all_klass %>">
          <%= link_to url_for(params.dup.cleanup.merge(:action => 'index')) do %>
            <%= Typus::I18n.t("All") %>
            <% if @resource.typus_options_for(:counters) %>
              <%= "&nbsp;<span class='badge'>#{resource.count}</span>".html_safe %>
            <% end %>
          <% end %>
        </li>

        <% @resource.typus_scopes.each do |scope| %>
          <% klass = params[:scope].eql?(scope) ? "active" : "inactive" %>
          <li class="<%= klass %>">
            <%= link_to url_for(:scope => scope) do %>
              <%= Typus::I18n.t(scope, scope: "typus.scopes.#{@resource.model_name.singular}") %>
              <% if @resource.typus_options_for(:counters)  %>
                <%= "&nbsp; <span class='badge'>#{@resource.send(scope).count}</span>".html_safe %>
              <% end %>
          <% end %>
          </li>
        <% end %>

        <% predefined_filters.each do |filter, action, scope| %>
{'fraction_non_alphanumeric': 0.20316455696202532, 'fraction_numerical': 0.008227848101265823, 'mean_word_length': 2.3663471778487755, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 0, '>': 95, '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': '1774538', 'n_tokens_mistral': 1182, 'n_tokens_neox': 1060, 'n_words': 178}