{% extends "base.html" %} {% load crispy_forms_tags i18n static %} {% block extra_script %} {% endblock extra_script %} {% block breadcrumbs %} {% endblock breadcrumbs %} {% block content %}

{% translate "Notification diagnostics" %}

{% translate "Check subscription eligibility for hypothetical events. This does not send notifications. The user’s own actions do not trigger notifications; event details, digest content, and delivery rate limits can also affect delivery." %}

{{ notification_form|crispy }}
{% if notification_debug_target %}

{% blocktranslate with target=notification_debug_target %}Notification eligibility for {{ target }}{% endblocktranslate %}

{% if notification_summary.broad and not notification_summary.empty %}

{% translate "Inherited project settings are shown once, alongside differences across accessible components. Choose a component or translation path for detailed eligibility checks." %}

{% endif %} {% if notification_results %}
{% if notification_summary.broad %} {% endif %} {% for result in notification_results %} {% if notification_summary.broad %} {% endif %} {% endfor %}
{% translate "Notification" %} {% if notification_summary.broad %} {% translate "Inherited project settings" %} {% else %} {% translate "Settings and eligibility" %} {% endif %} {% translate "Component exceptions" %}
{{ result.name }} {% if result.subscription %}

{{ result.subscription.get_scope_display }}: {{ result.subscription.get_frequency_display }} {% if result.subscription.onetime %} {% translate "One-time" %} {% endif %}

{{ result.reason }}

{% elif notification_summary.broad %}

{% translate "No inherited subscription. Matching settings are listed under component exceptions." %}

{% endif %} {% if result.subscription and result.conditions or result.subscription and result.overridden %} {% if result.conditions %}
    {% for condition in result.conditions %}
  • {{ condition }}
  • {% endfor %}
{% endif %} {% if result.overridden %}

{% translate "Overridden subscriptions" %}

{% endif %} {% endif %}
{% if result.exceptions %} {% for exception in result.exceptions %}

{% blocktranslate count count=exception.count %}Different settings in {{ count }} component.{% plural %}Different settings in {{ count }} components.{% endblocktranslate %}

{% if exception.outcome.subscription %}

{% if exception.subscription_id %} {{ exception.outcome.subscription.get_scope_display }}: {{ exception.outcome.subscription.get_frequency_display }} {% else %} {{ exception.outcome.subscription.get_scope_display }}: {{ exception.outcome.subscription.get_frequency_display }} {% endif %} {% if exception.outcome.subscription.onetime %} {% translate "One-time" %} {% endif %}

{% endif %} {% if exception.outcome.subscription %}

{{ exception.outcome.reason }}

{% else %}

{% translate "These components have no matching subscription, so this notification will not be sent." %}

{% endif %} {% if exception.shared_count %}

{% translate "Shared components use subscriptions from their original project, not this project’s subscriptions." %}

{% endif %} {% if exception.outcome.subscription and exception.outcome.conditions %}
    {% for condition in exception.outcome.conditions %}
  • {{ condition }}
  • {% endfor %}
{% endif %}

{% if exception.count > notification_detail_limit %} {% translate "Inspect example components:" %} {% else %} {% translate "Inspect components:" %} {% endif %}

{% endfor %} {% else %} {% translate "None" %} {% endif %}
{% else %}

{% if notification_summary.empty %} {% translate "No accessible components or translations in this target." %} {% else %} {% translate "No matching subscriptions in this scope." %} {% endif %}

{% endif %}
{% endif %}

{% translate "Watched projects" %}

{% if notification_watched_count > notification_detail_limit %}

{% blocktranslate count count=notification_watched_count %}{{ count }} watched project.{% plural %}{{ count }} watched projects.{% endblocktranslate %}

{% else %}
    {% for project in notification_watched_projects %}
  • {{ project }}
  • {% empty %}
  • {% translate "No watched projects." %}
  • {% endfor %}
{% endif %}

{% translate "Notification languages" %}

{% if notification_language_count > notification_detail_limit %}

{% blocktranslate count count=notification_language_count %}{{ count }} notification language.{% plural %}{{ count }} notification languages.{% endblocktranslate %}

{% else %}
    {% for language in notification_languages %}
  • {{ language }}
  • {% empty %}
  • {% translate "No notification languages selected. Language-filtered notifications will not be sent." %}
  • {% endfor %}
{% endif %}

{% translate "Subscriptions" %}

{% if notification_subscription_groups %}
{% for group in notification_subscription_groups %} {% for subscription in group.subscriptions %} {% endfor %} {% endfor %}
{% translate "Notification" %} {% translate "Frequency" %}
{{ group.label }} {% if group.target %} — {{ group.target }} {% endif %}
{{ subscription.get_notification_display }} {{ subscription.get_frequency_display }} {% if subscription.onetime %} {% translate "One-time" %} {% endif %}
{% else %}

{% translate "No subscriptions." %}

{% endif %}
{% endblock content %}