{%- comment -%}
  Accepts one param, "nightly: true/false, default false"
{%- endcomment-%}

{%- assign nightly = include.nightly | default: false -%}
{%- assign langs = site.data.translations | where_exp: "item", "item.isTranslated == true" -%}

{%- if nightly == true -%}
  {%- assign text = "nightly" -%}
{%- else -%}
  {%- assign text = "release" -%}
{%- endif -%}

{%- for lang in langs %}
<tr>
    <td class="flag-{{ lang.flagCode | default: lang.code }}">{{ lang.name }}</td>
    {% unless nightly == true %}
    <td>
        <a href="https://osdn.net/projects/tortoisesvn/storage/{{ site.version.short }}/Documentation/TortoiseSVN-{{ site.version.short }}-{{ lang.exeCode | default: lang.code }}.pdf/">PDF</a>
    </td>
    {% endunless %}
    <td>
        <a href="/docs/{{ text }}/TortoiseSVN_{{ lang.exeCode | default: lang.code }}/index.html">HTML</a></td>
    {% unless nightly == true %}
    <td>
        <a href="https://osdn.net/projects/tortoisesvn/storage/{{ site.version.short }}/Documentation/TortoiseMerge-{{ site.version.short }}-{{ lang.exeCode | default: lang.code }}.pdf/">PDF</a>
    </td>
    {% endunless %}
    <td>
        <a href="/docs/{{ text }}/TortoiseMerge_{{ lang.exeCode | default: lang.code }}/index.html">HTML</a>
    </td>
</tr>
{% endfor -%}
