[Django] #21324: CSRF failure view not translated

3 views
Skip to first unread message

Django

unread,
Oct 24, 2013, 2:44:58 PM10/24/13
to django-...@googlegroups.com
#21324: CSRF failure view not translated
------------------------------------------------+-------------------------
Reporter: claudep | Owner: claudep
Type: Bug | Status: new
Component: Internationalization | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+-------------------------
As noted in #21322, the CSRF "Forbidden" view is showing untranslatable
content to the end user, which is not nice. We can assume the `DEBUG=True`
part is more developer-oriented, but the text showing to users on
production setups should be translated.

--
Ticket URL: <https://code.djangoproject.com/ticket/21324>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 24, 2013, 3:12:56 PM10/24/13
to django-...@googlegroups.com
#21324: CSRF failure view not translated
-------------------------------------+-------------------------------------

Reporter: claudep | Owner: claudep
Type: Bug | Status: new
Component: | Version: master
Internationalization | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by claudep):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/21324#comment:1>

Django

unread,
Oct 24, 2013, 4:33:16 PM10/24/13
to django-...@googlegroups.com
#21324: CSRF failure view not translated
--------------------------------------+------------------------------------

Reporter: claudep | Owner: claudep
Type: Bug | Status: new
Component: Internationalization | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by bmispelon):

* needs_better_patch: 0 => 1
* stage: Unreviewed => Accepted
* needs_tests: 0 => 1
* needs_docs: 0 => 1


Comment:

I think it's a valid feature request.

A full patch should include tests, a mention in the release notes and
maybe a comment in the code explaining why we're using string formatting
instead of the i18n template tags (from what I understand, it's because
the strings to be translated wouldn't be discovered by `makemessages`
otherwise).

--
Ticket URL: <https://code.djangoproject.com/ticket/21324#comment:2>

Django

unread,
Oct 25, 2013, 2:21:55 AM10/25/13
to django-...@googlegroups.com
#21324: CSRF failure view not translated
--------------------------------------+------------------------------------
Reporter: claudep | Owner: claudep
Type: Bug | Status: assigned
Component: Internationalization | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by claudep):

* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/21324#comment:3>

Django

unread,
Oct 25, 2013, 2:22:03 AM10/25/13
to django-...@googlegroups.com
#21324: CSRF failure view not translated
--------------------------------------+------------------------------------
Reporter: claudep | Owner:

Type: Bug | Status: new
Component: Internationalization | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by claudep):

* owner: claudep =>
* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/21324#comment:4>

Django

unread,
Nov 2, 2013, 4:48:30 AM11/2/13
to django-...@googlegroups.com
#21324: CSRF failure view not translated
--------------------------------------+------------------------------------
Reporter: claudep | Owner: bouke
Type: Bug | Status: assigned
Component: Internationalization | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by bouke):

* status: new => assigned

* owner: => bouke
* needs_tests: 1 => 0
* needs_better_patch: 1 => 0


Comment:

updated the patch and added tests:
https://github.com/django/django/pull/1844

--
Ticket URL: <https://code.djangoproject.com/ticket/21324#comment:5>

Django

unread,
Nov 2, 2013, 6:23:11 AM11/2/13
to django-...@googlegroups.com
#21324: CSRF failure view not translated
--------------------------------------+------------------------------------
Reporter: claudep | Owner: bouke
Type: Bug | Status: closed
Component: Internationalization | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Claude Paroz <claude@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"61074353864293d3ea51e51e09cf4deedee12963"]:
{{{
#!CommitTicketReference repository=""
revision="61074353864293d3ea51e51e09cf4deedee12963"
Fixed #21324 -- Translate CSRF failure view

Thanks to Claude Paroz for the original patch.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/21324#comment:6>

Reply all
Reply to author
Forward
0 new messages