#34543: Thousand separator breaking templates
-------------------------------------+-------------------------------------
               Reporter:             |          Owner:  nobody
  pabloriquelmecas                   |
                   Type:  Bug        |         Status:  new
              Component:             |        Version:  4.2
  Uncategorized                      |       Keywords:
               Severity:  Normal     |  
thousand_separator,thousand,separator,spanish
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  1
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Hi, I'm having a really weird behavior regarding the thousand separator
 using the same settings as I used with Django 4.1.9 but it breaks in
 Django 4.2 and 4.2.1.

 The settings are
 LANGUAGE_CODE = 'es-CL'
 USE_THOUSAND_SEPARATOR = True
 THOUSAND_SEPARATOR = "."


 In Django 4.1 (tested both in 4.1.1 and 4.1.9), with the settings above,
 when I call numbers on template it shows correctly like 9.800 (with the
 dot specified in the thousand separator), but in Django 4.2 and 4.2.1, the
 same template with the same settings shows 9 800 (with a blank space as
 thousand separator), I tried switching on and off the USE_L10N and
 USE_I18N but nothing happens and the documentation does not says anything
 about a change of the thousand separator in templates, might be that in
 the new version it could be necessary to use the humanize or similar tag
 to display the thousand separator now?
 It's also weird that when I set USE_THOUSAND_SEPARATOR = False, the blank
 space drops and it shows 9800
 This happens in all my templates

 Thanks to the discord user sarahboyce for pointing a commit made to the
 django project
 
https://github.com/django/django/commit/9f20f382cab9241f2e8ec724eb84d341a68567bc
 that changes the thousand separator from a dot "." to "\xa0", and the
 settings applied in settings.py does not override this.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34543>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/01070187ecec0b80-e483474b-1530-427b-9000-e1fe74c9f535-000000%40eu-central-1.amazonses.com.

Reply via email to