diff --git a/app/formatters.py b/app/formatters.py index 86c187f55..a9519cbcf 100644 --- a/app/formatters.py +++ b/app/formatters.py @@ -448,6 +448,12 @@ def message_count_noun(count, template_type): else: return "text messages" + if template_type == "parts": + if count == 1: + return "text message part" + else: + return "text message parts" + elif template_type == "email": if count == 1: return "email" diff --git a/app/templates/views/trial-mode.html b/app/templates/views/trial-mode.html index 72b37170d..e1f377c6f 100644 --- a/app/templates/views/trial-mode.html +++ b/app/templates/views/trial-mode.html @@ -7,37 +7,33 @@ {% block content_column_content %}

Trial mode

-

When you add a new service it will start in trial mode. This lets you try out Notify.gov, with a few restrictions.

-

While your service is in trial mode you can only:

- - {% if current_service and current_service.trial_mode %} -

- To remove these restrictions, you can request to go live.

- {% else %} -

- To remove these restrictions: -

-
    -
  1. Sign in to Notify.
  2. -
  3. Go to the Settings page.
  4. -
  5. Select Request to go live.
  6. -
- {% endif %} -

- When we receive your request we’ll get back to you within one working day. -

-

Before you request to go live

-

You must:

+

Limits while in trial mode

+

While your service is in trial mode you can only:

+

Each text message is made up of one or more parts.

+ +

For more information on how message parts are calculated, see + Pricing.

+ +

Before going Live

+

Before you request to make your service live so you can send messages to clients:

+ +

Going Live

+ +

To remove the restrictions of Trial Mode and begin sending messages to clients complete the Live Campaign Form.

+

We'll get back to you within one working day.

{% endblock %} diff --git a/app/templates/views/usage.html b/app/templates/views/usage.html index 87ce5ade8..5636536d5 100644 --- a/app/templates/views/usage.html +++ b/app/templates/views/usage.html @@ -19,25 +19,25 @@
- +

Daily messages across all services

You have sent {{ global_message_limit - daily_global_messages_remaining }} of your {{ global_message_limit }} daily messages allowance.

You have {{ daily_global_messages_remaining }} messages remaining.

-

Text messages

+

Text message parts

You have sent - {{ big_number(sms_sent, 'messages of your', smaller=True) }} - {{ big_number(sms_free_allowance, 'free messages allowance.', smaller=True) }} + {{ big_number(sms_sent, 'text message parts of your', smaller=True) }} + {{ big_number(sms_free_allowance, 'free message parts allowance.', smaller=True) }}
You have {% if sms_free_allowance > 0 %} - {{ big_number(sms_allowance_remaining, 'messages remaining.', smaller=True) }} + {{ big_number(sms_allowance_remaining, 'message parts remaining.', smaller=True) }} {% endif %} {# {% for row in sms_breakdown %} {% if row.charged_units > 0 %} {{ big_number( - row.charged_units, + row.charged_units, 'at {:.2f} pence per message'.format(row.rate * 100), smaller=True ) }} @@ -90,7 +90,7 @@ {{ item.month }} {% endcall %} {% for counts, template_type in [ - (item.sms_counts.0, 'sms'), + (item.sms_counts.0, 'parts'), ] %} {% call field(align='left') %} {{ big_number( @@ -126,7 +126,7 @@ {% endif %} {% endcall %} - + {% endcall %}
{% endif %} @@ -140,7 +140,7 @@

- What counts as 1 text message?
+ What counts as 1 text message part?
See pricing.

diff --git a/tests/app/main/views/test_dashboard.py b/tests/app/main/views/test_dashboard.py index b15e55a48..ff851dfed 100644 --- a/tests/app/main/views/test_dashboard.py +++ b/tests/app/main/views/test_dashboard.py @@ -992,8 +992,8 @@ def test_usage_page( sms_column = normalize_spaces(annual_usage[0].text) assert ( - "You have sent 251,800 messages of your 250,000 free messages allowance. You have 0 messages remaining." - in sms_column + "You have sent 251,800 text message parts of your 250,000 free message parts allowance." + " You have 0 message parts remaining." in sms_column ) assert "$29.85 spent" not in sms_column assert "1,500 at 1.65 pence" not in sms_column @@ -1029,8 +1029,8 @@ def test_usage_page_no_sms_spend( annual_usage = page.find_all("div", {"class": "keyline-block"}) sms_column = normalize_spaces(annual_usage[0].text) assert ( - "You have sent 1,000 messages of your 250,000 free messages allowance. You have 249,000 messages remaining." - in sms_column + "You have sent 1,000 text message parts of your 250,000 free message parts allowance." + " You have 249,000 message parts remaining." in sms_column ) assert "$0.00 spent" not in sms_column assert "pence per message" not in sms_column @@ -1106,7 +1106,7 @@ def test_usage_page_with_0_free_allowance( sms_column = normalize_spaces(annual_usage[0].text) assert ( - "You have sent 251,800 messages of your 0 free messages allowance. You have" + "You have sent 251,800 text message parts of your 0 free message parts allowance. You have" in sms_column ) assert "free allowance remaining" not in sms_column