Skip to content
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

Upgrade Babel version #3004

merged 6 commits into from May 26, 2016


None yet
2 participants
Copy link

commented May 9, 2016

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)

amercader added some commits May 9, 2016

[#3004] Upgrade Babel requirement, fix issues with language selector
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

This includes the necessary changes both on the selector snippet and the
helper functions so we are comparing apples to apples.

This comment has been minimized.

Copy link
Member Author

commented May 9, 2016

I also tested manually the whole translation file update process from Transifex and everything seems to work fine.

@amercader amercader added the WIP label May 9, 2016

amercader added some commits May 10, 2016

[#3004] Don't try to localize True/False as numbers
Not enought thorough checks meant that True/False were passed to Babel
to localize, which causes a crash on modern Babel versions.

@amercader amercader removed the WIP label May 10, 2016


This comment has been minimized.

Copy link
Member Author

commented May 10, 2016

@TkTech can you have a look at this as it relates to flask-babel?

rfc791 added a commit to open-data/ckan that referenced this pull request May 16, 2016

Merge branch 'master' into 3004-upgrade-babel

This comment has been minimized.

Copy link
Member Author

commented May 25, 2016

@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)

@TkTech TkTech merged commit 28a95fd into master May 26, 2016

1 check passed

ci/circleci Your tests passed on CircleCI!

@amercader amercader deleted the 3004-upgrade-babel branch May 26, 2016

amercader added a commit that referenced this pull request Jun 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.