Skip to content

Use w/o initialization #175

@jwag956

Description

@jwag956

First and foremost - thank you thank you thank you for getting the Domain/BabelEx features backported into a supported package...

In PR #163 it was stated:

'we did not keep support flask-babelex had for using the flask extension without having initialized it. to me that looks very much like supporting something that's not expected to work anyway..'

Here is a use case for that - I am moving Flask-Security-Too to use Flask-Babel from Flask-BabelEx. Flask-Security has translations for all its messages, and requires Flask-Babel as a dependency.

However - not all application that USE Flask-Security care about i18n and therefore have no reason to initialize Babel.
In the past - it just worked - Flask-Security initialized its Domain and since no locale changes were actually configured - it was fine.

But now of course it breaks if the application doesn't init Flask-Babel. This puts a burden on the application. If Flask-Security looks at whether Flask-Babel is registered as an extension - it then requires that different extensions have an implied order of initialization (and there isn't a way to tell the application writer that translations were ignored since we didn't find a Flask-Babel extension).

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions