Commit Graph

166 Commits

Author SHA1 Message Date
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
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
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
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
Fomafix
368fe37a1a Remove dependencies on deprecated modules 'mediawiki.api.*'
In core, modules 'mediawiki.api.*' got merged into 'mediawiki.api'
and deprecated in I0afdc8ab50bc1354bb5099bf39923c07eab0b665 included
in MediaWiki 1.32.

This change does not increase the version requirement in extension.json
to "MediaWiki": ">= 1.32.0" because it adds the removed dependencies
for earlier versions of MediaWiki in a hook.

Bug: T196802
Bug: T200168
Change-Id: I27dd62fae7a470549dd533f16c145cb023b16181
2018-09-02 20:02:19 +00:00
Fomafix
72fb42cdba Remove support for MediaWiki 1.29 and earlier
extension.json already requires "MediaWiki": ">= 1.30.0".

Change-Id: Ic460e6364967cd7b0367e66f613077c424bd8f19
2018-08-31 21:41:42 +00:00
Zoranzoki21
04da95c3da Fix 'accross' typo
Bug: T201491
Change-Id: I428769d2d95c64413184d92596e23077bd3c01d7
2018-08-19 09:39:17 +00:00
Kunal Mehta
c783f6d64f Use ExtensionRegistry to tell whether EventLogging is installed
Change-Id: I790b7e9cc67c33edcf91dee810222cd2f0e374c6
2018-07-25 18:27:40 -07:00
Kunal Mehta
07cf9bbedf Register EventLogging schemas in extension.json
Change-Id: I60012747daa927264474e7a4867ad0f9124d793c
2018-06-23 00:02:07 +02:00
Kunal Mehta
10a5865f9a Fix MediaWiki.Commenting.LicenseComment.InvalidLicenseTag errors
Change-Id: I2c868006d108b35adaa19d179bc6ebe95e29d0ef
2018-05-23 23:02:54 -07:00
Kunal Mehta
294a9e2106 Remove unused global $wgWBClientSettings
Change-Id: I83ec06f6783be9c98ee511efb4331d05bc0890fe
2018-05-23 22:59:56 -07:00
Umherirrender
b8944d50e1 Remove return from hook handler
Change-Id: I3e6b79206f878cdfe3399009e1d06ec4fe2c3aac
2018-05-06 08:18:44 +00: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
Amire80
d6630a4780 Log the context of the ULS in which no search results were found
Relies on updates to EventLogging schema. Diff:
https://meta.wikimedia.org/w/index.php?title=Schema%3AUniversalLanguageSelector&type=revision&diff=17799034&oldid=7327441

Bug: T179402
Change-Id: I2ff9ce9b40df16ed3c5e6970fb3b691af08cedec
2018-03-08 16:03:33 +02:00
jenkins-bot
ee21e016be Merge "Custom no-results message for compact links search" 2018-02-13 13:11:29 +00:00
Santhosh Thottingal
28c455feaf Custom no-results message for compact links search
Bug: T182539
Change-Id: I0e3bb7104015a5244290058dc0ac5b3c17b1ea20
2018-02-08 10:38:06 +05:30
Niklas Laxström
e9051e2d3f Don't apply CLL to pages with the noexternallanglinks magic word
There is actually a magic word and a parser function. This checks
if all links are excluded (*).

Bug: T186590
Change-Id: Iaf860683f6e3bc9b00d5e8f19b8be7c0f1b20f5b
2018-02-07 20:13:46 +01: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
Umherirrender
7761a9e60b Improve some parameter docs
Change-Id: Icd8fd55cf1a4a83a6f674038e098b9be8257dc0c
2017-10-07 16:54:28 +02:00
Quiddity
1f104a60e4 Use Special:MyLanguage in help link for betafeature info
Bug: T145904
Change-Id: I41eae6b4afc6c9cafcb096776304bea8df7293a5
2017-08-26 20:36:23 +00:00
Niklas Laxström
aebe0ea7c2 Update version used in ULS_VERSION to match extension.json
Change-Id: Icced77930c4355de2db349ef95ad24416928f5b4
2017-08-25 15:11:55 +02:00
Umherirrender
1a4ac5a6d6 build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
Change-Id: Ib7a361cf2973bf0bba0fb8944762216f44c226a8
2017-07-26 23:22:26 +02:00
Kunal Mehta
0e7d8a7a9d build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.Commenting.FunctionComment.WrongStyle
* MediaWiki.FunctionComment.Missing.Public

Change-Id: Ic8acf95cfd8edf88125128fe527e357fa5d0a8ec
2017-06-25 18:39:02 +00:00
Amire80
757d28b114 Show languages from the Babel box on the user page
Bug: T135371
Change-Id: Ieeaf446326be93a779df3e6bd7a8dca899950a6c
2017-05-30 17:25:23 +03:00
James D. Forrester
1d9fec680b extension.json: Remove no-op dependency on deprecated es5-shim module
Preserve dependency for MediaWiki 1.27 and 1.28.

Bug: T162590
Change-Id: Ia77b8914e3b036b6d7d7bf886ba0e47be9aba0ed
2017-05-05 21:16:42 +00:00
Niklas Laxström
404d7a1241 Fix site picks: missing from globals
The isset was hiding this

Change-Id: If0301026e62e7d2b7249af68e336de4ff2ce3f54
2017-02-21 15:41:40 +01:00
Niklas Laxström
7baa3c4a3b Fix broken site picks feature for compact language links
Ref T153900#3011037 and T155995

Change-Id: I429cdf330b6bf70d1710cd5a041c782e6617cb39
2017-02-16 08:29:14 +01:00
Niklas Laxström
af37b31b8a Provide link to compact language links info page
Bug: T157344
Change-Id: Ib0d14ee0bdd639c14805412b1754f0f69f6daa63
2017-02-15 12:16:00 +00:00
Fomafix
1312b905f2 Remove module 'jquery.i18n'
Since MediaWiki 1.26 the module 'jquery.i18n' is in core:
 git blame origin/REL1_26 -- resources/Resources.php

Bug: T153635
Change-Id: Ie4cf86dd5020a75456cfe183b26c114437eb22e0
2017-01-20 16:58:52 +01:00
jenkins-bot
c6adadae95 Merge "Use an empty array instead of the uls-p-lang-dummy list item (PHP)" 2017-01-11 19:47:58 +00:00
Fomafix
a159ff1444 Use an empty array instead of the uls-p-lang-dummy list item (PHP)
This change avoids a flash of a list item bullet while loading on skin
MonoBook.

The JavaScript part of this change is in
Id7f429d9d1217316341102e27389711525f17b2d. The JavaScript part should get
deployed when the HTML caches of this change has expired.

Change-Id: I54a18f5bd85a8261a25e1160dda7a33fbdf3dd7b
2017-01-04 14:20:33 +01:00
Ed Sanders
6fe8a31267 Update beta feature screenshots to use proper layout and colours
Bug: T144428
Change-Id: I755d0d3b3fdcf569d2470a4a9980ae0e2df66a37
2016-10-12 15:26:32 -07:00
Fomafix
fda55e2ab1 Integrate ext.uls.nojs into ext.uls.pt
The CSS hiding for non-JavaScript clients is only necessary when the buttons
get added.

Change-Id: I6e43e39d29c093a19f3e8355d657f162f9a62736
2016-09-20 12:22:51 +00:00
Fomafix
80a943d41e Add pure CSS modules via addModuleStyles() instead of addModules()
'ext.uls.pt' and 'ext.uls.interlanguage' are pure CSS modules.
This change avoids a FOUC of the ULS icons.

Change-Id: I912d0c98d1857461d21b4db0ef7376783cc871d2
2016-09-13 18:51:53 +02:00
Niklas Laxström
4cd1def0f3 Switch default ULS geoip provider
Current provider is going away. Switching to another free provider.
Implemented caching with a cookie for speed and to avoid generating
unnecessary load on the service.

Bug: T143542
Change-Id: I191d69a6fb8abe9556f475dfef1368dc9f96b846
2016-08-24 15:55:00 +00:00
Niklas Laxström
aaa1219d48 Do not load schema.UniversalLanguageSelector explicitly
Because ext.uls.eventlogger has it as a dependency.
Found while checking T70955

Change-Id: I68a69d12bbf58f8d347fc05e19d0edbf817fb49f
2016-08-18 14:46:48 +02:00
Niklas Laxström
4dc4b7b81b Update compact language links beta feature info and talk links
Bug: T142559
Change-Id: Ia4bcc62911beb52bf7b4d0788a97c35bbd776b0d
2016-08-10 14:40:01 +02:00
Niklas Laxström
4f4051a40d CompactLinks: support sortPrepend from WikiBaseClient
Bug: T138973
Change-Id: I64b7aa37d8a6b3cac92d492a33fe6f8cb04ce0e6
2016-07-26 13:36:26 +00:00
KartikMistry
5ee9a7529b Revert "Fix ULSCompactLinksEnableAnon configuration"
This reverts commit e08d9bcc57.

Change-Id: I6830300561264a8344029c2bf7ea3d44b9da199b
2016-06-23 13:29:54 +00:00
Kartik Mistry
e08d9bcc57 Fix ULSCompactLinksEnableAnon configuration
Compact Language Links was enabled by default despite of
ULSCompactLinksEnableAnon was set false.

Bug: T138321
Change-Id: I776c31f94c1314091a3d9b635a33962775dd9b52
2016-06-22 10:50:30 +05:30
Niklas Laxström
d21e271c92 Do not output accept language list if it might get cached
Bug: T137522
Change-Id: Ib603f836f59f7078ac5dbb7bbbb3b84ca358cb43
2016-06-10 10:04:02 +02:00
Santhosh Thottingal
02da4454e2 Add config to enable compact language links for anonymous users
By default, the value is false.

Change-Id: I16dd24182c6e2b8e5e63ebfc0ea305a3511a9e1d
2016-05-16 11:20:56 +00:00
Santhosh Thottingal
35e7d72e35 Add config to enable compact links for new accounts
By default the value is false.

Change-Id: I30e9c3d929158d9ebe90edfcb10c90712ad294f9
2016-05-16 15:07:20 +05:30
Santhosh Thottingal
f1995bc603 Introduce a preference to disable compact language links
Bug: T133030
Change-Id: If9ec0b8c75c59c62991f0d4bfa99f6d4c9324c30
2016-05-13 14:51:21 +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
Santhosh Thottingal
aa4e4b417d Introduce a config variable to enable Compact language links by default
Configuration: ULSCompactLanguageLinksBetaFeature
Default value: True

Bug: T134145
Change-Id: I8d4e97653daf7fcee9175c6d7cefb5c5abb22305
2016-05-09 08:40:53 +00:00
Santhosh Thottingal
695ea37918 Remove wgULSCompactLinks configuration variable
This was used to expose Compact language links as beta feature.
Now a days, we want it as beta feature unconditionally and this
configuration does not make sense. So removing.

Bug: T134145
Change-Id: I40d5c07064b5f407ec37837b0835e0698f3a5256
2016-05-02 04:11:13 +00:00