-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port flask-babelex features to flask-babel #163
Port flask-babelex features to flask-babel #163
Conversation
Use pytest as framework for testing. Sort tests into different files for better overview.
This looks good, I will try this branch with flask-admin. Re: credits - I'm fine either way. |
Co-authored-by: Lea Tschiersch <[email protected]> Co-authored-by: Serge S. Koval <[email protected]>
Like this moving from flask-babelex is easier, and the most common case is more convenient.
c1f3493
to
0bf48df
Compare
I hope to have time to review this on the weekend. Do you expect to push any more changes? |
Sorry, I only noticed the second part of your comment now since there are no notifications about comments being edited. No plans to push more unless you insist on us updating the docs of course... PS: Could you credit the flask-babelex author for originally contributing those features in whatever way you find most suitable when merging this? |
Any update on this? |
Adds support for loading translations from different domains in the same Flask-Babel instance. After the refactor in python-babel#163 there was no longer support for defining multiple translation domains for different translation directories. When loading the translations, a single domain was always used: https://github.com/python-babel/flask-babel/blob/ec7ae9ed2e22c7aebd4e732c1c3dc6d45fe8db76/flask_babel/__init__.py#L564 This change adds support for a semi-colon separated list of domains in `BABEL_DOMAIN`, that must match a list passed to `BABEL_TRANSLATION_DIRECTORIES`.
Note: We have NOT tested it with any projects using the currently-released flask-babel version yet (so if anyone has such a project, doing so would be great). But the tests pass! ;)
@mrjoes do you want to be listed as a co-author in the commit that contains most of your babelex changes and/or somewhere in the copyright header? (if it's the latter, feel free to push a commit somewhere and we'll cherry-pick it into this PR)