Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#18393 closed Bug (fixed)

Don't let blocktrans crash on ValueError

Reported by: julien 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 Changed 3 years ago by julien

comment:2 Changed 3 years ago by ramiro

  • Triage Stage changed from Unreviewed to Ready for checkin

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

  • Resolution set to fixed
  • Status changed from new to closed

In [432339a72c20f78abf1999892a39c71b5d853174]:

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

comment:4 Changed 3 years ago by Julien Phalip <jphalip@…>

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