#35852: intcomma not locale aware when given a decimal as string
-------------------------------------+-------------------------------------
Reporter: Jonathan Ströbele | Owner: Tim
| McCurrach
Type: Bug | Status: assigned
Component: contrib.humanize | Version: 5.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim McCurrach):
* owner: HEMANT MISHRA => Tim McCurrach
Comment:
Thanks all for the conversation above, that's really helpful :)
I think the issue is that for non-float/decimals, we attempt conversion to
an integer, and when that fails, we fallback to using the logic within
intcomma (instead of the logic within `number_format` - which is locale
aware). I think converting to a Decimal instead might solve this issue.
I'll investigate this and make a patch if it seems to fix things.
--
Ticket URL: <https://code.djangoproject.com/ticket/35852#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019671743a16-eb27b218-9bd3-45a8-a542-dd24948add24-000000%40eu-central-1.amazonses.com.