Closed Bug 926963 Opened 11 years ago Closed 7 years ago

Include user profile language choice in locale redirect logic

Categories

(developer.mozilla.org Graveyard :: General, defect, P2)

All
Other

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: lorchard, Unassigned)

References

Details

(Keywords: intl, Whiteboard: [specification][type:change])

What feature should be changed? Please provide the URL of the feature if possible. ================================================================================== When you visit developer.mozilla.org, we redirect to a locale based on the browser's Accept-Language header. (eg. developer.mozilla.org/fr or developer.mozilla.org/en-US) However, we also accept a Language field on user profiles, which can differ from the browser's settings. We should use that information in the redirect logic, given priority above the Accept-Language setting What problems would this solve? =============================== Feedback from skiant.be@gmail.com: "The behavior I expected was for the MDN to use the language setting in my profile over the browser language (I prefer to read technical documentation in English over French despite the latter being my native language)" Who would use this? =================== Multi-lingual MDN users What would users see? ===================== A redirection from the site root to the locale of choice from their profile. What would users do? What would happen as a result? =================================================== Select a profile language, see that as the automatic redirect of choice Is there anything else we should know? ====================================== This originated in another bug: https://bugzilla.mozilla.org/show_bug.cgi?id=730401#c6
Blocks: 910513
Summary: Include user profile language choice in local redirect logic → Include user profile language choice in locale redirect logic
I think this is a good idea, with one bemol: if the URL contains the locale e.g. https//d.m.o/fr , serve the locale in the URL (here French). Or: 1. URL locale 2. Profile language (if set) 3. Browser language
(In reply to Jean-Yves Perrier [:teoli] from comment #1) > I think this is a good idea, with one bemol: if the URL contains the locale > e.g. https//d.m.o/fr , serve the locale in the URL (here French). > > Or: > > 1. URL locale > 2. Profile language (if set) > 3. Browser language +1
(In reply to Jean-Yves Perrier [:teoli] from comment #1) > I think this is a good idea, with one bemol: if the URL contains the locale > e.g. https//d.m.o/fr , serve the locale in the URL (here French). This bug is **only** about what happens when visiting http://developer.mozilla.org/, where we don't yet have a locale. If you're at d.m.o/fr, we have a locale, and so don't need to guess & redirect.
Blocks: MDNPostLaunch
No longer blocks: 910513
Severity: normal → minor
Priority: -- → P2
Just marked bug 995113 as duplicate. Not sure if I'll be the one who gets to this, or if it will be someone else. But, I think the relevant middleware that handles locale redirection is here: https://github.com/mozilla/kuma/blob/master/apps/sumo/middleware.py#L24 Not sure if we have an auth'd user at that point. Seems like authentication happens 8 or so steps down the chain from there [1], so getting the language from a user's profile might be tricky. [1] https://github.com/mozilla/kuma/blob/master/settings.py#L397
(and by tricky, I mean reordering the chain of middleware processors for the whole site and hoping that doesn't break anything)
Hi, is this bug still planed ? I'm in the exact same situation, I speak French but I prefere to read the documentation in English. I can try to fix it if nobody have time or knows how to do it. If I can have some help, to do it, it would be awesome.
No, this bug is not being worked on, and I don't think staff will pick it up this year. I think it will not be an easy fix, and the solution proposed would make the experience worse for most users. 97% have the default of English as their preferred language, which I think is because they haven't set it rather than a true preference.
(In reply to John Whitlock [:jwhitlock] from comment #8) > and the solution proposed would make the experience worse for most users. 97% have the default of > English as their preferred language, which I think is because they haven't > set it rather than a true preference. The MDN profile allows to choose No preferred language. I have the impression that I did explicitly set it to English (and seen that it had no effect), but I may misremember. Otherwise, since that setting seems to have currently no effect, this could be resolved by forcing No language to all users before fixing the bug.
It looks like "-------" is an option on the profile page. This is stored as a Null in the database. The default for profile records is English, so I think everyone gets that when their account is created. One possible implementation: - Make "no preference" the default for new accounts - Assume everyone that has English selected meant "no preference", and update the data - Update the "no locale" middleware to redirect to user's preferred language - Add a "Read this in X?" banner if the user has a preferred language that isn't the current language The target audience for this change seems pretty small though: - Users whose browser language preference (HTTP Accept-Language) is not their preference on MDN - Users whose search engine language is not their preference on MDN This means it will be difficult to get this work prioritized in the next few months. It is very likely that it will be another 2-3 years until it is fixed by staff. The shorter path may be: - Find or write a plugin that allows you to set your language preference for MDN - Adjust your search engine settings to present the English pages on MDN
A MDN contributor implemented a cookie-based solution in bug 1331729, that partially addresses this issue. It does not force the locale (the URL wins), and some visitors would prefer automatic redirects (bug 1440602). I've proposed a web extension, to allow customizing this behavior (bug 1432826), but there may be other ways. I prefer the cookie-based solution, since it does not require creating a MDN account for the sole purpose of getting the desired language.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.