From 30fe6db2e2df4928cb92f7f83d0857efff173971 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 11 May 2017 11:14:27 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20repeat=20names=20of=20columns?= =?UTF-8?q?=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' ) ),