Closed MaferMazu closed 1 year ago
@MaferMazu did you deploy this changes in our olive platform? could we test it there or we need to test in local?
@MaferMazu did you deploy this changes in our olive platform? could we test it there or we need to test in local?
All it's good for me, but I would like test it in a "production" environment.
@Alec4r I don't have this in a staging environment. I will merge this according to the comments, but next time I'll upload it to the stage to make it easier to try.
Description
This PR extract LC-V2 from the platform to eox-tenant.
LC-V2 allows you to have released_languages site aware in:
openedx/core/djangoapps/lang_pref/api.py
,openedx/core/djangoapps/dark_lang/middleware.py
. And set a default value to HTTP_ACCEPT_LANGUAGE.More context: LC-V2 Doc
Testing instructions
SetUp
You need to have a Tutor environment with eox-tenant installed with this version.
You need to add some settings for eox-tenant and the selectors to work (you can add it in env/apps/openedx/config/lms.env.yml and in env/apps/openedx/config/cms.env.yml):
Create a tenant with the Studio route:
How to test it
Visit tenant-a.local.overhang.io:8000 and tenant-b.local.overhang.io:8000 and you are going to see different languages in the header and footer dropdown, depending on release_languages config (Test the API section).
Enter studio.local.overhang.io:8001 and see the dropdown options. (Testing the Studio)
In your terminal run:
curl http://tenant-a.local.overhang.io:8000 -s 2>&1 | head -n 15
and you should see the LANGUAGE_CODE defined by site, for example in tenant-a is es-419. (Testing the default HTTP, and also the middleware)Additional information
Implementation
About this feature
Checklist for Merge