savoirfairelinux / num2words

Modules to convert numbers to words. 42 --> forty-two
GNU Lesser General Public License v2.1
814 stars 488 forks source link

Error in localized string #318

Open paulovn opened 4 years ago

paulovn commented 4 years ago

Hi. The localized string for number overflow in Spanish:

https://github.com/savoirfairelinux/num2words/blob/e5bed36054b4cb99469b1d9646ae97eb593cf996/num2words/lang_ES.py#L44

is missing the two parameters value and MAXVAL it will be called with at:

https://github.com/savoirfairelinux/num2words/blob/e5bed36054b4cb99469b1d9646ae97eb593cf996/num2words/base.py#L115

this makes it generate a TypeError instead of an OverflowError

It should be changed to something akin to

            "El numero %s debe ser menor de %s para ser convertido a palabras."
jenniegunawan commented 3 years ago

Hi @paulovn, I'd like to try to create PR regarding this issue. I'll follow your error message template. Thank you 👍