Skip to content

Commit 3d0f527

Browse files
Luflosihugovk
authored andcommitted
Internationalise intcomma for de_DE locale
1 parent 16e5182 commit 3d0f527

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/humanize/i18n.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
# Mapping of locale to thousands separator
1717
_THOUSANDS_SEPARATOR = {
18+
"de_DE": ".",
1819
"fr_FR": " ",
1920
}
2021

tests/test_i18n.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ def test_intcomma() -> None:
4242
assert humanize.intcomma(number) == "10,000,000"
4343

4444
try:
45+
humanize.i18n.activate("de_DE")
46+
assert humanize.intcomma(number) == "10.000.000"
4547
humanize.i18n.activate("fr_FR")
4648
assert humanize.intcomma(number) == "10 000 000"
4749

0 commit comments

Comments
 (0)