Closed TiBiBa closed 2 years ago
Haha, weird!! The fallback should work the other way around (Frysk falls back to Nl instead of En as other langs do) but guess something is amiss here.
@rix0rrr do you know what went wrong here? This surely has not always been like this. Might #1266 have something to do with it?
I think I've found a fix! It seems that the translations on the @app.route('/hedy/<id>/view', methods=['GET'])
are retrieved with the lang
variable. For some reason this variable is always fry
. However, we should (as is consistent with other templates rendering) use the g.lang
variabel which does contain the correct value. I don't know how/why/when we should use the lang
value, but it exists for some reason.
By changing lang
into g.lang
on lines 845 and 848 in app.py
the issue should be fixed!
Describe the bug Currently when opening a shared program by share link the page will always be loaded in the Frysk language. When switching languages only the menubar changes correctly (expect the my profile page for some reason) but the rest of the UI stays at Frysk. This might be an issue with the fallback language for this page where we always return Frysk.
Visit, for example: https://www.hedycode.com/hedy/69a752cc91b441be96c55c4d299f4f6a/view?lang=nl
Add a screenshot (optional)
Expected behavior The viewed program should correctly display the language of choice in the menubar and the program view UI.
What machine and browser you were using (optional) If the issue concerns things in the website, let us know: