[Django] #25928: Documentation on THOUSAND_SEPARATOR and NUMBER_GROUPING is still misleading

27 views
Skip to first unread message

Django

unread,
Dec 12, 2015, 11:47:03 AM12/12/15
to django-...@googlegroups.com
#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.

Django

unread,
Dec 12, 2015, 11:49:10 AM12/12/15
to django-...@googlegroups.com
#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 | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by F30):

* cc: f30@… (added)
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/25928#comment:1>

Django

unread,
Dec 12, 2015, 11:59:41 AM12/12/15
to django-...@googlegroups.com
#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 | 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 timgraham):

* stage: Unreviewed => Accepted


Comment:

Could you submit a pull request with the proposed clarifications?

--
Ticket URL: <https://code.djangoproject.com/ticket/25928#comment:2>

Django

unread,
Dec 17, 2015, 1:29:58 AM12/17/15
to django-...@googlegroups.com
#25928: Documentation on THOUSAND_SEPARATOR and NUMBER_GROUPING is still misleading
-------------------------------+------------------------------------
Reporter: F30 | Owner: Wingie
Type: Bug | Status: assigned
Component: Documentation | Version: master

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 Wingie):

* status: new => assigned
* owner: nobody => Wingie


Comment:

can you take a look and see if the clarifications are correct?

https://github.com/Wingie/django/tree/ticket_25928

--
Ticket URL: <https://code.djangoproject.com/ticket/25928#comment:3>

Django

unread,
Jan 4, 2016, 10:30:10 AM1/4/16
to django-...@googlegroups.com
#25928: Documentation on THOUSAND_SEPARATOR and NUMBER_GROUPING is still misleading
-------------------------------+------------------------------------
Reporter: F30 | Owner: Wingie
Type: Bug | Status: assigned
Component: Documentation | Version: master

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
-------------------------------+------------------------------------

Comment (by F30):

Replying to [comment:3 Wingie]:


> can you take a look and see if the clarifications are correct?
>
> https://github.com/Wingie/django/tree/ticket_25928

Looks good to me, it precisely describes the current behavior.
You could get rid of the ":setting:`USE_L10N` is set to ``True``, and"
part in the second paragraph though, as the previous paragraph already
states that `USE_L10N` must always be `True`. I find that repetition
rather confusing.

One could also ask if a behavior which requires such verbose explanations
is really sensible, but that's out of scope for this bug report.

Thanks for the fix,
Felix

--
Ticket URL: <https://code.djangoproject.com/ticket/25928#comment:4>

Django

unread,
Jan 7, 2016, 2:32:49 PM1/7/16
to django-...@googlegroups.com
#25928: Documentation on THOUSAND_SEPARATOR and NUMBER_GROUPING is still misleading
-------------------------------+------------------------------------
Reporter: F30 | Owner: Wingie
Type: Bug | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed

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 Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"abcf3fe68410ff9ffdfe72df9e925efd044d6ff6" abcf3fe6]:
{{{
#!CommitTicketReference repository=""
revision="abcf3fe68410ff9ffdfe72df9e925efd044d6ff6"
[1.9.x] Fixed #25928 -- Clarified precendence of USE_THOUSAND_SEPARATOR
and locale formats.

Backport of 7f218d98915ef3e76a98ef72075a6bde907dfe41 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25928#comment:5>

Django

unread,
Jan 7, 2016, 2:32:50 PM1/7/16
to django-...@googlegroups.com
#25928: Documentation on THOUSAND_SEPARATOR and NUMBER_GROUPING is still misleading
-------------------------------+------------------------------------
Reporter: F30 | Owner: Wingie
Type: Bug | Status: closed
Component: Documentation | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"7f218d98915ef3e76a98ef72075a6bde907dfe41" 7f218d98]:
{{{
#!CommitTicketReference repository=""
revision="7f218d98915ef3e76a98ef72075a6bde907dfe41"


Fixed #25928 -- Clarified precendence of USE_THOUSAND_SEPARATOR and locale
formats.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25928#comment:6>

Reply all
Reply to author
Forward
0 new messages