{% load i18n %}

{% trans "Bay Type Incompatibility" %}

{% if is_module_view %} {# Module detail view #}

{% blocktrans with module_type=object.module_type module_bay=object.module_bay %} Module type {{ module_type }} is not compatible with module bay {{ module_bay }}: their bay type sets share no common members. {% endblocktrans %}

{% trans "Bay types on bay:" %} {% for bt in object.module_bay.module_bay_types.all %} {{ bt }}{% if not forloop.last %}, {% endif %} {% endfor %}  —  {% trans "Bay types on module type:" %} {% for bt in object.module_type.module_bay_types.all %} {{ bt }}{% if not forloop.last %}, {% endif %} {% endfor %}

{% else %} {# ModuleBay detail view #}

{% blocktrans with module_type=object.installed_module.module_type bay=object %} Module type {{ module_type }} is not compatible with this bay ({{ bay }}): their bay type sets share no common members. {% endblocktrans %}

{% trans "Bay types on bay:" %} {% for bt in object.module_bay_types.all %} {{ bt }}{% if not forloop.last %}, {% endif %} {% endfor %}  —  {% trans "Bay types on module type:" %} {% for bt in object.installed_module.module_type.module_bay_types.all %} {{ bt }}{% if not forloop.last %}, {% endif %} {% endfor %}

{% endif %}