* 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
In class ApiBase the methods
* getParamDescription()
* getDescription()
* getExamples()
are deprecated since MediaWiki 1.25.
This change requires MediaWiki 1.25+.
Change-Id: Ice6b310b8dea3a223f45317aa803a743b5daa680
MediaWiki core change I04b1a384 added support for i18n of API module
help. This takes advantage of that while still maintaining backwards
compatibility with earlier versions of MediaWiki.
Once support for MediaWiki before 1.25 is dropped, the methods marked
deprecated in this patch may be removed.
Change-Id: I67395aff48185f3e09da31b51a08aa2541fe6a17
* Rename JsonMessageLoader to ULSJsonMessageLoader
* Correct the return type of mw.uls.loadLocalization
Follow up: Ic39dec1c484982fb07edd167e83794c0b5f470ee
Change-Id: I13c64a5e89ac75be8a95d951658018a78534f466
ApiULSLocalization is still present since we have to provide live
language preview feature.
Moved the loading of json file to includes/JsonMessageLoader.php
Also moved all RL modules to includes folder.
Bug: 56509
Change-Id: Ic39dec1c484982fb07edd167e83794c0b5f470ee
I specified one year as the desirable value on the bug, but one month is
probably saner since we're still hammering out the details of how to deliver
this data.
Bug: 56509
Change-Id: I4e3664f953e25b2c01b9c1f75d3aa27ef7e3af4f
* Since there is an API to load the i18n json files, avoid sending
list of localizations to client. Previously this list was used to
avoid 404s for json files. Now API takes care of it. Remove the
caching for this list too.
* Preload the i18n files on document ready. This avoids delay in
initializing IME or ULS window after fetch i18n from server.
* ApiULSLocalization can serve messages for all namespaces known if
namespace parameter is not set
Bug: 50391
Change-Id: I6b848da35f57353790bf460983cdf19a11bb238a
* Introduce Levenshtein algorithm
* New API param 'typos' to give number of typos allowed
* test cases
Change-Id: I22bf34d08a910d1509d7eab5adc292eadc9a7c7d