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
merged 6 commits into from May 26, 2016
Merged

Upgrade Babel version #3004

merged 6 commits into from May 26, 2016

Conversation

@amercader
Copy link
Member

@amercader amercader 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 2 commits May 9, 2016
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.
@amercader
Copy link
Member Author

@amercader amercader 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 3 commits May 10, 2016
Not enought thorough checks meant that True/False were passed to Babel
to localize, which causes a crash on modern Babel versions.
@amercader
Copy link
Member Author

@amercader amercader 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 issue May 16, 2016
@amercader
Copy link
Member Author

@amercader amercader 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
@amercader amercader deleted the 3004-upgrade-babel branch May 26, 2016
amercader added a commit that referenced this issue Jun 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants