From 3bccf39c7781680703a7509330314e606b0598cd Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 11 May 2017 11:11:59 +0100 Subject: [PATCH 1/4] =?UTF-8?q?Make=20the=20=E2=80=98no=20recipient=20colu?= =?UTF-8?q?mn=E2=80=99=20error=20more=20concise?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Word salad. --- app/templates/views/check.html | 2 +- tests/app/main/views/test_send.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/views/check.html b/app/templates/views/check.html index a9c3b3a2d..82dbdac45 100644 --- a/app/templates/views/check.html +++ b/app/templates/views/check.html @@ -57,7 +57,7 @@
{% call banner_wrapper(type='dangerous') %}

- Your file needs to have {{ recipients.recipient_column_headers | formatted_list( + Your file needs {{ recipients.recipient_column_headers | formatted_list( prefix='a column called', prefix_plural='columns called' ) }} diff --git a/tests/app/main/views/test_send.py b/tests/app/main/views/test_send.py index a4c063a1e..f1653264a 100644 --- a/tests/app/main/views/test_send.py +++ b/tests/app/main/views/test_send.py @@ -130,7 +130,7 @@ def test_upload_csvfile_with_errors_shows_check_page_with_errors( +447700900986 """, ( - 'Your file needs to have a column called ‘phone number’ ' + 'Your file needs a column called ‘phone number’ ' 'Your file has columns called ‘telephone’ and ‘name’. ' 'Skip to file contents' ) From 30fe6db2e2df4928cb92f7f83d0857efff173971 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 11 May 2017 11:14:27 +0100 Subject: [PATCH 2/4] =?UTF-8?q?Don=E2=80=99t=20repeat=20names=20of=20colum?= =?UTF-8?q?ns=20in=20the=20error=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It makes the error message quite noisy. We’re going to move the table right underneath the error message, so you’ll be able to see the column names right there. --- app/templates/views/check.html | 8 +------- tests/app/main/views/test_send.py | 3 +-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/app/templates/views/check.html b/app/templates/views/check.html index 82dbdac45..ec19a4dc1 100644 --- a/app/templates/views/check.html +++ b/app/templates/views/check.html @@ -81,13 +81,7 @@ your template

- Your file has {{ recipients.column_headers | formatted_list( - prefix='one column, called ', - prefix_plural='columns called ' - ) }}. -

-

- It doesn’t have {{ recipients.missing_column_headers | formatted_list( + Your file doesn’t have {{ recipients.missing_column_headers | formatted_list( conjunction='or', prefix='a column called ', prefix_plural='columns called ' diff --git a/tests/app/main/views/test_send.py b/tests/app/main/views/test_send.py index f1653264a..ddcd61a48 100644 --- a/tests/app/main/views/test_send.py +++ b/tests/app/main/views/test_send.py @@ -142,8 +142,7 @@ def test_upload_csvfile_with_errors_shows_check_page_with_errors( """, ( 'The columns in your file need to match the double brackets in your template ' - 'Your file has one column, called ‘phone number’. ' - 'It doesn’t have a column called ‘name’. ' + 'Your file doesn’t have a column called ‘name’. ' 'Skip to file contents' ) ), From f836f206e6150eee7478be29065d48dfcfffefa7 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 11 May 2017 11:22:43 +0100 Subject: [PATCH 3/4] =?UTF-8?q?Say=20=E2=80=98missing=E2=80=99=20rather=20?= =?UTF-8?q?than=20=E2=80=98doesn=E2=80=99t=20have=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Missing gives more of a suggestion that this is something to be fixed, rather than just a statement of fact. --- app/templates/views/check.html | 4 ++-- tests/app/main/views/test_send.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/templates/views/check.html b/app/templates/views/check.html index ec19a4dc1..a48eb7506 100644 --- a/app/templates/views/check.html +++ b/app/templates/views/check.html @@ -81,8 +81,8 @@ your template

- Your file doesn’t have {{ recipients.missing_column_headers | formatted_list( - conjunction='or', + Your file is missing {{ recipients.missing_column_headers | formatted_list( + conjunction='and', prefix='a column called ', prefix_plural='columns called ' ) }}. diff --git a/tests/app/main/views/test_send.py b/tests/app/main/views/test_send.py index ddcd61a48..ae064d215 100644 --- a/tests/app/main/views/test_send.py +++ b/tests/app/main/views/test_send.py @@ -142,7 +142,7 @@ def test_upload_csvfile_with_errors_shows_check_page_with_errors( """, ( 'The columns in your file need to match the double brackets in your template ' - 'Your file doesn’t have a column called ‘name’. ' + 'Your file is missing a column called ‘name’. ' 'Skip to file contents' ) ), From d37f7b6bc5301d7767d799391ee314ff2c659197 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 11 May 2017 11:33:25 +0100 Subject: [PATCH 4/4] =?UTF-8?q?Don=E2=80=99t=20repeat=20=5Fyour=20file=5F?= =?UTF-8?q?=20at=20start=20of=20paragraph?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Looks weird, like we’re telling you two contradictory things. Doesn’t scan well. --- app/templates/views/check.html | 2 +- tests/app/main/views/test_send.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/views/check.html b/app/templates/views/check.html index a48eb7506..e56a1a60e 100644 --- a/app/templates/views/check.html +++ b/app/templates/views/check.html @@ -63,7 +63,7 @@ ) }}

- Your file has {{ recipients.column_headers | formatted_list( + Right now it has {{ recipients.column_headers | formatted_list( prefix='one column, called ', prefix_plural='columns called ' ) }}. diff --git a/tests/app/main/views/test_send.py b/tests/app/main/views/test_send.py index ae064d215..d38fea016 100644 --- a/tests/app/main/views/test_send.py +++ b/tests/app/main/views/test_send.py @@ -131,7 +131,7 @@ def test_upload_csvfile_with_errors_shows_check_page_with_errors( """, ( 'Your file needs a column called ‘phone number’ ' - 'Your file has columns called ‘telephone’ and ‘name’. ' + 'Right now it has columns called ‘telephone’ and ‘name’. ' 'Skip to file contents' ) ),