Commit Graph

26 Commits

Author SHA1 Message Date
Kunal Mehta
10a5865f9a Fix MediaWiki.Commenting.LicenseComment.InvalidLicenseTag errors
Change-Id: I2c868006d108b35adaa19d179bc6ebe95e29d0ef
2018-05-23 23:02:54 -07:00
libraryupgrader
f97802e4e2 build: Updating mediawiki/mediawiki-codesniffer to 18.0.0
The following sniffs are failing and were disabled:
* MediaWiki.VariableAnalysis.UnusedGlobalVariables.UnusedGlobal$wgWBClientSettings

Change-Id: Ia5423c3d7ea419b3f073f35736de7a9379d4429a
2018-04-14 07:39:31 +00:00
libraryupgrader
858ebd5552 build: Updating mediawiki/mediawiki-codesniffer to 17.0.0
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
2018-03-29 06:53:52 +00:00
libraryupgrader
0ff8a8cfda build: Updating mediawiki/mediawiki-codesniffer to 16.0.0
Change-Id: Ic7b9cf06ccfdce3dfc9d97805a1ae66236e6547c
2018-02-15 15:41:58 +00:00
Niklas Laxström
1e15341fd1 Use dash as separator for non-prefix matches in language name search
Bug: T186480
Change-Id: Ib785e2b070e0c5a218b236be194417f0b1fbd102
2018-02-06 17:26:21 +01:00
Kunal Mehta
7eb5b5def6 Add @covers tag
And remove unnecessary require_once, since that file is already in the
autoloader.

Change-Id: Id66d79a116043186b4d1bad73d04a62c4142524f
2018-01-24 22:30:22 -08:00
Vagrant Default User
91a54767b6 Add aliases for Georgian, Armenian, Spanish, and Japanese
Also make it possible to add multiple aliases for a language.

Bug: T178996
Change-Id: I00bb4a158caed0c1ba15d41e294281a001c917b1
2018-01-18 14:45:26 +02:00
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
a353c5ab65 Perform search on every word of language name
See e.g. T132021. This favours coverage over quality.

Change-Id: I3fc8fb1702802bc002c3d7e2941563840914f325
2017-11-23 09:14:10 +00:00
Amire80
101532cfa6 Add special language names to facilitate searching
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
2017-10-25 13:50:12 +05:30
Santhosh Thottingal
18c09bc6d3 Update language name data index with CLDR 31
Change-Id: I7c7b26a01b5c5780cbf7a19983388e16b4e97cc1
2017-10-24 17:52:29 +05:30
Timo Tijhof
f06ac3efca Simplify ResourceLoaderULSModule with content-based versioning
* Remove manual tracking of when a hash is first seen.
  ResourceLoader is no longer time-based, rather it is content based.
  Except where a timestamp is actually wanted as key, a hash is all
  we need. The default implementation of simply calling getScript()
  and hashing its output suffices, and isn't a performance problem
  in this case.

* Also simplify getScript() by passing an object to 'mw.config.set'.
  Instead of multiple calls for each key/value. This is a no-op
  now because there is only one key.

* Fix inaccurate class comment that was copied from an unrelated
  module in MediaWiki core.

Change-Id: I9bb82cadd9caa7e584e20dd49ce30b64218326c4
2016-08-23 14:49:16 -07:00
Niklas Laxström
9daeacf1c5 LanguageNameIndexer/Search: use unicode aware lowercasing
With this MEÄNKELI with typos=1 finds results.

Updated test case for lowercased result. Renamed variables in test
file for clarity. Updated the default value for MW_INSTALL_PATH to
work with the default layout.

Change-Id: Id93c84d308705f55b4d2378fc8c7b7f243e1b53f
2016-08-08 08:43:15 +02:00
Kunal Mehta
6b8c33e763 build: Updating mediawiki/mediawiki-codesniffer to 0.7.1
Also added "composer fix" command.

Change-Id: I6f3f29f03abb607fbca9cec6f140875f2a3468a0
2016-05-09 18:30:34 -07:00
Siebrand Mazeland
f8487a54eb Use single quotes where possible
Change-Id: I8c0098e4840d7eff16cf5818f2247b134946d77b
2016-03-07 07:13:10 +00:00
Siebrand Mazeland
49b4cc0028 Declare functions with access modifiers
Change-Id: I047d3dc6642de07130a43ad4c2fd4a8106450aac
2016-03-05 16:10:52 +01:00
Santhosh Thottingal
a6beeff043 Correct a language name to make all phpunit tests pass
CLDR had updated the language name for ms

Change-Id: I661128c1d237bb169e17ee605e6fa19054a476fe
2014-12-09 11:48:11 +05:30
Niklas Laxström
bd52ae0538 ResourceLoaderULSModule::getModifiedTime updates continuously
Fix is simple: cache the hash of content per language

Added PHPUnit test for the same

Bug: 56856
Change-Id: I590b27af220d6e790c70728062d1a04c098b3d11
2013-11-11 16:12:07 +05:30
Santhosh Thottingal
243972403b Use MW_INSTALL_PATH for test path if defined
Change-Id: Ib4eedb61f37e3b8a5c834dc417342543771a2d33
2013-10-09 17:54:17 +05:30
Siebrand Mazeland
102f257427 Fix CodeSniffer errors and warnings
More fixes will be submitted upstream.

Change-Id: Ib22997f8756537b063fd6eed3f1f74f3eda315d7
2013-08-05 05:55:03 +02:00
Siebrand Mazeland
98d7a8d9f9 Reformat code.
Change-Id: Ic0a5b37fa01b4a13023e66af0518ea94919ee880
2012-11-11 10:34:10 +01:00
Siebrand Mazeland
e1a4f7f0cb After training the PHPStorm code formatter.
See https://github.com/siebrand/MediaWiki-PHPStorm

Issue remains with anonymous functions in JavaScript.

Change-Id: I2b520f8df127452acf02deb659277a6465e6ca59
2012-09-17 17:10:59 -07:00
Santhosh Thottingal
baa3aae6cc Fix the LanguageNameSearch::search call used in phpunit test
Change-Id: Ib95e0738f6a6866dd7e7d84be0c0c6a03a671ce7
2012-08-30 21:54:10 +05:30
Santhosh Thottingal
76f9038aff Allow typo in search key
* Introduce Levenshtein algorithm
* New API param 'typos' to give number of typos allowed
* test cases

Change-Id: I22bf34d08a910d1509d7eab5adc292eadc9a7c7d
2012-08-03 07:33:12 +00:00
Santhosh Thottingal
08c14dafa4 Cross-language language name search
Implementation of Also Written As language name
search algorithm.
See http://etherpad.wikimedia.org/l10n-uls-language-search

Change-Id: Iff84408c531b650a44d031b63d5c823737cceafc
2012-07-30 14:08:26 +05:30
Santhosh Thottingal
8527e33475 Skeleton extension for Universal Language Selector
* Basic extension code with i18n
* Adds a link to personal links to trigger ULS
* Core uls javascript code, to plug to the given trigger.
* Qunit, PHPUnit framework in place.
* and lot of TODOs and FIXMEs

Patch set 2:
* A tiny whitespace fix.

Change-Id: I300647a21e0b7f65b7d9dc6101014ea9389c9f2a
2012-06-15 10:49:18 +03:00