Code

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#15234 closed (fixed)

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

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

Download all attachments as: .zip

Change History (5)

Changed 3 years ago by julien

comment:1 Changed 3 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 3 years ago by russellm

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

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 3 years ago by russellm

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 3 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.