Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Switches the lang value for Simple English from 'en' to 'simple'. | wikimedia/portals | master | +3 -3 |
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Jdrewniak | T126052 Cross-browser support for IE - JS fixes | |||
Resolved | debt | T125472 EPIC: Release to Production: Prominent Search Box with type-ahead (metadata/images in search results) | |||
Resolved | Jdrewniak | T125567 Fix "Simple English" language querying en.wikipedia.org instead of simple.wikipedia.org | |||
Resolved | • JGirault | T125571 Language selection should use native selector on mobile |
Event Timeline
Change 269134 had a related patch set uploaded (by Jdrewniak):
Switches the lang value for Simple English from 'en' to 'simple'.
@Jdrewniak I added my comment here, but to make sure it is visible:
I am not sure about this change.
It seems that it was done intentionally.
I tried to find some more documentation: https://meta.wikimedia.org/wiki/Special_language_codes#Subdomains_that_do_not_match_the_lang_attribute
https://meta.wikimedia.org/wiki/List_of_Wikipedias#Languages_without_ISO_639_language_code_or_duplicated_or_using_incorrect_code
https://meta.wikimedia.org/wiki/Wikipedia/Versions
But they sort of fail to explain that "simple english" wiki needs lang="en" as parameter.
Nonetheless, the bug actually happens on the *new* search box *only*, so we probably don't want to fix this here, but in the new search box code instead.
The way it works on the old language selector is that the option looks like this
<select name="language"> <option value="simple" lang="en">Simple English</option> </select>
So that the form gets submitted with the values language=simple and the lang attribute is used for accessibility purposes only.
The problem with the new selector is that it sets the lang attribute ('en') as the value, instead of the data-lang-value attribute: https://github.com/wikimedia/wikimedia-portals/blob/search-box/dev/wikipedia.org/assets/js/wm-portal.js#L714 In all cases except 'simple english' and this one ^1 , those two values are the same.
Given that @JGirault will be reworking the language picker for T125571 this fix can be factored into that work.
- I checked and for the Min Nan Wikipedia , http://nan.wikipedia.org redirects to http://zh-min-nan.wikipedia.org, so this issue only occurs for the simple english wikipedia.
Change 269134 abandoned by Jdrewniak:
Switches the lang value for Simple English from 'en' to 'simple'.
Reason:
language picker will be reworked.