mojira.dev

Lars Erik Grambo

Assigned

No issues.

Reported

WEB-1598 Minecraft.net does not redirect to /nb-no/ in google chrome Fixed WEB-1584 minecraft.net ignores Accept-Language q-factor weighting Fixed

Comments

Looks a bit dry.. I mean, you did remove my highly unprofessional, yet mergially funny rant. 😃
But off course, this is something your developers are going to have to use, so it has to look clean. So thank you for that.

As requested, I created a seperate issue for the failing redirect for norwegain. It got the id "WEB-1598".
I hope my formatting is acceptable.

I see.
I use Linux mint, and my preferred browser is Chrome (version 76.0.3809.132 ).
My OS langauge is set to US english, if that matters.
Since you brought up browser language as a factor, I decided to do some testing and experimenting.
The only other browser program I have installed, is Firefox (version 68.0.2).

When opening minecraft.net in Firefox, I am redirected to /en-us/.
So it seems the browser is indeed a factor.
Firefox language settings is set to [en-us], with [en] as secondary.

Chrome still redirects to /da-dk/.
Checking the language settings of Chrome, "English (United States)" is set as my standard language.
However since Chrome likes to nag about translating websites, all languages I can read, including danish, are on the language list (so it won't nag).

My browser-language list in Chrome is:
English (United States)
English
Norwegian Bokmål
Danish
Swedish

I tried reversing the order, randomize, reorder.
Every change has the same result. I am redirected to /da-dk/.

When removing Danish from the list, I am however redirected to /sv-se/.
Altering the order in the list has again no effect.

When next removing Swedish, I get redirected to /en-us/.

Next I tried removing either version of English (then re-adding the other).
In both cases I got redirected to /en-us/

When removing all but Norwegian Bokmål, I am not redirected.
The website url stays as minecraft.net, with english text.

Puzzled by this, I decided to add Norwegian Nynorsk, a secundary version of norwegian.
No re-direct.

When restoring the lanaguge list to what it was, I am back to /da-dk/.

This is indeed quite odd.
So I decided to test by adding Danish and Swedish to Firefox.
Just like in Chrome, no matter the order in the language list in Firefox, redirect goes the /da-dk/.
But here is something even more odd.
Adding Norwegian to Firefox's list results in a redirect to /nb-no/, the Norwegian version.

Based on this, I think I may have revealed two issues.
1: The backend code ignores the order of prefrence of the browser lanagues, and instead returns first matching lanague (both browsers).
2: Redirect to norwegian version of minecraft.net is broken for Chrome, but not for Firefox.

I hope this helps you folks to figure this out. If you want more details, let me know.