python-babel / flask-babel

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

Handling for case when request context is not available. #73

Closed Rikanishu closed 8 years ago

Rikanishu commented 9 years ago

For example, this happens when application was initialized for background Celery task. Due the fact that request context is not used in this case, but an error occured at locale initialization.

cjgu commented 9 years ago

Would be nice to get this or https://github.com/mitsuhiko/flask-babel/pull/67 merged!

TkTech commented 8 years ago

I've resolved this in a slightly-cleaner but identical manner in https://github.com/TkTech/flask-babel/commit/2ada81c833640d512a00fcebdd867ff46294b932

TkTech commented 8 years ago

Included in PR #88, thanks!