templates: formulate events reminder message differently (#69949)

This commit is contained in:
Valentin Deniaud 2022-10-06 15:03:17 +02:00
parent 9d838d32dc
commit 453d400d45
5 changed files with 7 additions and 7 deletions

View File

@ -6,7 +6,7 @@
<p>
{% blocktrans trimmed with event=booking.event date=date|date:"l j F" time=date|time %}
You have a booking for event "{{ event }}", on {{ date }} at {{ time }}.
You have booked event "{{ event }}", on {{ date }} at {{ time }}.
{% endblocktrans %}
</p>

View File

@ -4,7 +4,7 @@
{% block content %}{% autoescape off %}{% trans "Hi," %}
{% blocktrans trimmed with event=booking.event date=date|date:"l j F" time=date|time %}
You have a booking for event "{{ event }}", on {{ date }} at {{ time }}.
You have booked event "{{ event }}", on {{ date }} at {{ time }}.
{% endblocktrans %}
{% if email_extra_info %}
{{ email_extra_info }}

View File

@ -1,5 +1,5 @@
{% load i18n %}
{% blocktrans trimmed with event=booking.event date=date|date:"d/m" time=date|time context "SMS message, avoid special caracters" %}
Reminder: you have a booking for event "{{ event }}", on {{ date }} at {{ time }}.
Reminder: you have booked event "{{ event }}", on {{ date }} at {{ time }}.
{% endblocktrans %}{% if sms_extra_info %} {{ sms_extra_info }}{% endif %}

View File

@ -2766,7 +2766,7 @@ def test_manager_reminders_preview(app, admin_user):
assert len(resp.pyquery.find('p.email-subject')) == 1
assert '<strong>Subject:</strong> Reminder for your booking tomorrow at 2:30 p.m.' in resp.text
assert (
'You have a booking for event "Lorem Ipsum <small>(event label)</small>", on Tuesday 2 June at 2:30 p.m..'
'You have booked event "Lorem Ipsum <small>(event label)</small>", on Tuesday 2 June at 2:30 p.m..'
in resp.text
)
assert 'An ID will be required' in resp.text
@ -2778,7 +2778,7 @@ def test_manager_reminders_preview(app, admin_user):
resp = resp.click('Preview SMS')
assert 'Users will receive the following SMS:' in resp.text
assert (
'Reminder: you have a booking for event "Lorem Ipsum <small>(event label)</small>", on 02/06 at 2:30 p.m.. Take ID card.'
'Reminder: you have booked event "Lorem Ipsum <small>(event label)</small>", on 02/06 at 2:30 p.m.. Take ID card.'
in resp.text
)

View File

@ -1944,7 +1944,7 @@ def test_agenda_reminders_email_content(mailoutbox, freezer):
mail_bodies = (mail.body, mail.alternatives[0][0])
for body in mail_bodies:
assert 'Hi,' in body
assert 'You have a booking for event "Pool party", on Friday 3 January at 2 p.m..' in body
assert 'You have booked event "Pool party", on Friday 3 January at 2 p.m..' in body
assert 'Do no forget ID card.' in body
assert 'Come !' in body
assert 'Pricing: 10€' in body
@ -1999,7 +1999,7 @@ def test_agenda_reminders_sms_content(freezer):
body = json.loads(mock_send.call_args[0][0].body.decode())
assert (
body['message']
== 'Reminder: you have a booking for event "Pool party", on 03/01 at 2 p.m.. Do no forget ID card.'
== 'Reminder: you have booked event "Pool party", on 03/01 at 2 p.m.. Do no forget ID card.'
)