Commit Graph

274 Commits

Author SHA1 Message Date
Niklas Laxström
25a5691942 Update language name search index
Incorporates changes from CLDR 42 via the cldr extension update.

Change-Id: I944b159fd128386887dc389ff453dd8e49ff8401
2023-03-04 13:41:23 +00:00
Ed Sanders
02e17c5242 build: Update eslint-config-wikimedia to 0.22.1
Change-Id: I02692eeabb23c5b99997faa7a17d42f019148ed1
2022-03-08 09:41:49 +00:00
Santhosh Thottingal
cc1a255081 Update GentiumPlus font
Update to version 6.001
Upstream font file names were changes. So updated it here too.
Added Bold and Bold Italic since they are present in upstream.

Bug: T298613
Change-Id: I1c0429f6c5abac66471df0fa96738a10a7b28d04
2022-01-10 07:38:58 +00:00
Reedy
f9532855ad Namespace extension
Change-Id: I79aa319f177589d85446888289568748cd63d1c5
2022-01-05 10:47:22 +00:00
Niklas Laxström
fba3bf019e Update language name search data
Change-Id: If2bd2366e04c51a7454c7056ed5cdef955587e86
2021-10-25 14:25:10 +00:00
jdlrobson
f8fde38197 Use require to clarify ext.uls.preferences
ext.uls.preferences only depended on ext.uls.common because of its
use of the uls global. This is unnecessary, and made clearer by using
require and module.exports to access it.

Change-Id: Ied2a1b560d19a18529fd766ced778c912199fa2f
2020-10-20 16:08:59 +00:00
Fomafix
e7ab5faf2f Use type hints for TypeError exception
This change allows to replace the Assert::parameterType by a type hint
in Ie215179b4631fd9071b257772c5cb193547cb7d7.

Change-Id: I399a92d3fac0e0849fe3a403c703fe7d32f51257
2019-10-31 19:12:09 +00:00
James D. Forrester
9647474e5e build: Upgrade mediawiki-codesniffer to v28.0.0
Change-Id: I87cca3ebf32c87ef1cf163e3c7ca3f8337e54c8d
2019-10-11 12:35:39 -07:00
Amir Sarabadani
f1e9eedb96 Clean up most of b/c for phpunit4
We don't support phpunit4 anymore:
https://w.wiki/9UT

Change-Id: Id7ad0e139f454becfac87bedca75b271250d387c
2019-10-05 19:44:54 +02:00
Ladsgroup
32b36828fd Revert "Return target of redirect languages in mw.uls.getFrequentLanguageList"
This reverts commit 76551ed4a7.

Reason for revert: It seems it's breaking Serbian editing Wikidata

Bug: T217770
Bug: T121747
Change-Id: If69156400ff665a8c488a24f70d6a100e26761da
2019-08-25 22:11:57 +00:00
Amir Sarabadani
76551ed4a7 Return target of redirect languages in mw.uls.getFrequentLanguageList
When mw.uls.getFrequentLanguageList() is requested sometimes
the language that is a redirect returned causing other codebases (like Wikibase)
to show an invalid language to the user.

Bug: T217770
Change-Id: I49c802d584081aa5992dd0ba76144059bcac56c8
2019-07-18 09:23:34 +00:00
Niklas Laxström
ec20e81a37 Fix test failures by updating the failing test case
Change-Id: Ie0207d595f4c482e8d9b5ebbea641804bd3a55cc
2019-07-08 08:57:10 +02:00
Niklas Laxström
6939354e16 Update language name search index
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
2019-05-21 17:21:21 +02:00
Santhosh Thottingal
da0aad3e03 Add fonts for Church Slavonic
Adding Ponomar, Fedorovs, Menaion and Monomakh restaurant.

Bug: T156843
Change-Id: I8f7c4861fc667bba3dfd4359f2c59633fa6f83ff
2019-04-01 12:39:33 -07:00
Fomafix
ce063ac705 ULSJsonMessageLoaderTest: Expect a generic Exception
This allows to change from MWException to
Wikimedia\Assert\ParameterTypeException by
I8287118cf8ec01326ead9c90a38f7b4134c3eba9.

Change-Id: Ib0cb388958cf720052ca6df73d5145b7ab3f9529
2019-03-14 10:05:59 +00:00
Umherirrender
df2aa345a3 Use ::class for class name resolution
Available since php5.5

Change-Id: I31f5157146f5977feecbd9537f8b4a1c292b0d22
2019-03-03 15:17:57 +01:00
Thiemo Kreuz
24559cd1af Add basic tests for ULS' ResourceLoader modules
This is a starting point to increase the test coverage in this code
base.

Change-Id: I215713e928e9b55615afd17ccf7a7082ef559e01
2018-12-22 00:00:00 +00:00
Thiemo Kreuz
1961ec1766 Add basic unit test for FontRepoCompiler
Change-Id: I9b56c1c732a12f79eb2ba6667b7d8c06564ff90f
2018-12-16 19:28:12 +00:00
Ed Sanders
244dc55084 build: Update eslint
Change-Id: Iad621ac54d3e1f69f382462d5fa3e12bc8e138f1
2018-11-05 08:13:05 +00:00
Ed Sanders
2024009482 build: Update linters
Change-Id: I20e4794d0f565a284917f35d15736e3f33523856
2018-10-02 16:45:00 +00:00
Fomafix
971e4c742d Simplify by using native JavaScript instead of jQuery
Still use $.each for iterating over an Object because there is no
adequate function in ES5.

Change-Id: Idbec13c471e75a9cd5d67204d54bededdbd5582b
2018-09-07 22:35:13 +00:00
Timo Tijhof
4e067715dc Remove redundant closure aliases
'mw' are '$' are globals, always have been, and aren't going
anywhere. They're every bit as real as their longer versions.
If anything, the longer ones are less "real" or 'stable" because
they're not used internally by RL and easier to accidentally
replace or override. For anecdotes and history, see 91f950d6b0.

Change-Id: I526fb8c961d9477992d88f2780a0ff4cbdc51923
2018-09-07 19:23:17 +00:00
Amire80
635cada69b Revert "Simplify by using native JavaScript instead of jQuery"
This reverts commit 0fbdbc2c41.

Bug: T203750
Change-Id: I1bca27b2087f6fc1bfad153f17f4650c52786a7f
2018-09-07 08:57:16 +00:00
Fomafix
0fbdbc2c41 Simplify by using native JavaScript instead of jQuery
Change-Id: I2ca5fbb21ac473f482579a944e5ab68c9374191c
2018-09-04 00:32:12 +00:00
Thiemo Kreuz
6d714e1fc7 Update @covers tags of LanguageSearchTest
That second class (which is generated by the LanguageNameIndexer script)
is an integral part of the class under test.

Change-Id: I7d8dc66b4d1e86684e0de3e585d9e0a544640159
2018-08-09 19:46:14 +02:00
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
Santhosh Thottingal
4f3461a9aa Remove autonym font and its usage
I no longer maintain the Autonym font.
Also remove the tofu detection.

Bug: T135464
Bug: T135465
Change-Id: I103aab40ea5f5fc403a7ee5b23d1b634cc9c6ee1
2017-11-13 08:03:12 +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
Željko Filipin
4251150afe Deleted all Ruby code
The only Ruby code were broken Selenium tests.

Bug: T164479
Depends-On: Ic14b86a5006da360d022af875b4aa8c119a3678a
Change-Id: I15f641cd08ec3ba483c11764a89c9ed493a570a8
2017-09-29 19:38:39 +02:00
Fomafix
b0a60f92c6 Add <!DOCTYPE html> to HTML
Change-Id: I317405c56a66334cd0eaff5983cfea909be6f6fb
2017-05-03 12:10:23 +02:00
Niklas Laxström
cb9493640a Update QUnit test for modern standards
* expect is no longer needed
* start/stop is deprecated, replaced with async/done

Change-Id: I8275af21df73f1c35a51f9a0dcf5a1811cf73ad8
2017-02-22 08:26:52 +01:00
Fomafix
47cfd9c1ae Replace $( document ).ready(...) by $(...)
In jQuery 3 $(document).ready(...) is deprecated.
https://jquery.com/upgrade-guide/3.0/#deprecated-document-ready-handlers-other-than-jquery-function

Change-Id: I1a9f578d8cf8fa2d9dd38a1b2d3a0b3c32914b74
2017-01-06 14:10:55 +01:00
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
jenkins-bot
8bb0c2f683 Merge "LanguageNameIndexer/Search: use unicode aware lowercasing" 2016-08-08 07:06:57 +00: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
Kartik Mistry
d4ea8550fa Update Skeirs II font
This fixes display of Latin text in Gothic script.

Bug: T124785
Change-Id: Iaf2cc6b05591368356c241e7b65ce4a8e33c24e0
2016-07-28 15:32:27 +02:00
Kartik Mistry
38748392a0 tests: Fix path of jquery.webfonts
Otherwise test page is not working.

Change-Id: I6a220f9fa03828d78668b4852c1af634330b0972
2016-07-27 21:30:03 +05:30
Niklas Laxström
7056364168 Regenerate font test page.
Stop appending version which no longer exists. Replaced by file hash.

Change-Id: I978ff69cb9df1f0ce17ac0d7893d980d509655c1
2016-05-24 08:19:00 +02:00
Niklas Laxström
71133ffdfc First attempt at font test page generation
Does not include all variants and not all languages have example content.

Change-Id: If5b759f2ed6e8e487f73ea7a88be5cc6b741b356
2016-05-10 07:33:47 +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