mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-27 13:51:12 -05:00
The logic to say ‘1 email sent’ vs ‘12 text messages sent’ is repeated all over the place. So this commit adds a component to put it in one place.
15 lines
354 B
HTML
15 lines
354 B
HTML
{% macro message_count_label(count, template_type) -%}
|
|
{%- if template_type == 'sms' -%}
|
|
{%- if count == 1 -%}
|
|
text message
|
|
{%- else -%}
|
|
text messages
|
|
{%- endif -%}
|
|
{%- elif template_type == 'email' -%}
|
|
{%- if count == 1 -%}
|
|
email
|
|
{%- else -%}
|
|
emails
|
|
{%- endif -%}
|
|
{%- endif %} sent
|
|
{%- endmacro %} |