WordPress / browsehappy

101 stars 36 forks source link

Language switch is the wrong way around #13

Closed Krinkle closed 7 years ago

Krinkle commented 10 years ago

Right now, when browsing the site in such a way that it detects a different locale (e.g. nl: Durch), it will display the site in Dutch automatically. Then it shows a notice on top asking (in Dutch) whether I want to switch to Dutch. The link in question points to /?locale=en and results in the user switching from the unconfirmed detected language having been used to English.

The way it appears to have been intended is that the page remains in English, and then the notice on top asks in the detected language to switch to that, and then have it switch to that.

MatthewWilkes commented 9 years ago

I was pointed to this bug on Twitter.

When I visit the site with my language settings as:

 Accept-Language:en-GB,en;q=0.8,en-US;q=0.6,de;q=0.4

I see the site in German with an English fallback option at the top (so this bug is at least partially fixed).

I assume that the site is preferring non-english languages if they're acceptable rather than parsing the q= parameters of my preferences.Split into ticket #23

Otto42 commented 9 years ago

Actually, I think that some of the problem is simply incorrect translations, because they didn't understand the context of that particular line.

Examine here:

https://translate.wordpress.org/projects/meta/browsehappy/nl/default

They have translated "Browse Happy is also available in English." into "Browse Happy is ook beschikbaar in het Nederlands.". Unfortunately, the context from that translation is missing, as that link will always point back to English. So it really should be a literal translation, always stating "English", and not converting it to "Dutch" or any other language.

If somebody who knows Dutch wants to correct that translation (not me), they should do so there. Anybody with a WordPress.org login can submit translations there for review.

Edit: I submitted a new translation. Not sure if it's correct, but maybe the nl translators will correct it if not.