#25928: Documentation on THOUSAND_SEPARATOR and NUMBER_GROUPING is still
misleading
-------------------------------+--------------------
Reporter: F30 | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
The `THOUSAND_SEPARATOR` and `NUMBER_GROUPING` settings are only used if
the current locale doesn't specify a thousands separator. This has been
reported in #15918 and the following sentence has been added to the
documentation:
> Note that if USE_L10N is set to True, then the locale-dictated format
has higher precedence and will be applied instead.
However, the same page of the documentation says about
`USE_THOUSAND_SEPARATOR`:
> When USE_L10N is set to True and if this is also set to True, Django
will use the values of THOUSAND_SEPARATOR and NUMBER_GROUPING to format
numbers.
These two quotes are kind of contradictory, because obviously one really
can't use `USE_THOUSAND_SEPARATOR` without `USE_L10N`. The latter quote is
plain wrong in most cases, as most locales define thousands separators.
`THOUSAND_SEPARATOR` and `NUMBER_GROUPING` are really only respected if
`USE_L10N = True`, `USE_THOUSAND_SEPARATOR = True` and the locale doesn't
specify a thousands separator. I think it would be great to just use
`USE_THOUSAND_SEPARATOR` without `USE_L10N` and manually set
`THOUSAND_SEPARATOR` and `NUMBER_GROUPING`, but that is currently not
possible.
Anyway, I think the discrepancy should at least be removed form the
documentation.
Regards,
Felix
--
Ticket URL: <https://code.djangoproject.com/ticket/25928>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/046.1813538ebe37a347d332ce482a41cb6a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.