Improve ULS language search api

* Store prefixes and infixes separately in the data
* First match language code, then prefixes, then infixes
* Try to use suggestion either in user language or autonym first
* use formatversion=2 to avoid escaping Unicode

Using Language::fetchLanguageName might can have a small
performance impact. On the other hand there is now check
to skip languages we already found, avoiding some fuzzy
matching.

This is in a preparation for a change in jquery.uls to use
the search API more, while trying to reduce the amount of
weird autocompletion suggestions we show to the user.

Bug: T73891
Change-Id: Id94c5352d9a591969bf90144d1d2d5e758d08301
This commit is contained in:
Niklas Laxström committed 2017-11-27 14:57:42 +01:00
1 parent a353c5ab65
commit e87dd20cdd
6 files changed
+51632 -46567

No files matched your search

+51517 -46533
View File
File diff suppressed because it is too large. Load diff