diff --git a/src/humanize/i18n.py b/src/humanize/i18n.py index 664b0742..534a7c67 100644 --- a/src/humanize/i18n.py +++ b/src/humanize/i18n.py @@ -17,11 +17,13 @@ _THOUSANDS_SEPARATOR = { "de_DE": ".", "fr_FR": " ", + "pt_BR": ".", } # Mapping of locale to decimal separator _DECIMAL_SEPARATOR = { "de_DE": ",", + "pt_BR": ",", } diff --git a/tests/test_i18n.py b/tests/test_i18n.py index f8782f85..7af3ef24 100644 --- a/tests/test_i18n.py +++ b/tests/test_i18n.py @@ -53,6 +53,9 @@ def test_intcomma() -> None: humanize.i18n.activate("fr_FR") assert humanize.intcomma(number) == "10 000 000" + humanize.i18n.activate("pt_BR") + assert humanize.intcomma(number) == "10.000.000" + except FileNotFoundError: pytest.skip("Generate .mo with scripts/generate-translation-binaries.sh")