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

Include rest of speaklater module #177

Closed jwag956 closed 3 years ago

jwag956 commented 3 years ago

Flask-Babel already includes the LazyString class. The speaklater module (which hasn't changed since 2012!) has 3 methods:

is_lazy_string make_lazy_string make_lazy_gettext

adding those would reduce a package dependency and not have multiple implementations of LazyString (interestingly enough - Flask-Babel exports LazyString as a public class while speaklater doesn't (_LazyString)).

TkTech commented 3 years ago

None of those three methods seem worth including. They add no functionality. is_lazy_string is just isinstance(x, LazyString). make_lazy_string is just LazyString().

Additionally, I want to remove the included speaklater and use the lazy proxy in upstream babel's support module, which is a requirement anyways.

jwag956 commented 3 years ago

Sounds good - yes - those are easily added to my library. My thought was around making Flask-Babel a drop in replacement for Flask-BabelEx...