Safari: Language Cookie broken on MDN Website
Categories
(developer.mozilla.org Graveyard :: Localization, defect)
Tracking
(Not tracked)
People
(Reporter: tobias.muecksch, Assigned: peterbe)
Details
(Whiteboard: [specification][type:bug])
Attachments
(1 file)
1.14 MB,
image/png
|
Details |
What did you do?
I wanted to set my default language for MDN to English. I consulted the following FAQ thread, which suggests to “Set a language preference cookie” by clicking “Yes” in the little dialog after changing the language on the MDN website.
https://discourse.mozilla.org/t/faq-how-do-i-read-mdn-in-english/32085
I scrolled down to the very bottom. I chose en_US as language. The Page reloaded. Content changed to English. On the top right corner a small dialog appears and asks if I want to set English as default language.
I clicked "Yes".
What happened?
I chose en_US as language. The Page reloaded. Content is English. On the top right corner a small dialog asks if I want to set English as default language.
After clicking yes nothing happened. The dialog didn't disappear either. I checked the JS console. This error appears:
TypeError: undefined is not an object (evaluating 'mdn.utils.getCookie')
When re-visiting the page, the language is back to German.
What should have happened?
The language change should be permanent.
Is there anything else we should know?
Browser: Safari 12.1.1
OS: macOS Mojave 10.14.5
I also tried to change the language in my mozilla profile but this setting seems to ignored by the MDN page.
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Thanks for the detailed bug report. I'll try to reproduce.
Is your browser set to German by default?
I also tried to change the language in my mozilla profile but this setting seems to ignored by the MDN page.
Which "mozilla profile" are you referring to?
Reporter | ||
Comment 2•5 years ago
|
||
Is your browser set to German by default?
Yes. To be more precise: I've set German as language for macOS in the system preferences.
Which "mozilla profile" are you referring to?
When I navigate to https://developer.mozilla.org , on the top right corner I can see my profile image. I clicked on it, and then I clicked "Edit profile". This forwards me to this page: https://developer.mozilla.org/de/profiles/tobiasmuecksch/edit
I hope that is precise enough. Let me know if you need any additional info.
Reporter | ||
Comment 3•5 years ago
|
||
Is your browser set to German by default?
Yes. To be more precise: I've set German as language for macOS in the system preferences.
Which "mozilla profile" are you referring to?
When I navigate to https://developer.mozilla.org , on the top right corner I can see my profile image. I clicked on it, and then I clicked "Edit profile". This forwards me to this page: https://developer.mozilla.org/de/profiles/tobiasmuecksch/edit
I hope that is precise enough. Let me know if you need any additional info.
Assignee | ||
Comment 4•5 years ago
|
||
Yay! I can now reproduce it.
Note-to-self;
- First go to http://mdn.localhost:8000/en-US/
- Scroll down to the bottom of the page and chose "Deutsch (de)"
- That does reload the page and now the home page is in German. Good.
- Also, now on the home page the little pop-up dialog appears and I click "Ja" to say yes to switch over to German.
- Clicking that "Ja" attempts to do a HTTP POST to
http://mdn.localhost:8000/i18n/setlang/
But it fails to make that HTTP POST in the first place, because it can't extract the CSRF token. Because mdn.utils.getCookie
doesn't exist. Because mdn.utils
is undefined
.
Assignee | ||
Comment 5•5 years ago
|
||
After having clicked "Ja"
(ignore the line above in the web console. that's me putting some debugging console.logs in kuma/static/js/main.js:102
Assignee | ||
Updated•5 years ago
|
Comment 6•4 years ago
|
||
MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Updated•4 years ago
|
Description
•