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
update django to 3.2 #52
Conversation
babel_locale = translation.get_language() | ||
elif localedata.exists(translation.get_language()[:2]): | ||
babel_locale = translation.get_language()[:2] | ||
if translation.get_language(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using walrus operator to write less code:
if lang := translation.get_language():
if localedata.exists(lang):
babel_locale = lang
elif localedata.exists(lang[:2]):
babel_locale = lang[:2]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the feedback I think we can merge this. If you find any issues, please open a new issue on the tracker. Thanks
* update requirements to django 3.2 * remove jsonfallback, pull in helper functions that are still used from original jsonfallback code * fix tests for django 3.2 * keep versions in sync with requirements --------- Co-authored-by: Martin Bähr <martin@codingforafrica.at>
* update requirements to django 3.2 * remove jsonfallback, pull in helper functions that are still used from original jsonfallback code * fix tests for django 3.2 * keep versions in sync with requirements --------- Co-authored-by: Martin Bähr <martin@codingforafrica.at>
No description provided.