As a Spanish user viewing the English version of Wikipedia
I want to switch to the French version in my local language (francés)
so that I save time by not being required to remember that I need to search for it as "francais" or "french".
Related: T139799
# More detail
Ideally, in addition to searching in your current language (T139799), I should be able to search in any langauge: "Francés" (spanish version), "Französisch" (german version), etc. This is currently possible using the [[ https://www.mediawiki.org/wiki/Extension:UniversalLanguageSelector | Universal language selector ]] and I believe they are simply using the action api: action=languagesearch to do so.
While a search request is pending, do not modify the result list. Only upon response modify the list.
##Technical details
Change [[ https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/resources/mobile.languages.structured/LanguageOverlay.js#L131-L149 | client side filtering ]] to:
1. API query example: https://en.wikipedia.org/w/api.php?action=languagesearch&format=json&search=aleman
1. After that, match the language codes with the ones we have on the client to show the relevant results
##AC
[] Searching for "aleman" in an english wiki with english language browser will show "German" in the list of languages.
[] While searching there's an unobtrusive loading indicator as showed in the mocks.
[] If the api query fails, there is an error message shown as specified in the mocks.
[] If the api query takes too long, it should timeout and there should be an error message shown as specified in the mocks.
[] If there are concurrent searches the results shown will be the ones of the last query issued. Previous old queries will be dismissed if they arrive later.
[] Search API querying is debounced to avoid excessive network calls.
[] Unit and browser tests are adapted to the new behavior.
[] Event logging is not disturbed and works as before.