<commit_before>{% load i18n subtitles_tags %}

<div class="lang_menu">
    {% if video %}
    <div class="hd">
 
        <span>
          {% blocktrans count video.languages_count as number %}
              {{ number }} language
          {% plural %}
              {{ number }} languages
          {% endblocktrans %}
        </span>
    </div><!-- hd -->
    
    <div class="bd clearfix">
        {% for lang in languages|slice:":7" %}
            {% with lang.subtitle_count as lines_count %}
                {% if lines_count %}  
                    <a href="{{ lang.get_absolute_url }}" class="{% complete_color lang %}">
                        <span>{% complete_indicator lang %} {{ lang.language_display }}</span>
                    </a>
                {% endif %}
            {% endwith %}
        {% endfor %}
        {% if languages.count > 7 %}
          <a href="{{ video.get_absolute_url }}#video-menu" class="more_link">→ View all</a>
        {% endif %}
    </div>
    {% endif %}
</div><commit_msg>Fixed bug where 'view all' would be shown for every video, regardless of lang count, for https://unisubs.sifterapp.com/projects/12298/issues/159/<commit_after>{% load i18n subtitles_tags %}

<div class="lang_menu">
    {% if video %}
    <div class="hd">
 
        <span>
          {% blocktrans count video.languages_count as number %}
              {{ number }} language
          {% plural %}
              {{ number }} languages
          {% endblocktrans %}
        </span>
    </div><!-- hd -->
    
    <div class="bd clearfix">
        {% for lang in languages|slice:":7" %}
            {% with lang.subtitle_count as lines_count %}
                {% if lines_count %}  
                    <a href="{{ lang.get_absolute_url }}" class="{% complete_color lang %}">
                        <span>{% complete_indicator lang %} {{ lang.language_display }}</span>
                    </a>
                {% endif %}
            {% endwith %}
        {% endfor %}
        {% if languages|length > 7 %}
          <a href="{{ video.get_absolute_url }}#video-menu" class="more_link">→ View all</a>
        {% endif %}
    </div>
    {% endif %}
</div>
{'fraction_non_alphanumeric': 0.15845232611699678, 'fraction_numerical': 0.007369875633348687, 'mean_word_length': 1.691449814126394, 'pattern_counts': {'":': 2, '<': 33, '<?xml version=': 0, '>': 35, 'https://': 1, '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': '2124142', 'n_tokens_mistral': 689, 'n_tokens_neox': 597, 'n_words': 149}