Upgrade Babel version#3004
Merged
Merged
Conversation
The language selector did not work with Babel 2.3.4 because the URLs on
the option tags didn't contain the language code. This was caused
because we are passing the Babel `Locale` classes to the `url_for`
helper, which compares them against a list of string codes (eg `ca`).
On older Babel versions comparing eg `Locale('ca') == 'ca'` used to
work.
This includes the necessary changes both on the selector snippet and the
helper functions so we are comparing apples to apples.
Member
Author
|
I also tested manually the whole translation file update process from Transifex and everything seems to work fine. |
Not enought thorough checks meant that True/False were passed to Babel to localize, which causes a crash on modern Babel versions.
Member
Author
|
@TkTech can you have a look at this as it relates to flask-babel? |
rfc791
pushed a commit
to open-data/ckan
that referenced
this pull request
May 16, 2016
Conflicts: requirements.in
Member
Author
|
@TkTech ping, would be really useful for the Flask views POC branch to get this reviewed and merged if you are happy (this is not related to python-babel/flask-babel#91 btw) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Another prehistoric library version that we are using (0.9.6 vs 2.3.4). There are issues around the language selector and how URLs are built. Essentially what happens is that comparing
Locale('ca') == 'ca'used to work, but not any more (probably for the best).We will need to upgrade in order to use Flask-babel anyway (see discussion here)