diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2019-06-27 09:39:47 -0700 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-06-28 16:46:18 +0200 |
commit | 42b9a23267f14be39b9b00958e18d5746783208e (patch) | |
tree | f19f6a2cd70025744ad9d668a15a0c0a5ed8aac3 /django/views/csrf.py | |
parent | 2b03e8e9e8205ae3a3aa128764277e70b7c30803 (diff) | |
download | django-42b9a23267f14be39b9b00958e18d5746783208e.tar.gz |
Fixed #30400 -- Improved typography of user facing strings.
Thanks Claude Paroz for assistance with translations.
Diffstat (limited to 'django/views/csrf.py')
-rw-r--r-- | django/views/csrf.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/django/views/csrf.py b/django/views/csrf.py index b1c8d25235..27e7b5ca37 100644 --- a/django/views/csrf.py +++ b/django/views/csrf.py @@ -112,21 +112,21 @@ def csrf_failure(request, reason="", template_name=CSRF_FAILURE_TEMPLATE_NAME): 'reason': reason, 'no_referer': reason == REASON_NO_REFERER, 'no_referer1': _( - "You are seeing this message because this HTTPS site requires a " - "'Referer header' to be sent by your Web browser, but none was " - "sent. This header is required for security reasons, to ensure " - "that your browser is not being hijacked by third parties."), + 'You are seeing this message because this HTTPS site requires a ' + '“Referer header” to be sent by your Web browser, but none was ' + 'sent. This header is required for security reasons, to ensure ' + 'that your browser is not being hijacked by third parties.'), 'no_referer2': _( - "If you have configured your browser to disable 'Referer' headers, " - "please re-enable them, at least for this site, or for HTTPS " - "connections, or for 'same-origin' requests."), + 'If you have configured your browser to disable “Referer” headers, ' + 'please re-enable them, at least for this site, or for HTTPS ' + 'connections, or for “same-origin” requests.'), 'no_referer3': _( - "If you are using the <meta name=\"referrer\" " - "content=\"no-referrer\"> tag or including the 'Referrer-Policy: " - "no-referrer' header, please remove them. The CSRF protection " - "requires the 'Referer' header to do strict referer checking. If " - "you're concerned about privacy, use alternatives like " - "<a rel=\"noreferrer\" ...> for links to third-party sites."), + 'If you are using the <meta name="referrer" ' + 'content=\"no-referrer\"> tag or including the “Referrer-Policy: ' + 'no-referrer” header, please remove them. The CSRF protection ' + 'requires the “Referer” header to do strict referer checking. If ' + 'you’re concerned about privacy, use alternatives like ' + '<a rel=\"noreferrer\" …> for links to third-party sites.'), 'no_cookie': reason == REASON_NO_CSRF_COOKIE, 'no_cookie1': _( "You are seeing this message because this site requires a CSRF " @@ -134,9 +134,9 @@ def csrf_failure(request, reason="", template_name=CSRF_FAILURE_TEMPLATE_NAME): "security reasons, to ensure that your browser is not being " "hijacked by third parties."), 'no_cookie2': _( - "If you have configured your browser to disable cookies, please " - "re-enable them, at least for this site, or for 'same-origin' " - "requests."), + 'If you have configured your browser to disable cookies, please ' + 're-enable them, at least for this site, or for “same-origin” ' + 'requests.'), 'DEBUG': settings.DEBUG, 'docs_version': get_docs_version(), 'more': _("More information is available with DEBUG=True."), |