Check preg_match return for failure and also check json_decode for
failure by checking for the index key needed for further processing.
Change-Id: Ifecf3fdaf476a05d0dc6fc1c40c3d8a2aa0fa88b
I noticed some language names are not searchable. I made it so
that autonyms from language-data are added to the search index.
Without this, languages not present in Names.php or in the CLDR
extension are not searchable via the API except by language code.
Change-Id: I51a9e2eb15fb40963e6edbf1db76133d84de7291
SIL had released a new version of this font
https://software.sil.org/padauk/download/
Update the webfonts using the released TTF
Change-Id: I89d7db0fecae9cf290099d459dcc1f847113e329
The following sniffs are failing and were disabled:
* MediaWiki.VariableAnalysis.UnusedGlobalVariables.UnusedGlobal$wgWBClientSettings
Change-Id: Ia5423c3d7ea419b3f073f35736de7a9379d4429a
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.LicenseComment.InvalidLicenseTag
The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment
Change-Id: I06e0542d737cec5e2500aad6d85f72951f8b584d
SPDX released version 3 of their license list (<https://spdx.org/licenses/>),
which changed the FSF licenses to explicitly end in -only or -or-later
instead of relying on an easy to miss + symbol.
Bug: T183858
Change-Id: Id75a37eab27282ca7797fa3e6ceb92750c59477f
* Not updated from upstream; last release is buggy as per upstream.
* Punjabi language has good font support in all modern operating
systems.
Bug: T180422
Change-Id: I323953b4c6293df89034f05e0c2e13a96b42dc34
1. Do string comparison for equality early in the method so that we can
do early return if it passes.
2. Move the zero length check for string up for early return. This may
not have any significant change in performance though.
Change-Id: I86bdd612a4a31c5ebfac6bcd7687b829acc69cda
* 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
* Unknown upstream
* Not updated for years
* ne has better support in operating systems
* Non-default font for ne
Bug: T180422
Change-Id: Ife0b81e4db3bc069752d89c53f4690ddcfad7ef3
* These fonts are with no upstream now and little known among
Tamil users.
* Tamil is very well supported in all operating systems
now a days.
* Also reduce the metadata size for fontrepo
Change-Id: I4e7afb6476a4714f8d87bd2a048309b732883b2f
* I maintain these fonts in upstream and there we several releases
since these fonts were added.
* Malayalam has better support in operating systems compared to 2012
when these fonts were added.
* Reduce font metadata size for wikipedia pages when webfonts are
enabled.
Change-Id: Ie5b54cc866b1c67849b094a9701b2c80d876b55f
* The languages covered by these fonts are now available in all
operating systems.
* These fonts are not updated for years in our repo
* Saves the amount of font repo data we deliver for *every wikipedia
page* when webfonts is enabled
Change-Id: Ia0f1b6acc4cf8b7a354671bea47b58425ab8c08e
This adds several custom languages.
The addition of Punjabi addresses Bug T178070.
The addition of Chinese addresses Bug T73891.
Georgian and Catalan (Valencian) variant spellings
are added because these are the most frequent languages
that are not found in the ULS search box.
Bug: T73891
Bug: T178070
Change-Id: Ifbb08b560e454643d246379c19f725bde61917e9
To keep the average and maximum bucket size low, I made codepoints
< 4000 more granular and code points >= 4000 less granular. This
could be tweaked further for sure to reach more even sized buckets.
Bucket stats before:
- 773 buckets
- smallest has 1 entries
- largest has 1804 entries
- median size is 66 entries
- average size is 45.394566623545 entries
Bucket stats after:
- 698 buckets
- smallest has 1 entries
- largest has 1792 entries
- median size is 16 entries
- average size is 50.272206303725 entries
Change-Id: Id62d93658117564b05294c2fe36ca7c182784859