We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c341b9 commit f772e59Copy full SHA for f772e59
src/humanize/i18n.py
@@ -30,6 +30,7 @@
30
# Mapping of locale to decimal separator
31
_DECIMAL_SEPARATOR = {
32
"de_DE": ",",
33
+ "fr_FR": ".",
34
"it_IT": ",",
35
"pt_BR": ",",
36
"hu_HU": ",",
tests/test_i18n.py
@@ -55,6 +55,8 @@ def test_intcomma() -> None:
55
56
humanize.i18n.activate("fr_FR")
57
assert humanize.intcomma(number) == "10 000 000"
58
+ assert humanize.intcomma(1_234_567.89) == "1 234 567.89"
59
+ assert humanize.intcomma("1 234 567.89") == "1 234 567.89"
60
61
humanize.i18n.activate("pt_BR")
62
assert humanize.intcomma(number) == "10.000.000"
0 commit comments