<commit_before>{{#if model.categories}}
  <div class='contents'>
    <table id='topic-list' class='categories'>
      <thead>
        <tr>
          <th class='category'>{{i18n categories.category}}</th>
          <th class='latest'>{{i18n categories.latest}}</th>
          <th class='stats topics'>{{i18n categories.topics}}</th>
          <th class='stats posts'>{{i18n categories.posts}}
            {{#if canEdit}}<button title='{{i18n categories.toggle_ordering}}' class='btn toggle-admin no-text' {{action toggleOrdering}}><i class='fa fa-wrench'></i></button>{{/if}}
          </th>
        </tr>
      </thead>
      <tbody>
        {{#each model.categories}}
        <tr data-category_id='{{unbound id}}' {{bind-attr class="description_excerpt:has-description:no-description"}}>
          <td class='category'>
            <div>
              <div class="pull-left">
                {{#if controller.ordering}}<i class="fa fa-bars"></i>{{/if}}
                {{categoryLink this allowUncategorized=true}}
                {{#if unreadTopics}}
                  <a href={{unbound unreadUrl}} class='badge new-posts badge-notification' title='{{i18n topic.unread_topics count="unreadTopics"}}'>{{unbound unreadTopics}}</a>
                {{/if}}
                {{#if newTopics}}
                  <a href={{unbound newUrl}} class='badge new-posts badge-notification' title='{{i18n topic.new_topics count="newTopics"}}'>{{unbound newTopics}} <i class='fa fa-asterisk'></i></a>
                {{/if}}
              </div>
              <div class='featured-users'>
                {{#each featured_users}}
                  <a href="/users/{{unbound username_lower}}">{{avatar this imageSize="small"}}</a>
                {{/each}}
              </div>
              <div class="clearfix"></div>
            </div>
            {{#if description_excerpt}}
              <div class="category-description">
                {{{description_excerpt}}}
              </div>
            {{/if}}
            {{#if subcategories}}
              <div class='subcategories'>
                {{i18n categories.subcategories}}
                {{#each subcategory in subcategories}}
                  {{categoryLink subcategory}}
                {{/each}}
              </div>
            {{/if}}
          </td>
          <td {{bind-attr class="archived :latest"}}>
            {{#each featuredTopics}}
              <div class="featured-topic">
                {{topicStatus topic=this}}
                <a class='title' href="{{unbound lastUnreadUrl}}">{{{unbound fancy_title}}}</a>
                {{#if unread}}
                  <a href="{{unbound lastUnreadUrl}}" class='badge unread badge-notification' title='{{i18n topic.unread_posts count="unread"}}'>{{unread}}</a>
                {{/if}}
                {{#if new_posts}}
                  <a href="{{unbound lastUnreadUrl}}" class='badge new-posts badge-notification' title='{{i18n topic.new_posts count="new_posts"}}'>{{new_posts}}</a>
                {{/if}}
                {{#if unseen}}
                  <a href="{{unbound lastUnreadUrl}}" class='badge new-posts badge-notification' title='{{i18n topic.new}}'><i class='fa fa-asterisk'></i></a>
                {{/if}}

                {{#if controller.latestTopicOnly}}
                  <div class='last-user-info'>
                    {{i18n categories.latest_by}} <a href="{{{unbound lastPosterUrl}}}">{{unbound last_poster.username}}</a>
                    <a href="{{unbound lastPostUrl}}">{{unboundAge last_posted_at}}</a>
                  </div>
                {{else}}
                  &nbsp;
                  <a href="{{unbound lastPostUrl}}" class="last-posted-at">{{unboundAge last_posted_at}}</a>
                {{/if}}
              </div>
            {{/each}}
          </td>
          <td class='stats' {{bind-attr title="topicStatsTitle"}}>
            <table class="categoryStats">
              {{#each topicCountStats}}
                <tr>
                  <td class="value">{{value}}</td>
                  <td class="unit">{{unit}}</td>
                </tr>
              {{/each}}
            </table>
          </td>
          <td class='stats' {{bind-attr title="postStatsTitle"}}>
            <table class="categoryStats">
              {{#each postCountStats}}
                <tr>
                  <td class="value">{{value}}</td>
                  <td class="unit">{{unit}}</td>
                </tr>
              {{/each}}
            </table>
          </td>
        </tr>
        {{/each}}
      </tbody>
    </table>
  </div>
  <footer id='topic-list-bottom'></footer>
{{/if}}
<commit_msg>Show unread and new counts on sub-categories on /categories page<commit_after>{{#if model.categories}}
  <div class='contents'>
    <table id='topic-list' class='categories'>
      <thead>
        <tr>
          <th class='category'>{{i18n categories.category}}</th>
          <th class='latest'>{{i18n categories.latest}}</th>
          <th class='stats topics'>{{i18n categories.topics}}</th>
          <th class='stats posts'>{{i18n categories.posts}}
            {{#if canEdit}}<button title='{{i18n categories.toggle_ordering}}' class='btn toggle-admin no-text' {{action toggleOrdering}}><i class='fa fa-wrench'></i></button>{{/if}}
          </th>
        </tr>
      </thead>
      <tbody>
        {{#each model.categories}}
        <tr data-category_id='{{unbound id}}' {{bind-attr class="description_excerpt:has-description:no-description"}}>
          <td class='category'>
            <div>
              <div class="pull-left">
                {{#if controller.ordering}}<i class="fa fa-bars"></i>{{/if}}
                {{categoryLink this allowUncategorized=true}}
                {{#if unreadTopics}}
                  <a href={{unbound unreadUrl}} class='badge new-posts badge-notification' title='{{i18n topic.unread_topics count="unreadTopics"}}'>{{unbound unreadTopics}}</a>
                {{/if}}
                {{#if newTopics}}
                  <a href={{unbound newUrl}} class='badge new-posts badge-notification' title='{{i18n topic.new_topics count="newTopics"}}'>{{unbound newTopics}} <i class='fa fa-asterisk'></i></a>
                {{/if}}
              </div>
              <div class='featured-users'>
                {{#each featured_users}}
                  <a href="/users/{{unbound username_lower}}">{{avatar this imageSize="small"}}</a>
                {{/each}}
              </div>
              <div class="clearfix"></div>
            </div>
            {{#if description_excerpt}}
              <div class="category-description">
                {{{description_excerpt}}}
              </div>
            {{/if}}
            {{#if subcategories}}
              <div class='subcategories'>
                {{i18n categories.subcategories}}
                {{#each subcategories}}
                  {{categoryLink this}}
                  {{#if unreadTopics}}
                    <a href={{unbound unreadUrl}} class='badge new-posts badge-notification' title='{{i18n topic.unread_topics count="unreadTopics"}}'>{{unbound unreadTopics}}</a>
                  {{/if}}
                  {{#if newTopics}}
                    <a href={{unbound newUrl}} class='badge new-posts badge-notification' title='{{i18n topic.new_topics count="newTopics"}}'>{{unbound newTopics}} <i class='fa fa-asterisk'></i></a>
                  {{/if}}
                {{/each}}
              </div>
            {{/if}}
          </td>
          <td {{bind-attr class="archived :latest"}}>
            {{#each featuredTopics}}
              <div class="featured-topic">
                {{topicStatus topic=this}}
                <a class='title' href="{{unbound lastUnreadUrl}}">{{{unbound fancy_title}}}</a>
                {{#if unread}}
                  <a href="{{unbound lastUnreadUrl}}" class='badge unread badge-notification' title='{{i18n topic.unread_posts count="unread"}}'>{{unread}}</a>
                {{/if}}
                {{#if new_posts}}
                  <a href="{{unbound lastUnreadUrl}}" class='badge new-posts badge-notification' title='{{i18n topic.new_posts count="new_posts"}}'>{{new_posts}}</a>
                {{/if}}
                {{#if unseen}}
                  <a href="{{unbound lastUnreadUrl}}" class='badge new-posts badge-notification' title='{{i18n topic.new}}'><i class='fa fa-asterisk'></i></a>
                {{/if}}

                {{#if controller.latestTopicOnly}}
                  <div class='last-user-info'>
                    {{i18n categories.latest_by}} <a href="{{{unbound lastPosterUrl}}}">{{unbound last_poster.username}}</a>
                    <a href="{{unbound lastPostUrl}}">{{unboundAge last_posted_at}}</a>
                  </div>
                {{else}}
                  &nbsp;
                  <a href="{{unbound lastPostUrl}}" class="last-posted-at">{{unboundAge last_posted_at}}</a>
                {{/if}}
              </div>
            {{/each}}
          </td>
          <td class='stats' {{bind-attr title="topicStatsTitle"}}>
            <table class="categoryStats">
              {{#each topicCountStats}}
                <tr>
                  <td class="value">{{value}}</td>
                  <td class="unit">{{unit}}</td>
                </tr>
              {{/each}}
            </table>
          </td>
          <td class='stats' {{bind-attr title="postStatsTitle"}}>
            <table class="categoryStats">
              {{#each postCountStats}}
                <tr>
                  <td class="value">{{value}}</td>
                  <td class="unit">{{unit}}</td>
                </tr>
              {{/each}}
            </table>
          </td>
        </tr>
        {{/each}}
      </tbody>
    </table>
  </div>
  <footer id='topic-list-bottom'></footer>
{{/if}}

{'fraction_non_alphanumeric': 0.17892381243006816, 'fraction_numerical': 0.005289390702878649, 'mean_word_length': 1.7844803171905976, 'pattern_counts': {'":': 0, '<': 193, '<?xml version=': 0, '>': 193, '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': '1893406', 'n_tokens_mistral': 2937, 'n_tokens_neox': 2743, 'n_words': 524}