python-babel / flask-babel

i18n and l10n support for Flask based on Babel and pytz
https://python-babel.github.io/flask-babel/
Other
432 stars 159 forks source link

improve format_percent #235

Open WilliamSampaio opened 9 months ago

WilliamSampaio commented 9 months ago

Hello,

When using the _format_percent_ function, I noticed that the percentage value always rounded to an integer. That's why I set out to improve it.

I added another parameter that determines whether or not the result should be rounded.

This parameter already exists in the format_percent function of babel.numbers, so I just made the call.

grateful!