Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#15234 closed (fixed)

Year is localized with USE_THOUSAND_SEPARATOR in admin's date hierarchy under certain conditions

Reported by: Julien Phalip Owned by: nobody
Component: contrib.admin Version: 1.2
Severity: 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

The easiest way to reproduce this bug is:

  • set USE_THOUSAND_SEPARATOR to True.
  • set USE_L10N to True.
  • Install contrib.comments.
  • Create one single comment, or multiple comments all within the same month.
  • Visit /admin/comments/comment/

The year displayed at the top of the page is (for instance): "2,011".

The attached patch fixes the issue and also adds tests for this particular case and for other cases for future-proofing.

See #14895 for a related issue.

Attachments (1)

15234_localized_year_in_date_hierarchy.diff (4.9 KB ) - added by Julien Phalip 13 years ago.

Download all attachments as: .zip

Change History (5)

by Julien Phalip, 13 years ago

comment:1 by Russell Keith-Magee, 13 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Russell Keith-Magee, 13 years ago

Resolution: fixed
Status: newclosed

In [15451]:

Fixed #15234 -- Ensure that years in a date heirarchy don't use commas for thousand separators, regardless of the value of USE_THOUSAND_SEPARATOR. Thanks to Julien Phalip for the report and patch.

comment:3 by Russell Keith-Magee, 13 years ago

In [15455]:

[1.2.X] Fixed #15234 -- Ensure that years in a date heirarchy don't use commas for thousand separators, regardless of the value of USE_THOUSAND_SEPARATOR. Thanks to Julien Phalip for the report and patch.

Backport of r15451 from trunk.

comment:4 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

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