We currently (v1, v2) duplicate all of the babel.dates and babel.numbers format_* methods in Flask-Babel. This is a lot of completely unnecessary duplication, including docstrings and test coverage. We're also often out of date with babel's methods, such as when new kwargs are added. Just like flask-wtf did way back, we should chuck this and become just the glue layer between Flask and Babel. In general, the only change in your code is to add format_decimal(..., locale=get_locale()).
Because this PR reduces our surface area significantly, lets make it a goal to get 100% test coverage.
[ ] Update documentation (#173)
[x] Remove format helpers (#164)
[ ] Remove all old-style formatters in __init__ and test code. (% vs format()). Or bump to py3.6+ and use fstrings.
[ ] Support new-style strings for translation (#170)
[ ] 100% test coverage, and make it part of the tests.
[ ] 100% flake8, and make it part of the tests.
[ ] Cleanup how we handle translation context. Verify we are thread safe.
[ ] Stop polluting app objects - always use current_app.
[ ] Support multiple apps with different configurations (#107)
The v3.* family aims to be the last breaking release for quite awhile.
We currently (v1, v2) duplicate all of the babel.dates and babel.numbers
format_*
methods in Flask-Babel. This is a lot of completely unnecessary duplication, including docstrings and test coverage. We're also often out of date with babel's methods, such as when new kwargs are added. Just like flask-wtf did way back, we should chuck this and become just the glue layer between Flask and Babel. In general, the only change in your code is to addformat_decimal(..., locale=get_locale())
.Because this PR reduces our surface area significantly, lets make it a goal to get 100% test coverage.
__init__
and test code. (%
vsformat()
). Or bump to py3.6+ and use fstrings.The v3.* family aims to be the last breaking release for quite awhile.