You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
format_currency throws a KeyError for any multiple of 1000000 when using the "es_AR" locale.
Steps to Reproduce
from babel.numbers import format_currency
format_currency(1000000, "ARS", locale="es_AR")
Actual Results
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/pedro/Documents/project/venv/lib/python3.10/site-packages/babel/numbers.py", line 533, in format_currency
return pattern.apply(
File "/home/pedro/Documents/project/venv/lib/python3.10/site-packages/babel/numbers.py", line 1028, in apply
get_currency_name(currency, value, locale))
File "/home/pedro/Documents/project/venv/lib/python3.10/site-packages/babel/numbers.py", line 130, in get_currency_name
return plural_names[currency][plural_form]
File "/home/pedro/Documents/project/venv/lib/python3.10/site-packages/babel/localedata.py", line 238, in __getitem__
orig = val = self._data[key]
KeyError: 'many'
Expected Results
'$\xa01.000.000,00'
Additional Information
This works fine for other values such as: 100000, 999999 and 1000001. But fails for any other multiple of 1000000 (2000000, 3000000, 4000000, etc.)
The text was updated successfully, but these errors were encountered:
If no matching displayName element was found in the previous step, then look for a displayName element that matches count="other", starting in the current locale and then following the locale fallback chain up to, but not including root.
However, this step is not implemented in format_currency().
Overview Description
format_currency
throws a KeyError for any multiple of 1000000 when using the "es_AR" locale.Steps to Reproduce
Actual Results
Expected Results
'$\xa01.000.000,00'
Additional Information
This works fine for other values such as: 100000, 999999 and 1000001. But fails for any other multiple of 1000000 (2000000, 3000000, 4000000, etc.)
The text was updated successfully, but these errors were encountered: