Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#16404 closed Cleanup/optimization (fixed)

intcomma & thousand separator

Reported by: grepsd@… Owned by: Grepsd
Component: contrib.humanize Version: master
Severity: Release blocker Keywords:
Cc: Grepsd Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

The intcomma template filter from the humanize package isn't doing the thousand separating if you're not setting the USE_THOUSAND_SEPARATOR to True.

If you set the USE_THOUSAND_SEPARATOR, every number display in the template is processed, so the intcomma won't change that.

The intcomma should do the thousand separating without relying on the USE_THOUSAND_SEPARATOR setting.

NB : intcomma is calling number_format which is calling numberformat.format.

(from rev: 16168)

Attachments (1)

diff_django_humanize_fix.diff (2.3 KB) - added by grepsd@… 4 years ago.
fix the humanize.intcomma template filter to force the use of grouping in the number_format.format method.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 4 years ago by BernhardEssl

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

I agree with you that is confusing.

Changed 4 years ago by grepsd@…

fix the humanize.intcomma template filter to force the use of grouping in the number_format.format method.

comment:2 Changed 4 years ago by Grepsd

  • Cc Grepsd added
  • Has patch set
  • Owner changed from nobody to Grepsd
  • Version changed from 1.3 to SVN

comment:3 Changed 4 years ago by jezdez

  • Component changed from Template system to contrib.humanize
  • Needs tests set
  • Patch needs improvement set
  • Triage Stage changed from Design decision needed to Accepted

comment:4 Changed 4 years ago by anonymous

  • Severity changed from Normal to Release blocker

Behavior is a regression from previous release, therefore release blocker.

comment:5 Changed 3 years ago by jezdez

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

In [16726]:

Fixed #16404 -- Fixed a regression in the localization changes in the humanize app made in r16168. Thanks, grepsd@….

comment:6 Changed 3 years ago by kmtracey

In [16736]:

Add a test for the intcomma regression described in #16404/#16562, fixed in r16726. Refs #16404.

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