[Django] #24181: THOUSAND_SEPARATOR strings are reversed

16 views
Skip to first unread message

Django

unread,
Jan 19, 2015, 11:37:30 AM1/19/15
to django-...@googlegroups.com
#24181: THOUSAND_SEPARATOR strings are reversed
-------------------------------+--------------------
Reporter: hannal | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.7
Severity: Normal | Keywords: l10n
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
Hi.

numberformat moduler returns a reversed number as a string when
THOUSAND_SEPARATOR has letters with l18n.


{{{
# coding: utf-8
# mysite/formats/ko/formats.py

THOUSAND_SEPARATOR = u'comma'
}}}


{{{
{% load humanize %}

{{10000|intcomma}}
}}}

* current output : 10ammoc000
* correct output : 10comma000

--
Ticket URL: <https://code.djangoproject.com/ticket/24181>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 19, 2015, 11:38:12 AM1/19/15
to django-...@googlegroups.com
#24181: THOUSAND_SEPARATOR strings are reversed
-------------------------------+--------------------------------------

Reporter: hannal | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.7
Severity: Normal | Resolution:

Keywords: l10n | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Old description:

> Hi.
>
> numberformat moduler returns a reversed number as a string when
> THOUSAND_SEPARATOR has letters with l18n.
>

> {{{
> # coding: utf-8
> # mysite/formats/ko/formats.py
>
> THOUSAND_SEPARATOR = u'comma'
> }}}
>

> {{{
> {% load humanize %}
>
> {{10000|intcomma}}
> }}}
>
> * current output : 10ammoc000
> * correct output : 10comma000

New description:

Hi.

numberformat moduler returns a reversed number as a string when
THOUSAND_SEPARATOR has letters with l18n.


{{{
# mysite/formats/ko/formats.py

THOUSAND_SEPARATOR = 'comma'
}}}


{{{
{% load humanize %}

{{10000|intcomma}}
}}}

* current output : 10ammoc000
* correct output : 10comma000

--

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

Django

unread,
Jan 19, 2015, 11:43:31 AM1/19/15
to django-...@googlegroups.com
#24181: THOUSAND_SEPARATOR strings are reversed
-------------------------------+--------------------------------------

Reporter: hannal | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.7
Severity: Normal | Resolution:

Keywords: l10n | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* has_patch: 0 => 1


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

Django

unread,
Jan 19, 2015, 7:04:59 PM1/19/15
to django-...@googlegroups.com
#24181: THOUSAND_SEPARATOR strings are reversed
-------------------------------+--------------------------------------

Reporter: hannal | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.7
Severity: Normal | Resolution:

Keywords: l10n | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by timgraham):

Is there a real use case for a `THOUSAND_SEPARATOR` of length > 1?

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

Django

unread,
Jan 19, 2015, 9:20:18 PM1/19/15
to django-...@googlegroups.com
#24181: THOUSAND_SEPARATOR strings are reversed
-------------------------------+--------------------------------------

Reporter: hannal | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.7
Severity: Normal | Resolution:

Keywords: l10n | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by hannal):

yes.

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

Django

unread,
Jan 20, 2015, 2:05:05 AM1/20/15
to django-...@googlegroups.com
#24181: THOUSAND_SEPARATOR strings are reversed
-------------------------------+--------------------------------------

Reporter: hannal | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.7
Severity: Normal | Resolution:

Keywords: l10n | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by aaugustin):

Would you mind saying a bit more about that use case -- e.g. in what
language or country it happens?

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

Django

unread,
Jan 20, 2015, 3:38:49 AM1/20/15
to django-...@googlegroups.com
#24181: THOUSAND_SEPARATOR strings are reversed
-------------------------------+--------------------------------------

Reporter: hannal | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.7
Severity: Normal | Resolution:

Keywords: l10n | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by hannal):

Oh, it was related to Korea and Korean, just for some people. So I don't
think my case is normal.
(`NUMBER_GROUPING=4` and `THOUSAND_SEPARATOR` is assigned by one comma and
one space for visibility)

Whether a length of `THOUSAND_SEPARATOR` is 1 or not(`THOUSAND_SEPARATOR`
isn't restrcited by a length), the case is not my intention.

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

Django

unread,
Jan 20, 2015, 3:09:47 PM1/20/15
to django-...@googlegroups.com
#24181: THOUSAND_SEPARATOR strings are reversed
-------------------------------+--------------------------------------

Reporter: hannal | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.7
Severity: Normal | Resolution:

Keywords: l10n | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by claudep):

Why is "has patch" set? hannal, is there a patch somewhere?

--
Ticket URL: <https://code.djangoproject.com/ticket/24181#comment:7>

Django

unread,
Jan 21, 2015, 12:46:41 AM1/21/15
to django-...@googlegroups.com
#24181: THOUSAND_SEPARATOR strings are reversed
-------------------------------+--------------------------------------

Reporter: hannal | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.7
Severity: Normal | Resolution:

Keywords: l10n | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

Comment (by hannal):

https://github.com/hannal/django/commit/f610ca66c622e2fc8059c4c2960fe1a3897987c0

I'm sorry I didn't know how I can attach the patch with "has patch".

Replying to [comment:7 claudep]:


> Why is "has patch" set? hannal, is there a patch somewhere?

--
Ticket URL: <https://code.djangoproject.com/ticket/24181#comment:8>

Django

unread,
Jan 21, 2015, 3:07:56 AM1/21/15
to django-...@googlegroups.com
#24181: THOUSAND_SEPARATOR strings are reversed
---------------------------+------------------------------------

Reporter: hannal | Owner: nobody
Type: Bug | Status: new
Component: Utilities | Version: 1.7
Severity: Normal | Resolution:
Keywords: l10n | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------+------------------------------------
Changes (by claudep):

* component: Uncategorized => Utilities
* needs_tests: 0 => 1
* easy: 0 => 1
* stage: Unreviewed => Accepted


Comment:

Thanks, could you write a test for it, please?

--
Ticket URL: <https://code.djangoproject.com/ticket/24181#comment:9>

Django

unread,
Jan 27, 2015, 4:03:09 PM1/27/15
to django-...@googlegroups.com
#24181: THOUSAND_SEPARATOR strings are reversed
---------------------------+------------------------------------
Reporter: hannal | Owner: varun
Type: Bug | Status: assigned

Component: Utilities | Version: 1.7
Severity: Normal | Resolution:
Keywords: l10n | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------+------------------------------------
Changes (by varun):

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


--
Ticket URL: <https://code.djangoproject.com/ticket/24181#comment:10>

Django

unread,
Feb 7, 2015, 5:02:07 PM2/7/15
to django-...@googlegroups.com
#24181: THOUSAND_SEPARATOR strings are reversed
---------------------------+------------------------------------
Reporter: hannal | Owner: varun
Type: Bug | Status: assigned
Component: Utilities | Version: 1.7
Severity: Normal | Resolution:
Keywords: l10n | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------+------------------------------------

Comment (by varun):

PR: https://github.com/django/django/pull/4081

--
Ticket URL: <https://code.djangoproject.com/ticket/24181#comment:11>

Django

unread,
Feb 8, 2015, 2:08:35 PM2/8/15
to django-...@googlegroups.com
#24181: THOUSAND_SEPARATOR strings are reversed
---------------------------+------------------------------------
Reporter: hannal | Owner: varun
Type: Bug | Status: closed
Component: Utilities | Version: 1.7
Severity: Normal | Resolution: fixed

Keywords: l10n | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------+------------------------------------
Changes (by Claude Paroz <claude@…>):

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


Comment:

In [changeset:"540ca563dea624823e0b363f98302a78294836ad"]:
{{{
#!CommitTicketReference repository=""
revision="540ca563dea624823e0b363f98302a78294836ad"
Fixed #24181 -- Fixed multi-char THOUSAND_SEPARATOR insertion

Report and original patch by Kay Cha.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24181#comment:12>

Django

unread,
Feb 8, 2015, 2:09:39 PM2/8/15
to django-...@googlegroups.com
#24181: THOUSAND_SEPARATOR strings are reversed
---------------------------+------------------------------------
Reporter: hannal | Owner: varun
Type: Bug | Status: closed
Component: Utilities | Version: 1.7
Severity: Normal | Resolution: fixed
Keywords: l10n | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"b44a56c3080312ab94679a396e6b60a18f9b6463"]:
{{{
#!CommitTicketReference repository=""
revision="b44a56c3080312ab94679a396e6b60a18f9b6463"
[1.8.x] Fixed #24181 -- Fixed multi-char THOUSAND_SEPARATOR insertion

Report and original patch by Kay Cha.

Backport of 540ca563de from master.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24181#comment:13>

Reply all
Reply to author
Forward
0 new messages