Mercurial > babel > old > mirror
changeset 439:07855b5aa0b8
Revert part of the commits with relation to the de locale's use of \xa0 as
thousands separator, this is still a proposed change and not the active one.
author | jruigrok |
---|---|
date | Sat, 22 Aug 2009 12:09:29 +0000 |
parents | 783f0a1970c2 |
children | a3ddb13ff2a6 |
files | babel/numbers.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/babel/numbers.py +++ b/babel/numbers.py @@ -133,7 +133,7 @@ >>> format_number(1099, locale='en_US') u'1,099' >>> format_number(1099, locale='de_DE') - u'1\\xa0099' + u'1.099' :param number: the number to format @@ -155,8 +155,8 @@ u'-1.235' >>> format_decimal(1.2345, locale='sv_SE') u'1,234' - >>> format_decimal(12345, locale='de') - u'12\\xa0345' + >>> format_decimal(1.2345, locale='de') + u'1,234' The appropriate thousands grouping and the decimal separator are used for each locale: @@ -184,7 +184,7 @@ >>> format_currency(1099.98, 'USD', locale='es_CO') u'US$\\xa01.099,98' >>> format_currency(1099.98, 'EUR', locale='de_DE') - u'1\\xa0099,98\\xa0\\u20ac' + u'1.099,98\\xa0\\u20ac' The pattern can also be specified explicitly: