Commit Graph

3324 Commits

Author SHA1 Message Date
Amir Aharoni
215145a95a Update jquery.ime from upstream
* Adding a transliteration layout for the Ho language
  in the Warang Citi alphabet (by Purty).
* Enable the Palochka layout for Ingush (by stjn).
* Styling improvements in the IME selector (by Volker E).
* Fixes for the Blin / Tigre / Tigrinya GeezIM layout (by Fitsum Gaim).
* Fixes for the Santali Ol Chiki InScript 2 layout (by Ramjit Tudu).

Updating to
2046765d31

Change-Id: I04ba0553ec52fa8f5c8317c538394232c2291346
2018-12-03 14:35:51 +02:00
James D. Forrester
88b443a143 eslint: Drop 'dot-notation' rule
Bug: T210552
Change-Id: I29aa37804714b6af13d3459773ea046636545ecf
2018-11-28 11:19:37 -08:00
Translation updater bot
23c818c078 Localisation updates from https://translatewiki.net.
Change-Id: I3539d87d298c9b1237cec5f6f03b949890f7110f
2018-11-26 22:32:25 +01:00
Volker E
e55d85453a Apply background-color of header for callout arrow
The callout has been carrying the wrong color for the elements it's
applied to.

Change-Id: Ifedc21f4686b94f368c3a41eed1d3e35b467d635
2018-11-26 06:08:25 +00:00
Translation updater bot
a7067645d5 Localisation updates from https://translatewiki.net.
Change-Id: Ie347f9bcdd59cf5129960e23732f84135f574e2c
2018-11-25 22:34:17 +01:00
Translation updater bot
98307ef00e Localisation updates from https://translatewiki.net.
Change-Id: I438d68a746f3df646402b7dad01b6333a98d27ae
2018-11-21 22:29:30 +01:00
Volker E
aa15e2eda3 Update 'help' icon to standard
Bug: T90414
Change-Id: I3906d452bacb312dd6c97118ad5bf34168fe1da7
2018-11-21 06:47:31 +00:00
Translation updater bot
0c8380f9eb Localisation updates from https://translatewiki.net.
Change-Id: I9bb1ba410601e1debd0e2b8d53a265887dd6c584
2018-11-18 22:48:50 +01:00
Translation updater bot
6a262403b7 Localisation updates from https://translatewiki.net.
Change-Id: Icc7ad9f0ab8cfb2e8e0bbbe335bc4d7fdab00f79
2018-11-16 22:29:46 +01:00
Translation updater bot
d7e9803be4 Localisation updates from https://translatewiki.net.
Change-Id: I44316d3085600cc7d990bdb435c0afcaf8aebb8e
2018-11-10 22:28:31 +01:00
Ed Sanders
244dc55084 build: Update eslint
Change-Id: Iad621ac54d3e1f69f382462d5fa3e12bc8e138f1
2018-11-05 08:13:05 +00:00
Translation updater bot
3747d234c8 Localisation updates from https://translatewiki.net.
Change-Id: I952c77161eb1c63c4a4aba34f54b874eac08aeee
2018-11-04 22:42:49 +01:00
Translation updater bot
60e892b8e3 Localisation updates from https://translatewiki.net.
Change-Id: I35dbfd77a25bc738f44e486caf661ce64cb9d8da
2018-11-03 11:03:38 +01:00
Kartik Mistry
e61b40ca9c MLEB: Update version before MLEB release
Also, fix some old copyright year.

Bug: T206609
Change-Id: I2f5a04c01657b6a6853bba2458ea54ab210d1fae
2018-10-29 09:17:08 +00:00
Kunal Mehta
bf44482142 build: Updating mediawiki/mediawiki-codesniffer to 19.1.0
This version fixes PHP 7.3 support (T207250).

Change-Id: I63e84a7c13d2b3a53e7672fdfcdd89ab4cb8f4d2
2018-10-27 10:39:44 +00:00
Translation updater bot
fd00f8ab18 Localisation updates from https://translatewiki.net.
Change-Id: I9d2ddb7366a4860a69092c7a64aded624a519f0f
2018-10-22 22:15:43 +02:00
Fomafix
d052482cb0 Use <a> instead of <a href="#"> for JavaScript click events
* No status line with URL and "#".
* No new tab on middle click.

tabindex="0" ensures to have the normal tab order.

role="button" according to
https://www.mediawiki.org/wiki/Accessibility_guide_for_developers

Change-Id: I82f1923b3905f111ce7719c03a3919633271720a
2018-10-17 20:16:19 +00:00
Niklas Laxström
dd390d2ec0 Do not precompute href or autonym in #getInterlanguageList
Only store reference to the element, where they can easily be read
when needed.

Also removed one unnecessary use of `self` as an alias.

Change-Id: I39fa897002037a6d6478a3fb1f40ac60833e392e
2018-10-11 13:07:25 +00:00
Translation updater bot
3f4d43a4cc Localisation updates from https://translatewiki.net.
Change-Id: I4f3e9d305f80de3d56615b700d978fa92939bb4c
2018-10-10 22:24:46 +02:00
Niklas Laxström
5ed2ff7d8f Update some outdated comments
Change-Id: I73c7b0549d7335019a1919229afa2e45a92ffacd
2018-10-10 16:14:05 +00:00
Fomafix
fd9e39afb2 Sort ResourceModules in extension.json alphabetically
Change-Id: Ifb96dd97247592154191318531a535ce4c532dbd
2018-10-10 13:44:52 +00:00
Timo Tijhof
1ad0c9c819 ext.uls.eventlogger: Remove use of removed setDefaults() method
Follows-up 2ac8a0a4b6, which removed this method. In checking
Codesearch, I somehow missed this one call among the false positive
results for Datepicker and TMH-related calls to a different method
also called "setDefaults".

Bug: T206588
Bug: T187207
Change-Id: I4f94ce6f8f1b85c192b69c5b50c3f090f7b4bfd2
2018-10-10 02:42:02 +00:00
Kartik Mistry
ac1254c08a Update jquery.ime to ff0cfc0 from upstream
Changes:
* Update Sarjom Baha layout.
* Fix autonym and titles for Santali.

Change-Id: Ie83a7566ae91b2f27d9c232b585f0906c093b782
2018-10-04 14:24:28 +05:30
Translation updater bot
e2d97b93bd Localisation updates from https://translatewiki.net.
Change-Id: I9ce3d898f83f0196474e31b6479e6e58c2c5e704
2018-10-03 18:53:58 +02:00
Ed Sanders
2024009482 build: Update linters
Change-Id: I20e4794d0f565a284917f35d15736e3f33523856
2018-10-02 16:45:00 +00:00
Translation updater bot
53769b2084 Localisation updates from https://translatewiki.net.
Change-Id: I5f478b6bf8c8540edc0eacad4995d4d690ef4b52
2018-09-26 13:46:28 +02:00
Timo Tijhof
fcfa36ac77 compactlinks: Optimise performance of list creation logic
Add potential items directly to a single array with two indexOf
checks.

Previously, potential items were first put in a new temporary array,
then that array was filtered with indexOf checks into another temporary
array, and then the result of that combined with the previous results
into another temporary filtered array, and then the previous results
array replaced with the new one. This eliminates 2*2N filter+concat
calls an their overhead from calling functions, creating arrays,
copying arrays and the memory for those arrays. (Where N is the number
of language-list strategies). It also reduces the total number of
indexOf calls.

Below is a comparison of time spent in createCompactList() during
page load process, compared to master without this and the previous
commit. Measured on localhost with Vector, EventLogging, Interwiki,
and ULS installed; on a page that is a copy of en.wikipedia.org/Messier_87
and its 51 interlanguage links. This page was a featured article
last week. Its count of links seems average compared to other
featured and/or most-viewed articles last week (the other ones
I checked had 23, 43, 52, and 76 langlinks respectively).

|--------------|----------|--------|
|              | Before   | After  |
|--------------|----------|--------|
| Chrome 69    | 77.5ms   | 41.4ms |
| MacBook Pro  | 57.7ms   | 44.4ms |
| CPU 1/6th    | 63.8ms   | 45.3ms |
|--------------|----------|--------|
| Firefox 61   | 12ms     | 10ms   |
|              | 10ms     | 9ms    |
|              | 11ms     | 8ms    |
|--------------|----------|--------|
| Safari 11    | 3.5ms    | 2.7ms  |
|              | 3.3ms    | 2.6ms  |
|              | 3.4ms    | 2.8ms  |
|--------------|----------|--------|

Bug: T127328
Change-Id: I56052e7c01c6a667500773e12c755a7a5f5d9cd0
2018-09-24 17:19:45 +00:00
Translation updater bot
d5620f3a69 Localisation updates from https://translatewiki.net.
Change-Id: I2be4d53d1059da6ea0ff807b03f4484a2ea76d00
2018-09-24 09:18:27 +02:00
Translation updater bot
509aedd6bd Localisation updates from https://translatewiki.net.
Change-Id: Ib98d59b763a3fbe5a6c3d2dc6070d35382a3afc5
2018-09-22 10:04:15 +02:00
Translation updater bot
9c71904a3d Localisation updates from https://translatewiki.net.
Change-Id: I98bfa204d8223f56f30c87cfb92fe130c240478e
2018-09-19 10:01:45 +02:00
Niklas Laxström
d3cd069f7e Correct alignment of cog in interlanguage links in Vector skin
Bug: T162381
Change-Id: Ieaa75507d9c73eccbadc03d915bb7107e728fe0f
2018-09-17 18:44:47 +00:00
Translation updater bot
40a95e7605 Localisation updates from https://translatewiki.net.
Change-Id: Ibb5282457ebe38d1533751123f9947047aa1835e
2018-09-15 09:54:52 +02:00
Timo Tijhof
effcd80471 compactlinks: Optimise performance of DOM logic
The createCompactList() function runs synchronously during the
module execution burst. Due to it visually changing the page, I
won't defer it with rIC for the time being, although that should
be considered for the future. For this commit, I'm trying to make
it fit the budget of <50ms because ULS is currently usually taking
80ms-180ms on desktop (MacBook/Chrome CPU/4), and that's during
batch execution with other modules as well, thus freezing the
UI thread for much longer than that.

constructor:
* Remove needless clone of jQuery object.
  Use $foo instead of $( $foo ).
* Remove creation of 'interlanguageList' and 'compactList' objects
  that are immediately removed and re-created by init().

init/getInterlanguageList:
* Use the HTMLElement.lang and HTMLAnchorElement.href properties
  directly instead of the DOM getAttribute().
  This means stores a full url instead of a relative url, which
  should help avoid other bugs in the future.
* Remove needless jQuery() constructor and jQuery.text() call.
  Use Node.textContent directly instead.
* Use HTMLElement#querySelectorAll instead of jQuery#find().

init/getCompactList/../filterByLangsInText:
* Avoid jQuery() constructor and jQuery.attr(),
  use the HTMLElement.lang property directly.
* Avoid jQuery() selector, call querySelectorAll directly.

init/getCompactList/../getCommonLanguages/../getFrequentLanguageList:
* Avoid temporary array copies from concat() and function overhead
  with forEach() and filter().
  Instead, keep only a single array, and iterate it once.

init/getCompactList/../filterByBadges (~10m -> ~0.5ms):
* Use one query via $(), instead of two queries $()+find().
* Use $.map() directly instead of map()+fakejQueryObject+toArray().
* Use querySelector(One) for the child instead of $()+find().
* Use HTMLElement.lang property directly.

init/hideOriginal (~5m -> ~0.8ms):
* Use querySelectorAll() directly instead of jQuery find().
* Set HTMLElement.style directly instead of jQuery() css().

init/render/addTrigger:
* Use createElement() and direct properties instead of $(), addClass(),
  prop() and text().
* The mw.msg() calls use text() and jqueryMsg#parser which is
  expensive.
  Use plain() for 'ext-uls-compact-link-info', which doesn't need parsing.
  Keep text() for the other message, and document why.

init/listen:
* Use async Deferred#then() instead of sometimes-sync Deferred#done().

Bug: T127328
Change-Id: I424c34fb82c8e95407f7b934e6d42019becbf909
2018-09-13 11:11:42 +00:00
Translation updater bot
00b1ea40ae Localisation updates from https://translatewiki.net.
Change-Id: I668708761f54a748eb43b078b5f3afb4bd49cde3
2018-09-12 09:19:19 +02:00
Bartosz Dziewoński
f0ad6be4ab Avoid reflow (FOUC) due to ULS link on Special:Preferences
Rather than building the link in JS, which is delayed until the JS
code loads, we build it in PHP and hide it from no-JS users with CSS.

Change-Id: If0c3a4dc137d8bf6cf24957dd063bd0a39791d2e
2018-09-09 10:52:17 +00:00
Translation updater bot
427c36a9e1 Localisation updates from https://translatewiki.net.
Change-Id: I2df3428ba01e36a92325c5f696e910dd74fb7972
2018-09-09 10:37:00 +02:00
Translation updater bot
ff7cd77675 Localisation updates from https://translatewiki.net.
Change-Id: I95af9df3a0aed97a0e102ed8bfcd9fd330c7397d
2018-09-08 10:40:19 +02:00
libraryupgrader
6131e48cf7 build: Updating mediawiki/phan-taint-check-plugin to 1.5.0
Change-Id: I2d9a3bb9148ded333008cc198e155dfd0a8fd294
2018-09-08 06:30:27 +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
Niklas Laxström
1857627c2f Drop support for discontinued freegeoip.net
There is a new service called ipstack, but their free option does
not support https, so by default there will not be any geoip service.

Bug: T199106
Change-Id: I9f4e59d736b50760f50c6214e2d191e72406d0d9
2018-09-07 19:45:21 +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
Timo Tijhof
e58be7c411 ext.uls.eventlogger: Remove unused $.Callbacks() indirection
It is created, unconditionally fired only once (right after creation),
and then used only with add(), which becomes a synchronous
self-call.

I've searched in Wikimedia Git and Codesearch, and found no uses
of `logEventQueue` or `mw.uls.eventlogger` outside this file.

Change-Id: I3832bcb409fc919c2078e583d50e20413dede163
2018-09-07 19:23:03 +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
Alangi Derick
445087e5fe Add recent pattern for ESLinting to repo
Use of all: '.' in Gruntfile.js for eslint config and
eslintIgnore in package.json to ignore linting the "vendor/"
etc directory.

Bug: T203648
Change-Id: I65756ab3b6f413021cedeb22c7933c6cffa2cb78
2018-09-06 18:05:42 +00:00
Translation updater bot
aec177a2a6 Localisation updates from https://translatewiki.net.
Change-Id: Idaaa67fae847507016b0049032aca7c886c42acf
2018-09-06 09:02:26 +02:00
Niklas Laxström
51d86ad5bb Move now static ext.uls.compactlinks to extension.json
Change-Id: Ie074918ca58de4c62a6ba44caa48d429e561bb6b
2018-09-06 05:43:53 +00:00
Kunal Mehta
8ee09f0ba1 Allow $wgULSLanguageDetection to work if $wgULSAnonCanChangeLanguage is false
$wgULSAnonCanChangeLanguage is documented as just affecting setting of
language for anonymous users via cookies and &setlang=. But currently it also
affects the fallback to Accept-Language if $wgULSLanguageDetection is enabled.

With this, $wgULSAnonCanChangeLanguage will now only control whether cookies
and &setlang= can be used for anonymous users, and keeps
$wgULSLanguageDetection independent.

Bug: T203179
Change-Id: I6c664ad11dc18b66190dc0644352b91adf87c9e5
2018-09-06 02:28:30 +00:00
Kunal Mehta
aa23d555a3 Vary caching on Accept-Language header if it is used
If we use the Accept-Language header to determine the interface language,
we need to vary caching on it so that a user with a different Accept-Language
header won't get the wrong language out of the cache.

Note that for optimal cache hitrates, you might want to implement parsing of
the header in your cache itself.

Bug: T203179
Change-Id: I976696cf20a5da5b2767c87e0d754a901b711a46
2018-09-05 01:53:44 +00:00
Translation updater bot
32416b09c3 Localisation updates from https://translatewiki.net.
Change-Id: I60ff82aec215d4551c90825a6e8c0f4d78cd4caf
2018-09-04 22:19:52 +02:00
Fomafix
931982d728 Fix module loading on MediaWiki 1.31 and earlier
368fe37a1a is broken when used on MediaWiki 1.31 and earlier because
it tries to add

  $modules['ext.uls.displaysettings']['dependencies'][]

although $modules['ext.uls.displaysettings'] does not exist.

The whole module definition must moved from extension.json to
UniversalLanguageSelector.hooks.php.

Change-Id: Ie8f7f084c965e6dee33fef03448004d5d8805f2c
2018-09-04 07:04:49 +00:00