babel
babel copied to clipboard
format_percent doesn't return trailing decimal zeros with precision
Overview Description
Even when decimal_quantization=False, format_percent doesn't return decimal zeros with precision. Is it possible to include another flag to specify the number of precision values? We are using this for localizing interest rates.
Steps to Reproduce
- Call
format_percentwith any number that would yield a whole number.
Actual Results
format_percent(0.23, locale=en_US, decimal_quantization=False) -> 23% format_percent(0.234, locale=en_US, decimal_quantization=False) -> 23.4%
Expected Results
format_percent(0.23, locale=en_US, decimal_quantization=False) -> 23.00% format_percent(0.234, locale=en_US, decimal_quantization=False) -> 23.40%
Reproducibility
Additional Information
This is more of a feature request than a bug