<commit_before>{% macro print_readout(readout, locale=None, max_rows=10, product=None) %}
  {% if not readout.hide_readout %}
    <details class="h2" open="open">
      <summary class="with-mode-selectors">
        <a id="{{ readout.slug }}">{{ readout.title }}</a>
      </summary>
      <ul class="readout-modes" data-slug="{{ readout.slug }}">
        {% for key, name in readout.modes %}
          <li class="mode{% if key == readout.default_mode %} active
          {% endif %}" data-url="{{ url('dashboards.wiki_rows',
                  readout.slug)|urlparams(max=max_rows, mode=key, locale=locale, product=product.slug) }}">
            <a href="#">{{ name }}</a>
          </li>
        {% endfor %}
      </ul>
      {% if readout.description %}
        <p>
          {{ readout.description }}
        </p>
      {% endif %}
      <table class="documents" id="{{ readout.slug }}-table">
        {{ readout.render(max_rows=max_rows)|safe }}
      </table>
      <div class="table-footer">
        <a href="{{ readout.get_absolute_url(request.LANGUAGE_CODE, product) }}">{{ readout.details_link_text }}</a>
      </div>
    </details>
  {% endif %}
{% endmacro %}

{% macro overview_section(readouts, printed_rows) %}
{# printed_rows is a tuple of pairs, (row, should_color), like so:
  ((row1, True/False), (row2, True/False), ... etc) #}
  <details class="h2" open="open">
    <summary>{{ _('Overview') }}</summary>
    <table class="overview l10n-overview">
      {% for row, should_color in printed_rows %}
        {% if row.title == _('Top 100 Articles') %}
          <tr class="most-visited-row">
            <td class="row-title">
              {{ row.title }}
              <div>{{ row.description }}</div>
            </td>
            <td colspan="2">
              {% trans numerator=number(row.numerator), denominator=number(row.denominator) %}
                {{ numerator }} of {{ denominator }}
              {% endtrans %}
            </td>
          </tr>
          <tr>
            <td colspan="3">
              <div class="percent-graph">
                <span>{{ row.percent }}%</span>
                <div style="width: {{ row.percent }}%"{% if should_color %} class="{{ 'best' if row.percent == 100 else ('better' if row.percent >= 20 else 'bad') }}"{% endif %}></div>
              </div>
            </td>
          </tr>
        {% else %}
          <tr>
            <td class="row-title">
              {{ row.title }}
              <div>{{ row.description }}</div>
            </td>
            <td>
              {% trans numerator=number(row.numerator), denominator=number(row.denominator) %}
                {{ numerator }}
                <small>of {{ denominator }}</small>
              {% endtrans %}
            </td>
            <td>
              {{ row.percent }}%
              <div class="percent-graph">
                <div style="width: {{ row.percent }}%"{% if should_color %} class="{{ 'best' if row.percent == 100 else ('better' if row.percent >= 20 else 'bad') }}"{% endif %}></div>
              </div>
            </td>
          </tr>
        {% endif %}
      {% endfor %}
      <tr class="ui-strings-row">
        <td class="row-title">
          {{ _('User Interface') }}
          <div>
            {% trans url='https://localize.mozilla.org/' %}
              A fully translated user interface improves the experience for
              site visitors in your language. Help
              <a href="{{ url }}">translate the interface</a>.<commit_msg>Bug 1230580 - On localization dashboard, replace the link to Verbatim with a link to Pontoon<commit_after>{% macro print_readout(readout, locale=None, max_rows=10, product=None) %}
  {% if not readout.hide_readout %}
    <details class="h2" open="open">
      <summary class="with-mode-selectors">
        <a id="{{ readout.slug }}">{{ readout.title }}</a>
      </summary>
      <ul class="readout-modes" data-slug="{{ readout.slug }}">
        {% for key, name in readout.modes %}
          <li class="mode{% if key == readout.default_mode %} active
          {% endif %}" data-url="{{ url('dashboards.wiki_rows',
                  readout.slug)|urlparams(max=max_rows, mode=key, locale=locale, product=product.slug) }}">
            <a href="#">{{ name }}</a>
          </li>
        {% endfor %}
      </ul>
      {% if readout.description %}
        <p>
          {{ readout.description }}
        </p>
      {% endif %}
      <table class="documents" id="{{ readout.slug }}-table">
        {{ readout.render(max_rows=max_rows)|safe }}
      </table>
      <div class="table-footer">
        <a href="{{ readout.get_absolute_url(request.LANGUAGE_CODE, product) }}">{{ readout.details_link_text }}</a>
      </div>
    </details>
  {% endif %}
{% endmacro %}

{% macro overview_section(readouts, printed_rows) %}
{# printed_rows is a tuple of pairs, (row, should_color), like so:
  ((row1, True/False), (row2, True/False), ... etc) #}
  <details class="h2" open="open">
    <summary>{{ _('Overview') }}</summary>
    <table class="overview l10n-overview">
      {% for row, should_color in printed_rows %}
        {% if row.title == _('Top 100 Articles') %}
          <tr class="most-visited-row">
            <td class="row-title">
              {{ row.title }}
              <div>{{ row.description }}</div>
            </td>
            <td colspan="2">
              {% trans numerator=number(row.numerator), denominator=number(row.denominator) %}
                {{ numerator }} of {{ denominator }}
              {% endtrans %}
            </td>
          </tr>
          <tr>
            <td colspan="3">
              <div class="percent-graph">
                <span>{{ row.percent }}%</span>
                <div style="width: {{ row.percent }}%"{% if should_color %} class="{{ 'best' if row.percent == 100 else ('better' if row.percent >= 20 else 'bad') }}"{% endif %}></div>
              </div>
            </td>
          </tr>
        {% else %}
          <tr>
            <td class="row-title">
              {{ row.title }}
              <div>{{ row.description }}</div>
            </td>
            <td>
              {% trans numerator=number(row.numerator), denominator=number(row.denominator) %}
                {{ numerator }}
                <small>of {{ denominator }}</small>
              {% endtrans %}
            </td>
            <td>
              {{ row.percent }}%
              <div class="percent-graph">
                <div style="width: {{ row.percent }}%"{% if should_color %} class="{{ 'best' if row.percent == 100 else ('better' if row.percent >= 20 else 'bad') }}"{% endif %}></div>
              </div>
            </td>
          </tr>
        {% endif %}
      {% endfor %}
      <tr class="ui-strings-row">
        <td class="row-title">
          {{ _('User Interface') }}
          <div>
            {% trans url=_('https://pontoon.mozilla.org/projects/sumo/', context='L10n: Link to a site with information on how to translate the UI into your language.') %}
              A fully translated user interface improves the experience for
              site visitors in your language. Help
              <a href="{{ url }}">translate the interface</a>.
{'fraction_non_alphanumeric': 0.17856647719395535, 'fraction_numerical': 0.007625121308748093, 'mean_word_length': 1.9018503620273532, 'pattern_counts': {'":': 0, '<': 129, '<?xml version=': 0, '>': 133, 'https://': 2, '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': '4820762', 'n_tokens_mistral': 2275, 'n_tokens_neox': 2048, 'n_words': 505}