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

Remove all format_* wrappers #164

Closed TkTech closed 1 year ago

TkTech commented 4 years ago

Our API is never up to date with babel (ex: #142), and we do not cover the entire babel API. Our wrappers add no real value, and add a lot of surface area for test coverage. Just like flask-wtforms did way back in version 0.9, we should focus on just being the glue between flask and babel.

As part of this, we need to improve the documentation to show better examples of using get_locale and get_timezone.

homeworkprod commented 2 years ago

Hi @TkTech,

while I do agree with this move, I'd like to point out that while Flask-Babel's format_date rebases according to the time zone, Babel's format_date does not. This might be a bad surprise for users after upgrading to v3.0.

I have raised an issue against Babel, hoping that Babel will gain this ability. But I guess it could use some more backing.