Add language routing #7160
@BerkeleyTrue I can change my preferred language to Spanish, but it doesn't affect the language of the challenges.
Here is what I see both in Firefox and Chrome respectively (even if I select something):
When I change the language the map is still in English
And I think we should change "Preferred language" to "Preferred language of challenges" because one can thought that changing the lang will change everything but it actually changes only challenge seed's language.
And for future approach I think it would be better to have test messages translated too. As a user I feel like translation is not completed now.
I'll work on the map.
And I think we should change "Preferred language" to "Preferred language of challenges"
We're asking when language they preferred. I don't think we need the extra qualifier.
Added language support on maps. Superblocks/blocks will need title translations as well, but we'll cross that bridge at some other point
I'll leave the select css stuff to someone with more skills than I, like @hallaathrad.
OK - I've found a couple issues:
- If I'm unauthenticated and I complete a challenge, it will send me to the map and say "We couldn't find a challenge with the name next-challenge. Please double check the name."
- If I'm authenticated and I complete a challenge with either Spanish or English as my chosen language, it will never advance to the next challenge (it shows the spinner forever).
@BerkeleyTrue It saves challenges to the user object with the translated name, so if someone completes a challenge in spanish anyone who visits that profile will see the name in spanish rather than english, and because the spanish version of the name is not a valid URL they will get an error like We couldn't find a challenge with the name Borra elementos HTML. Please double check the name.
when trying to visit the solution from the link profile link.
@ltegman Thanks. We'll definitely need to incorporate language routing into find next challenge. I guess we'll need to parse the lang from the url and search the appropriate language name.
@BerkeleyTrue I don't know how practical this is but is there any chance we can store the challenge with the english name in the user object and translate what is shown on the user profile? Seems like saving it in a consistent fashion and translating from there would have less potential side effects on things like challenge validation for certs and mean all our users can easily view each others challenges regardless of the language the user completed the challenge in.
@ltegman I've actually been thinking of creating a id => name map to use on profiles. This would solve other issue's were having with the profile and always keep the names up to date. We could make a map per language.
@BerkeleyTrue That sounds like an excellent solution for this!
No description provided.