Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #17217 -- Use non breaking spaces for format localization in wh…

…ich spaces are used. Thanks, Claude Paroz.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17478 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 75c60e80536552125f014fde15e2964ec128c65c 1 parent d6f9c1e
@jezdez jezdez authored
View
2  django/conf/locale/cs/formats.py
@@ -33,5 +33,5 @@
'%Y-%m-%d', # '2006-10-25'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' '
+THOUSAND_SEPARATOR = u' ' # non-breaking space
NUMBER_GROUPING = 3
View
4 django/conf/locale/es_MX/formats.py
@@ -24,7 +24,7 @@
'%d/%m/%y %H:%M:%S',
'%d/%m/%y %H:%M',
)
-DECIMAL_SEPARATOR = '.' # ',' is also official (less common): NOM-008-SCFI-2002
-THOUSAND_SEPARATOR = ' ' # white space
+DECIMAL_SEPARATOR = '.' # ',' is also official (less common): NOM-008-SCFI-2002
+THOUSAND_SEPARATOR = u' ' # non-breaking space
NUMBER_GROUPING = 3
View
2  django/conf/locale/fr/formats.py
@@ -37,5 +37,5 @@
'%Y-%m-%d', # '2006-10-25'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' '
+THOUSAND_SEPARATOR = u' ' # non-breaking space
NUMBER_GROUPING = 3
View
2  django/conf/locale/nb/formats.py
@@ -39,5 +39,5 @@
'%d.%m.%y', # '25.10.06'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' '
+THOUSAND_SEPARATOR = u' ' # non-breaking space
NUMBER_GROUPING = 3
View
2  django/conf/locale/nn/formats.py
@@ -39,5 +39,5 @@
'%d.%m.%y', # '25.10.06'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' '
+THOUSAND_SEPARATOR = u' ' # non-breaking space
NUMBER_GROUPING = 3
View
2  django/conf/locale/ru/formats.py
@@ -36,5 +36,5 @@
'%Y-%m-%d', # '2006-10-25'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' '
+THOUSAND_SEPARATOR = u' ' # non-breaking space
NUMBER_GROUPING = 3
View
2  django/conf/locale/sk/formats.py
@@ -33,5 +33,5 @@
'%Y-%m-%d', # '2006-10-25'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' '
+THOUSAND_SEPARATOR = u' ' # non-breaking space
NUMBER_GROUPING = 3
View
2  django/conf/locale/sv/formats.py
@@ -36,5 +36,5 @@
'%m/%d/%y', # '10/25/06'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' '
+THOUSAND_SEPARATOR = u' ' # non-breaking space
NUMBER_GROUPING = 3
View
2  django/contrib/localflavor/de_CH/formats.py
@@ -39,5 +39,5 @@
# For details, please refer to http://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de
# (in German) and the documentation
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = " "
+THOUSAND_SEPARATOR = u' '
NUMBER_GROUPING = 3
View
7 docs/topics/i18n/formatting.txt
@@ -176,11 +176,10 @@ To customize the English formats, a structure like this would be needed::
where :file:`formats.py` contains custom format definitions. For example::
- THOUSAND_SEPARATOR = ' '
-
-to use a space as a thousand separator, instead of the default for English,
-a comma.
+ THOUSAND_SEPARATOR = u' '
+to use a non-breaking space (Unicode ``00A0``) as a thousand separator,
+instead of the default for English, a comma.
Limitations of the provided locale formats
==========================================

0 comments on commit 75c60e8

Please sign in to comment.
Something went wrong with that request. Please try again.