{%- macro check_result_count(f, t) %} {% if language_pairs_other_results %} {% set entry_count = language_pairs_other_results.get((f, t)) %} {% if entry_count > 0 -%} {{ entry_count }} {%- endif %} {% endif %} {% endmacro -%} {%- macro render_pair_blocks(grouped_items) -%} {%- for iso_pair, pair_options in grouped_items -%} {%- if pair_options.input_variants -%} {% set pair_has_variant = true %} {%- else -%} {% set pair_has_variant = false %} {%- endif -%} {% set active_pair = false %} {%- if not is_variant %} {%- if iso_pair[0] == _from and iso_pair[1] == _to %} {% set active_pair = true %} {% set nav_classes = "active nav nav-collapse nav-tabs nav-stacked" %} {% else -%} {% set nav_classes = "nav nav-collapse nav-tabs nav-stacked" %} {% endif -%} {% elif is_variant -%} {%- if iso_pair[1] == orig_pair[1] and iso_pair[0] == orig_pair[0] %} {% set nav_classes = "active nav nav-collapse nav-tabs nav-stacked" %} {% set active_pair = true %} {% else -%} {% set nav_classes = "nav nav-collapse nav-tabs nav-stacked" %} {% endif -%} {% else -%} {% set nav_classes = "nav nav-collapse nav-tabs nav-stacked" %} {% endif -%} {%- endmacro -%} {#
#}
{% for iso_group, grouped_items in language_pairs_grouped_by_source.iteritems() %} {# TODO: active pair bug for _from lang when _from is a variant #} {% if iso_group == _from or iso_group == _to or _from|is_variant_of(grouped_items) %} {% set active_group = "active-group" %} {% else %} {% set active_group = "inactive-group" %} {% endif %}
+{{ iso_group|iso_to_language_own_name }}
{{ render_pair_blocks(grouped_items) }}
{% endfor %}
{# vim: set ts=4 sw=4 tw=0 syntax=htmljinja : #}