Ticket #17217: 17217-2.diff

File 17217-2.diff, 3.9 KB (added by claudep, 3 years ago)

Also update docs/topics/i18n/formatting.txt

  • django/conf/locale/cs/formats.py

    diff --git a/django/conf/locale/cs/formats.py b/django/conf/locale/cs/formats.py
    index 1c03615..d4ebb52 100644
    a b DATETIME_INPUT_FORMATS = ( 
    3333    '%Y-%m-%d',             # '2006-10-25'
    3434)
    3535DECIMAL_SEPARATOR = ','
    36 THOUSAND_SEPARATOR = ' '
     36THOUSAND_SEPARATOR = u' ' # non-breaking space
    3737NUMBER_GROUPING = 3
  • django/conf/locale/es_MX/formats.py

    diff --git a/django/conf/locale/es_MX/formats.py b/django/conf/locale/es_MX/formats.py
    index fdedb0d..7f14b97 100644
    a b DATETIME_INPUT_FORMATS = ( 
    2424    '%d/%m/%y %H:%M:%S',
    2525    '%d/%m/%y %H:%M',
    2626)
    27 DECIMAL_SEPARATOR = '.'                 # ',' is also official (less common): NOM-008-SCFI-2002
    28 THOUSAND_SEPARATOR = ' '                # white space
     27DECIMAL_SEPARATOR = '.'   # ',' is also official (less common): NOM-008-SCFI-2002
     28THOUSAND_SEPARATOR = u' ' # non-breaking space
    2929NUMBER_GROUPING = 3
    3030
  • django/conf/locale/fr/formats.py

    diff --git a/django/conf/locale/fr/formats.py b/django/conf/locale/fr/formats.py
    index 2ad05b8..58a2e09 100644
    a b DATETIME_INPUT_FORMATS = ( 
    3737    '%Y-%m-%d',             # '2006-10-25'
    3838)
    3939DECIMAL_SEPARATOR = ','
    40 THOUSAND_SEPARATOR = ' '
     40THOUSAND_SEPARATOR = u' ' # non-breaking space
    4141NUMBER_GROUPING = 3
  • django/conf/locale/nb/formats.py

    diff --git a/django/conf/locale/nb/formats.py b/django/conf/locale/nb/formats.py
    index f20d712..8c232dc 100644
    a b DATETIME_INPUT_FORMATS = ( 
    3939    '%d.%m.%y',              # '25.10.06'
    4040)
    4141DECIMAL_SEPARATOR = ','
    42 THOUSAND_SEPARATOR = ' '
     42THOUSAND_SEPARATOR = u' ' # non-breaking space
    4343NUMBER_GROUPING = 3
  • django/conf/locale/nn/formats.py

    diff --git a/django/conf/locale/nn/formats.py b/django/conf/locale/nn/formats.py
    index f20d712..8c232dc 100644
    a b DATETIME_INPUT_FORMATS = ( 
    3939    '%d.%m.%y',              # '25.10.06'
    4040)
    4141DECIMAL_SEPARATOR = ','
    42 THOUSAND_SEPARATOR = ' '
     42THOUSAND_SEPARATOR = u' ' # non-breaking space
    4343NUMBER_GROUPING = 3
  • django/conf/locale/ru/formats.py

    diff --git a/django/conf/locale/ru/formats.py b/django/conf/locale/ru/formats.py
    index f3a8f2b..430963a 100644
    a b DATETIME_INPUT_FORMATS = ( 
    3636    '%Y-%m-%d',           # '2006-10-25'
    3737)
    3838DECIMAL_SEPARATOR = ','
    39 THOUSAND_SEPARATOR = ' '
     39THOUSAND_SEPARATOR = u' ' # non-breaking space
    4040NUMBER_GROUPING = 3
  • django/conf/locale/sk/formats.py

    diff --git a/django/conf/locale/sk/formats.py b/django/conf/locale/sk/formats.py
    index 9eeee66..adc3174 100644
    a b DATETIME_INPUT_FORMATS = ( 
    3333    '%Y-%m-%d',             # '2006-10-25'
    3434)
    3535DECIMAL_SEPARATOR = ','
    36 THOUSAND_SEPARATOR = ' '
     36THOUSAND_SEPARATOR = u' ' # non-breaking space
    3737NUMBER_GROUPING = 3
  • django/conf/locale/sv/formats.py

    diff --git a/django/conf/locale/sv/formats.py b/django/conf/locale/sv/formats.py
    index c04abfa..10a7e00 100644
    a b DATETIME_INPUT_FORMATS = ( 
    3636    '%m/%d/%y',              # '10/25/06'
    3737)
    3838DECIMAL_SEPARATOR = ','
    39 THOUSAND_SEPARATOR = ' '
     39THOUSAND_SEPARATOR = u' ' # non-breaking space
    4040NUMBER_GROUPING = 3
  • docs/topics/i18n/formatting.txt

    diff --git a/docs/topics/i18n/formatting.txt b/docs/topics/i18n/formatting.txt
    index 3c8ebaf..3ccaa21 100644
    a b To customize the English formats, a structure like this would be needed:: 
    176176
    177177where :file:`formats.py` contains custom format definitions. For example::
    178178
    179     THOUSAND_SEPARATOR = ' '
     179    THOUSAND_SEPARATOR = u' '
    180180
    181 to use a space as a thousand separator, instead of the default for English,
    182 a comma.
     181to use a non-breaking space (Unicode 00A0) as a thousand separator, instead of
     182the default for English, a comma.
Back to Top