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

[WIP] use Accept-Language header in jinja templates #3942

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

minrk
Copy link
Member

@minrk minrk commented Sep 19, 2018

solves translation issue where jinja used server-side LANG environment and javascript used browser configuration via the Accept-Language header, which could result in multiple languages on the page. Now, all browser messages should be consistent with the browser settings.

Introduces caching of gettext translation objects to ensure that we don't keep loading the translation config on every request.

cc @JCEmmons

TODO:

  • selenium test with Accept-Language header to verify that it's loading the right thing (verified manually, but we should have a real test)

@minrk minrk force-pushed the translate-templates-header branch from a829a48 to c241c43 Compare September 20, 2018 07:48
@takluyver
Copy link
Member

This has a merge conflict now, if you have time to rebase it.

@minrk minrk force-pushed the translate-templates-header branch from 471c121 to bd3ada6 Compare March 6, 2019 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants