diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-02-13 21:30:51 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2017-03-01 21:16:49 +0100 |
commit | de5cf50aba1b9fd43c1fbd653c5cd9b7b973d52b (patch) | |
tree | 2b40ea5310b2ae9c4b8c288902b5ffd40cfbb6bc /doc | |
parent | 4c7d1a64fa970c42f233af84dda49180a9836321 (diff) | |
download | guile-de5cf50aba1b9fd43c1fbd653c5cd9b7b973d52b.tar.gz |
i18n: 'number->locale-string' guesses the minimum number of decimals.
This feature was removed by 4aead68cdb86ca60cc372f0cd558cadda90ddec5.
* module/ice-9/i18n.scm (number-decimal-string): Rewrite the case where
DIGIT-COUNT is not an integer.
(number->locale-string): Always pass FRACTION-DIGITS to
'number-decimal-string'.
* test-suite/tests/format.test ("~h localized number")["1234.5"]
["padding", "padchar"]: Remove decimal specifier.
* test-suite/tests/i18n.test ("number->locale-string")
["fraction",
* test-suite/tests/i18n.test ("format ~h")["12 345,678"]: Remove decimal
specifier. Remove one decimal.
* doc/ref/api-i18n.texi (Number Input and Output): Update
'number->locale-string' doc to mention the number of decimals.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ref/api-i18n.texi | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/doc/ref/api-i18n.texi b/doc/ref/api-i18n.texi index fa3fe99d0..0a27285b1 100644 --- a/doc/ref/api-i18n.texi +++ b/doc/ref/api-i18n.texi @@ -1,7 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. -@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2009, 2010 -@c Free Software Foundation, Inc. +@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 2007, +@c 2009, 2010, 2017 Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @node Internationalization @@ -263,8 +263,10 @@ Reference Manual}). @deffn {Scheme Procedure} number->locale-string number [fraction-digits [locale]] Convert @var{number} (an inexact) into a string according to the cultural conventions of either @var{locale} (a locale object) or the -current locale. Optionally, @var{fraction-digits} may be bound to an -integer specifying the number of fractional digits to be displayed. +current locale. By default, print as many fractional digits as +necessary, up to an upper bound. Optionally, @var{fraction-digits} may +be bound to an integer specifying the number of fractional digits to be +displayed. @end deffn @deffn {Scheme Procedure} monetary-amount->locale-string amount intl? [locale] |