Opened 6 years ago

Closed 6 years ago

Last modified 5 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: UI/UX:

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 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by Julien Phalip

comment:1 Changed 6 years ago by Russell Keith-Magee

Triage Stage: UnreviewedReady for checkin

comment:2 Changed 6 years ago by Russell Keith-Magee

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 Changed 6 years ago by Russell Keith-Magee

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 Changed 5 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

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