Open mariajgrimaldi opened 3 months ago
FYI @arbrandes @brian-smith-tcril: I'm not sure where's the issue here, but still, the account MFE doesn't recognize some of the languages, and for those who do, the page stays in the previous language unless it's reloaded.
This might be a bigger issue, but I think it's a good place to start.
Looking at the account MFE specifically (https://github.com/openedx/openedx-translations/blob/main/translations/frontend-app-account/src/i18n/messages/)
Bahasa Indonesia - No luck. The preference sticks, but the site does not change.
I assume this is coming from https://github.com/openedx/openedx-translations/blob/main/translations/frontend-app-account/src/i18n/messages/id.json, which appears to have English strings in it
Français - No luck.
It seems we only have fr_CA
in the account MFE https://github.com/openedx/openedx-translations/blob/main/translations/frontend-app-account/src/i18n/messages/fr_CA.json
한국어 (대한민국) (Korean, RoK) - No luck. Site does not change, preference does not stick.
There is no ko
file in there
Thank you, @brian-smith-tcril; I understand better now. Do you know what the process is for supporting those languages? At least for the ones listed in the account MFE.
Also, @brian-smith-tcril: there's a CORS error when changing the language from the account page. You can see it in detail here: https://github.com/openedx/wg-build-test-release/issues/347#issuecomment-2137186119
We have a similar cors error in the account MFE when trying to disconnect a TPA account association: https://github.com/openedx/wg-build-test-release/issues/376#issue-2328128813
Is this likely related to why the language changes are not reflected immediately but after reloading? When changing the language, the CORS error in the account page also happens in Quince, so the changes are not seen immediately either.
So... I tested this in the quince sandbox, and it failed:
Screencast from 03-06-24 15:19:59.webm
And then tested it in one of our internal installations (tutor k8s + other custom configurations for Kubernetes), and it worked, even for français. I'm going to go through our setup to see what I find.
So I was testing in our quince installation and realized that this only fails when the LMS_HOST differs from MFE_HOST. If they are the same, I can change the languages and the account MFE behaves correctly, because there is no CORS issue (same domain).
@cmltaWt0: is that what happens in your installation where you can change the languages?
@mariajgrimaldi Yeap. LMS: https://axim-mfe.raccoongang.net/ MFE: https://apps.axim-mfe.raccoongang.net/
@arbrandes @brian-smith-tcril: What do you think about the CORS issue findings? I believe at least some of it might be related to the language not changing immediately but after reloading.
I haven't done any intensive investigation into the CORS issue but I would assume that it is something that needs to be addressed on the Tutor side.
Expected behavior
Changing the language for the site should make text appear in other languages.
Actual behavior
For some languages, it works, but after reloading the page; for others it doesn't, and it goes back to English.
Steps to reproduce
In a really weird twist, some languages work and some do not!
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.
Original issue: https://github.com/openedx/wg-build-test-release/issues/347