Code

Ticket #17217: 17217-2.diff

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

Also update docs/topics/i18n/formatting.txt

Line 
1diff --git a/django/conf/locale/cs/formats.py b/django/conf/locale/cs/formats.py
2index 1c03615..d4ebb52 100644
3--- a/django/conf/locale/cs/formats.py
4+++ b/django/conf/locale/cs/formats.py
5@@ -33,5 +33,5 @@ DATETIME_INPUT_FORMATS = (
6     '%Y-%m-%d',             # '2006-10-25'
7 )
8 DECIMAL_SEPARATOR = ','
9-THOUSAND_SEPARATOR = ' '
10+THOUSAND_SEPARATOR = u' ' # non-breaking space
11 NUMBER_GROUPING = 3
12diff --git a/django/conf/locale/es_MX/formats.py b/django/conf/locale/es_MX/formats.py
13index fdedb0d..7f14b97 100644
14--- a/django/conf/locale/es_MX/formats.py
15+++ b/django/conf/locale/es_MX/formats.py
16@@ -24,7 +24,7 @@ DATETIME_INPUT_FORMATS = (
17     '%d/%m/%y %H:%M:%S',
18     '%d/%m/%y %H:%M',
19 )
20-DECIMAL_SEPARATOR = '.'                # ',' is also official (less common): NOM-008-SCFI-2002
21-THOUSAND_SEPARATOR = ' '               # white space
22+DECIMAL_SEPARATOR = '.'   # ',' is also official (less common): NOM-008-SCFI-2002
23+THOUSAND_SEPARATOR = u' ' # non-breaking space
24 NUMBER_GROUPING = 3
25 
26diff --git a/django/conf/locale/fr/formats.py b/django/conf/locale/fr/formats.py
27index 2ad05b8..58a2e09 100644
28--- a/django/conf/locale/fr/formats.py
29+++ b/django/conf/locale/fr/formats.py
30@@ -37,5 +37,5 @@ DATETIME_INPUT_FORMATS = (
31     '%Y-%m-%d',             # '2006-10-25'
32 )
33 DECIMAL_SEPARATOR = ','
34-THOUSAND_SEPARATOR = ' '
35+THOUSAND_SEPARATOR = u' ' # non-breaking space
36 NUMBER_GROUPING = 3
37diff --git a/django/conf/locale/nb/formats.py b/django/conf/locale/nb/formats.py
38index f20d712..8c232dc 100644
39--- a/django/conf/locale/nb/formats.py
40+++ b/django/conf/locale/nb/formats.py
41@@ -39,5 +39,5 @@ DATETIME_INPUT_FORMATS = (
42     '%d.%m.%y',              # '25.10.06'
43 )
44 DECIMAL_SEPARATOR = ','
45-THOUSAND_SEPARATOR = ' '
46+THOUSAND_SEPARATOR = u' ' # non-breaking space
47 NUMBER_GROUPING = 3
48diff --git a/django/conf/locale/nn/formats.py b/django/conf/locale/nn/formats.py
49index f20d712..8c232dc 100644
50--- a/django/conf/locale/nn/formats.py
51+++ b/django/conf/locale/nn/formats.py
52@@ -39,5 +39,5 @@ DATETIME_INPUT_FORMATS = (
53     '%d.%m.%y',              # '25.10.06'
54 )
55 DECIMAL_SEPARATOR = ','
56-THOUSAND_SEPARATOR = ' '
57+THOUSAND_SEPARATOR = u' ' # non-breaking space
58 NUMBER_GROUPING = 3
59diff --git a/django/conf/locale/ru/formats.py b/django/conf/locale/ru/formats.py
60index f3a8f2b..430963a 100644
61--- a/django/conf/locale/ru/formats.py
62+++ b/django/conf/locale/ru/formats.py
63@@ -36,5 +36,5 @@ DATETIME_INPUT_FORMATS = (
64     '%Y-%m-%d',           # '2006-10-25'
65 )
66 DECIMAL_SEPARATOR = ','
67-THOUSAND_SEPARATOR = ' '
68+THOUSAND_SEPARATOR = u' ' # non-breaking space
69 NUMBER_GROUPING = 3
70diff --git a/django/conf/locale/sk/formats.py b/django/conf/locale/sk/formats.py
71index 9eeee66..adc3174 100644
72--- a/django/conf/locale/sk/formats.py
73+++ b/django/conf/locale/sk/formats.py
74@@ -33,5 +33,5 @@ DATETIME_INPUT_FORMATS = (
75     '%Y-%m-%d',             # '2006-10-25'
76 )
77 DECIMAL_SEPARATOR = ','
78-THOUSAND_SEPARATOR = ' '
79+THOUSAND_SEPARATOR = u' ' # non-breaking space
80 NUMBER_GROUPING = 3
81diff --git a/django/conf/locale/sv/formats.py b/django/conf/locale/sv/formats.py
82index c04abfa..10a7e00 100644
83--- a/django/conf/locale/sv/formats.py
84+++ b/django/conf/locale/sv/formats.py
85@@ -36,5 +36,5 @@ DATETIME_INPUT_FORMATS = (
86     '%m/%d/%y',              # '10/25/06'
87 )
88 DECIMAL_SEPARATOR = ','
89-THOUSAND_SEPARATOR = ' '
90+THOUSAND_SEPARATOR = u' ' # non-breaking space
91 NUMBER_GROUPING = 3
92diff --git a/docs/topics/i18n/formatting.txt b/docs/topics/i18n/formatting.txt
93index 3c8ebaf..3ccaa21 100644
94--- a/docs/topics/i18n/formatting.txt
95+++ b/docs/topics/i18n/formatting.txt
96@@ -176,7 +176,7 @@ To customize the English formats, a structure like this would be needed::
97 
98 where :file:`formats.py` contains custom format definitions. For example::
99 
100-    THOUSAND_SEPARATOR = ' '
101+    THOUSAND_SEPARATOR = u' '
102 
103-to use a space as a thousand separator, instead of the default for English,
104-a comma.
105+to use a non-breaking space (Unicode 00A0) as a thousand separator, instead of
106+the default for English, a comma.