Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#18393 closed Bug (fixed)

Don't let blocktrans crash on ValueError

Reported by: Julien Phalip Owned by: nobody
Component: Internationalization Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If a translator mistypes a variable name's format, causing the string formatting to fail with a ValueError, then the entire page will go down with a 500 error. That error should be ignored to prevent that.

Note: this is different than if the variable name itself is wrong. In that a case, a KeyError is returned but this is already taken care of by https://github.com/django/django/commit/16bb9c594c

Pull request coming soon.

Change History (4)

comment:1 by Julien Phalip, 12 years ago

comment:2 by Ramiro Morales, 12 years ago

Triage Stage: UnreviewedReady for checkin

comment:3 by Julien Phalip <jphalip@…>, 12 years ago

Resolution: fixed
Status: newclosed

In [432339a72c20f78abf1999892a39c71b5d853174]:

Fixed #18393 -- Prevented blocktrans to crash when a variable name is badly formatted.

comment:4 by Julien Phalip <jphalip@…>, 12 years ago

In [4b28ea37e52e18720c1c2a6ad611dee986126dd5]:

Merge pull request #94 from jphalip/tickets/18393-blocktrans-valueerror

Fixed #18393 -- Prevented blocktrans to crash when a variable name is badly formatted.

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