[Test failure] TC_LEARNER_44: Can't change site to some languages
Release
Redwood
Expected behavior
Changing the language for the site should make text appear in other languages.
Actual behavior
For some languages it works; for others it doesn't.
Steps to reproduce
- Open up account settings, like https://apps.redwood.demo.edly.io/account/#site-preferences
- Click or scroll to "Site Preferences".
- Click "Edit" next to "Site language".
- Pick a language. I chose French.
- Click "Save".
- Reload the page.
- Notice that the page is still in English and the setting has swapped back to English. (Not sure what happens if your site-wide default is set to something else.)
In a really weird twist, some languages work and some do not!
- Arabic (العربية) - Works! Including right-to-left. Getting it back out of Arabic was a slight challenge, on account of I do not read Arabic.
- Bahasa Indonesia - No luck. The preference sticks, but the site does not change.
- 中文 (简体) (Simplified Chinese) - Works!
- dansk - Works!
- Espaõl (Latinoamérica) - Works!
- Français - No luck.
- German - Works!
- עברית (Hebrew) - Works!
- साइट प्राथमिकताएँ (Hindi) - Works!
- Italian - Molto bene!
- Kiswahili - Poa kichizi kama ndizi. (That means it works.) (Technically it means "Crazy cool like a banana", and it's basically the only Kiswahili I know.)
- 한국어 (대한민국) (Korean, RoK) - No luck. Site does not change, preference does not stick.
- Português - Works!
- Türkçe - Works!
- Українська (Ukranian) - Works!
So a lot of them work, but not all of them. It seems my initial choice of French was sort of lucky here - I might not have realized this was broken otherwise.
Additional information
Fun fact: Pasting Hebrew or Arabic into the editor in GitHub gives you some really weird behavior, which I suppose I should have expected.
I just tested this with "Español (Latinoamerica) and it failed likely due to a CORS issue.
@mariajgrimaldi @cmltaWt0 I'm facing exactly the same issue with CORS as @felipemontoya posted above.
I believe the issue is that endpoint /i18n/setlang/ returns Redirect to / instead of JSON response, and when Learner-dashboard MFE is enabled it's being blocked by CORS policy.
Please see screenshots:
Chromium:
Firefox:
Did this case pass for Quince, since learner-dashboard MFE was included in the community release?
@GlugovGrGlib: we don't have a failing report for quince, so I'll be testing in a quince installation to be sure.
@GlugovGrGlib: I tested here https://apps.sandbox.openedx.edly.io/account/, and I can confirm it is also happening in quince. I can change the language, but the changes are reflected after reloading. Also, I get the CORS error as well. I haven't tested all the languages yet.
I'll be opening an issue in the tutor-mfe repo so we can address it there. Thank you all!
In the last BTR meeting, Adolfo assigned himself to address this issue here: https://github.com/openedx/frontend-app-account/issues/1052
Fixed by https://github.com/openedx/frontend-app-account/pull/1139