Skip to content

Commit 7034ca1

Browse files
authored
Fall back to other when formatting compact currencies
1 parent 64465cc commit 7034ca1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

babel/numbers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,8 @@ def _get_compact_format(
690690
plural_form = "other"
691691
if number == 1 and "1" in compact_format:
692692
plural_form = "1"
693+
if str(magnitude) not in compact_format[plural_form]:
694+
plural_form = "other" # fall back to other as the implicit default
693695
format = compact_format[plural_form][str(magnitude)]
694696
number = rounded
695697
break

0 commit comments

Comments
 (0)