Commit Graph

6 Commits

Author SHA1 Message Date
Niklas Laxström
e87dd20cdd 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
2017-11-27 14:57:42 +01:00
Niklas Laxström
217aefdb7a Move als->gsw override to ext.uls.init
So that it is loaded for compact language links. The ext.mediawiki.uls
module is starting to look very empty now can could be removed easily
in follow-up. ext.uls.init depends on jquery.uls.data so this is safe.

Bug: T139949
Change-Id: Icac10f073e122284723c48782c2a1cf7f10b45ec
2016-07-27 06:16:51 +00:00
Siebrand Mazeland
6a2b2e0bba Update test files
- Updated versions and order of checkers.
- Some consistency updates in Gruntfile.js.
- Updates to make jscs pass.

Change-Id: I7ed93596ff383dc713bd17af2da0472be934d59d
2016-02-18 18:51:37 +00:00
Justin Du
0dea64ea86 Remove getCustomPrinter from ULS extension
Bug: T91457
Change-Id: I0cff2c687a40a4af3b0202255f59f4f37ea41788
2016-01-22 11:27:53 -06:00
Thiemo Mättig
5fab7bd738 Make sure script execution doesn't stop by assuming unchecked input is set
These methods aren't designed to return "undefined" or "null".
What they return is not checked. It's assumed to always be an
object (2 of them) or an array (1 of them). This simple patch
does make sure the following code does not fail with TypeErrors.

Bug: 55701
Change-Id: I19f51bbff2209044485b9d7cef4c7654cb5f6425
2014-03-22 15:54:47 +00:00
Santhosh Thottingal
f5ce066c80 Lazyload jquery.uls library
In the "interlanguage" position ULS is shown after 2 clicks,
so don't load it initially.

In the "personal" position ULS is shown immediately after
the language icon click, so load it, but conditionally.

The new RL module ext.uls.mediawiki is added for setting
jquery.uls defaults in a way that will lazy-load the language names.

Change-Id: Ic33ef034c794a523b5403867196c6098a58eb5b1
2013-11-11 14:13:02 +05:30