wg-build-test-release icon indicating copy to clipboard operation
wg-build-test-release copied to clipboard

[Test failure] TC_LEARNER_44: Can't change site to some languages

Open Colin-Fredericks opened this issue 1 year ago • 5 comments

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

  1. Open up account settings, like https://apps.redwood.demo.edly.io/account/#site-preferences
  2. Click or scroll to "Site Preferences".
  3. Click "Edit" next to "Site language".
  4. Pick a language. I chose French.
  5. Click "Save".
  6. Reload the page.
  7. 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.

Colin-Fredericks avatar May 17 '24 14:05 Colin-Fredericks

I just tested this with "Español (Latinoamerica) and it failed likely due to a CORS issue.

image

felipemontoya avatar May 21 '24 20:05 felipemontoya

@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: image Firefox: Screenshot 2024-05-29 at 14 12 03

Did this case pass for Quince, since learner-dashboard MFE was included in the community release?

GlugovGrGlib avatar May 29 '24 11:05 GlugovGrGlib

@GlugovGrGlib: we don't have a failing report for quince, so I'll be testing in a quince installation to be sure.

mariajgrimaldi avatar May 30 '24 14:05 mariajgrimaldi

@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.

image

mariajgrimaldi avatar May 30 '24 14:05 mariajgrimaldi

I'll be opening an issue in the tutor-mfe repo so we can address it there. Thank you all!

mariajgrimaldi avatar Aug 26 '24 20:08 mariajgrimaldi

In the last BTR meeting, Adolfo assigned himself to address this issue here: https://github.com/openedx/frontend-app-account/issues/1052

mariajgrimaldi avatar Oct 07 '24 11:10 mariajgrimaldi

Fixed by https://github.com/openedx/frontend-app-account/pull/1139

mariajgrimaldi avatar Oct 23 '24 11:10 mariajgrimaldi