Page MenuHomePhabricator

Browser language detection does not work at en.wikipedia.beta.wmflabs.org
Closed, ResolvedPublic

Description

Browser language detection does not work at en.wikipedia.beta.wmflabs.org

To reproduce:

  • set browser default language to German
  • go to a random page
  • navigation should be in German

This works just fine at sandbox.translatewiki.net, but not at en.wikipedia.beta.wmflabs.org.

We have a failed test:

https://github.com/wikimedia/qa-browsertests/blob/master/features/uls_accept_language.feature

Take a look at attached screen shot.


Version: unspecified
Severity: enhancement

Attached:

uls.png (900×1 px, 489 KB)

Details

Reference
bz48832

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 1:32 AM
bzimport set Reference to bz48832.
bzimport added a subscriber: Unknown Object (MLST).

I dont think that feature is enabled on the production wiki. https://commons.wikimedia.org/ shows me an English interface when my browser has French as default.

Redirecting bug to ULS to find out whether this is wanted on the prod wikis.

Yes we would like it very much! But $wgULSLanguageDetection is set to false on WMF wikis until Varnish can be configured to process Accept-Language without breaking caching.

There is an easier step before that and that is to set $wgULSAnonCanChangeLanguage to true and have Varnish to vary by the language cookie -- also waiting for a support in Varnish.

I don't really know what to do with this report. We know this doesn't work, we also know that our infrastructure isn't ready for this, at least when it comes to anonymous users; Ops tells us that Varnish 4 is needed to maybe allow us to make this work for anonymous users. We could make it work for logged in users, along the lines of

Given

a MediaWiki instance

When

I haven't logged into it before (i.e. new account creation), or
I have never set a user interface language ("backward compat handling)

Then
My user interface language will be set according to a supported language in MediaWiki based on my browser's Accept-Language value.

I'm setting this to "enhancement/lowest" for now, despite the currently incorrect issue summary.

As far as I am concerned, if we do not have an environment where we can test this feature, I vote for closing the bug and deleting the test.

We can also change the test to the one Siebrand suggested in comment #3, if that is something that we want tested every day.

The tests are fine, we just don't have a proper test environment for it. If I provide one, even if it's outside of the Wikimedia realm, would that be enough to retain the tests?

As far as I am concerned, if the tests provide value, and if we have an environment where we can run them, then we should keep them. :)

Running on sandbox now. I consider that as being a fix for this bug.