-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Fix for loading country specific languages codes #849
Conversation
@lyralemos will sign and send over the Contributor Agreement today. Thanks! (also kudos to @claytonc who initially helped with the solution=) |
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.
lgtm
I've already signed the agreement. |
I'd squash all commits before merge. |
LGTM |
@lyralemos @thet when this got merged Jenkins started failing on the JavaScript job: https://jenkins.plone.org/job/plone-5.1-js/ any idea why the tinymce tests fail? |
I've managed to run the tests locally and realized were the problem is. Should I create a new PR? Or can I still commit changes here? |
@lyralemos a new pull request would be best, thanks for having a quick look at it!! |
due to a issue in country specific language handling introduced in #849
due to a issue in country specific language handling introduced in plone#849
With this fix, country specific language codes are correctly loaded. Fixes plone/Products.CMFPlone#949
As language codes are obtained via lang property in the html tag, there is an inconsistency with Plone locales code base. For instance, Brazilian Portuguese lang attribute is pt-br, but in plone locales is referred to as pt_BR.
This code does a simple transformation on the language code so that correct translations are loaded.