Opened 11 years ago

Closed 11 years ago

#21324 closed Bug (fixed)

CSRF failure view not translated

Reported by: Claude Paroz Owned by: Bouke Haarsma
Component: Internationalization Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Attachments (1)

21324.diff (4.4 KB ) - added by Claude Paroz 11 years ago.

Download all attachments as: .zip

Change History (7)

by Claude Paroz, 11 years ago

Attachment: 21324.diff added

comment:1 by Claude Paroz, 11 years ago

Has patch: set

comment:2 by Baptiste Mispelon, 11 years ago

Needs documentation: set
Needs tests: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

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).

comment:3 by Claude Paroz, 11 years ago

Status: newassigned

comment:4 by Claude Paroz, 11 years ago

Owner: Claude Paroz removed
Status: assignednew

comment:5 by Bouke Haarsma, 11 years ago

Needs tests: unset
Owner: set to Bouke Haarsma
Patch needs improvement: unset
Status: newassigned

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

comment:6 by Claude Paroz <claude@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

In 61074353864293d3ea51e51e09cf4deedee12963:

Fixed #21324 -- Translate CSRF failure view

Thanks to Claude Paroz for the original patch.

Note: See TracTickets for help on using tickets.
Back to Top