Skip to content

Commit

Permalink
Merge pull request #49 from Luflosi/intcomma-de_DE
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Aug 25, 2022
2 parents 16e5182 + 3d0f527 commit afdde01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/humanize/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

# Mapping of locale to thousands separator
_THOUSANDS_SEPARATOR = {
"de_DE": ".",
"fr_FR": " ",
}

Expand Down
2 changes: 2 additions & 0 deletions tests/test_i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def test_intcomma() -> None:
assert humanize.intcomma(number) == "10,000,000"

try:
humanize.i18n.activate("de_DE")
assert humanize.intcomma(number) == "10.000.000"
humanize.i18n.activate("fr_FR")
assert humanize.intcomma(number) == "10 000 000"

Expand Down

0 comments on commit afdde01

Please sign in to comment.