Commit Graph

131 Commits

Author SHA1 Message Date
Niklas Laxström
d718bd7e6f Require extension registration (and thus MediaWiki 1.25)
Resources.php was already out of sync and broken due to some recent commits.

Change-Id: I7a6b66b9fb1f1f61d15c40bc6fd175378e2dd6c5
2016-01-27 10:51:03 +01:00
David Chan
c68cc74f39 Remove disablement of jQuery.IME on VisualEditor surfaces
The compositionstart trigger in ContentEditableEntry#replaceTextAtSelection
causes ve.ce.Surface#handleInsertion to run, and this appears to be all the
VisualEditor integration we need. But if we later decide we need custom
TextEntry class, see the earlier revision at
https://gerrit.wikimedia.org/r/#/c/264577/3 .

Change-Id: Iad6a6eccccdf2ec9822cf7df0f0ace7a95b6bea8
2016-01-24 08:43:04 +00:00
Kartik Mistry
058d3f5cfb Update version before MLEB release
Change-Id: Ie18a045430fa5d689156034143b7b9f8f2ddd1b1
2015-10-27 10:34:08 +05:30
Paladox
125af37b05 Remove !defined( 'MEDIAWIKI' )
This may be causing a problem for the translate extension using
composer.json to run php code sniffer.

And not needed since we use extension.json if we use mediawiki 1.25+.

I traced back to the extension since translate extension in composer
requires this extension and seems to have that message.

Change-Id: I6c119c8f4744623e8756ce8da1869dfd66a3c026
2015-10-01 16:53:59 +01:00
paladox
7e0fe37a06 Add php code sniffing
Shorten a commented out code to match the style.

Change-Id: I1cbe3513e9c7eaf5a852141b7775a4c78104eae5
2015-09-26 22:09:50 +02:00
Niklas Laxström
4776e62a30 Breaking change: No longer autoload with composer
Use wfLoadExtension or require_once instead

Change-Id: I78fe1f19a157f09b034499e3fb5417e7793c1d13
2015-08-28 18:22:04 +02:00
Kartik Mistry
7c56622e2f Update version for MLEB 2015.08
Change-Id: Id5cd36a6f619a70714c5df98ae31c9276b5ea4e9
2015-08-28 10:22:21 +05:30
James D. Forrester
9afbea2914 Use jQuery.i18n from MediaWiki core if available.
This allows other extensions to use this too, without needing a hack to detect
ULS's existence and work around it by not loading their copies of j/i18n code.

Preserves backwards-compatibility for archaïc versions of MediaWiki.

Bug: T95666
Change-Id: I25b33437ceddb60570322b9aa51844acc42a3e32
2015-07-23 15:33:42 -07:00
Santhosh Thottingal
c3322ba830 Migrate to JSON configuration based extension registration
Retaining the UniversalLanguageSelector.php and Resources.php
to avoid breaking support for old MW versions. At some point,
we can validate how many old MW versions we need to support.

Bug: T87987
Change-Id: I006e968b70298b54013177aa792a4dfdf5b6aae2
2015-07-06 16:42:51 +00:00
Niklas Laxström
81fdbf0af8 Remove i18n shim
Change-Id: Iab92a7f170d1bdbb0caf4047c9f0b38023526820
2015-07-06 12:37:45 +00:00
Andrew Green
c00645a0a0 Update ResourceLoaderULSJsonMessageModule::getDependencies method signature
This change is for compatibility with Iee61e5b527 in MediaWiki.

This patch updates version info due to said requirement.

Change-Id: Ic63e617f51702c27104e123d4bed91983a726b7f
2015-06-09 01:23:30 +00:00
Kartik Mistry
c9f8d7715a Update version before MLEB release
Change-Id: Icbd6e281eebd12ed46d8d4405e0bd30509626e82
2015-04-29 12:00:03 +00:00
Kartik Mistry
e9aa339d8b Update version before MLEB release
Change-Id: I5e8908336edfa0e44ce8d7e520173c51d9a73314
2015-03-30 18:06:03 +05:30
Kartik Mistry
ea6dda8988 Update version before MLEB release
Change-Id: If31e121d903f599a163c76df3ec77f1b40f94f2f
2015-02-27 14:30:01 +05:30
Kartik Mistry
a10763be7f Update version before MLEB release
Change-Id: Ic9b94c0f11a44450e562c2456cd668c8e3ab65a6
2015-01-29 23:30:20 +05:30
Kartik Mistry
24449519fd Update version before MLEB release
Change-Id: Ide75319f6caaad5e48cafbb24daff457b150a573
2014-12-29 14:17:49 +05:30
Kartik Mistry
08e37627a8 Update version before MLEB release
Change-Id: I38c52b97ceab88008869cb4b0e302f97176fbdd2
2014-11-28 21:34:54 +05:30
Roan Kattouw
81ecac9a5d Blacklist all VisualEditor contentEditables, not just the main one
With the introduction of table editing support, ULS is now activating
on table cells, which have contentEditable=true, but do not have
the ve-ce-documentNode class. So instead, expand the blacklist to
include all descendants of .ve-ce-surface.

Bug: 72824
Change-Id: I974d7ab2726bbe15606f43d7713627eed623435e
2014-11-22 03:08:40 +00:00
Kartik Mistry
b4f9a1aa57 Update ULS version
Change-Id: I6761d1162fde1857f2eb1975cb94754cb21c36bc
2014-10-31 18:54:49 +05:30
Kunal Mehta
59e0efab56 Use EventLoggingRegisterSchemas hook
Change-Id: Id4772b7663e5f192962c7943458bd5d0518b958a
2014-10-11 11:31:32 -07:00
Kartik Mistry
d98df551f3 Update version before MLEB release
Change-Id: Ic0745862575993a6328875487c13c7529e597188
2014-09-29 17:07:59 +05:30
Kunal Mehta
b8079bb376 Remove extension function, move code into hooks
So the code only runs on requests which actually need it.

Change-Id: I057f6e93b60037da2b01b1775f841726d14017ba
2014-09-24 18:13:47 -07:00
Kartik Mistry
95a5c3c939 Update version before MLEB release
Change-Id: If1d1b0f3a2c1f839b575b998772a794814f2ccdb
2014-08-28 17:08:42 +05:30
Kartik Mistry
bc07bbcbd5 Update version for MLEB 2014.07 release
Change-Id: Iac994b14cbd98fe4f132092b3d67cff969beb148
2014-07-28 15:32:24 +00:00
Amir E. Aharoni
6de6bdf8f2 Remove tofu detection logging
Change-Id: I2b808bae2ee19062c16d8aaff2bdf0b2986e8ad0
2014-06-26 16:02:49 +03:00
Kartik Mistry
28dcc1e284 Update version before MLEB release
Change-Id: I7b6154f86de4c28505d2382154b4e6cf064e3db1
2014-06-26 10:25:18 +05:30
Kartik Mistry
1a2f38c656 Update version for MLEB release.
Change-Id: I94dc85e138bbacb25609f7deaaf9c65572576edf
2014-05-31 10:36:52 +05:30
Kartik Mistry
0c09f63426 Bump version before MLEB release
Change-Id: I41ded8063c92fe9b50dc695510fa8da8df0a55d7
2014-04-28 11:16:53 +05:30
jenkins-bot
53a4d8b087 Merge "Allow always logging tofu detection" 2014-04-14 03:46:01 +00:00
Amir E. Aharoni
10a25c1cc9 Allow always logging tofu detection
This commit allows to log tofu detection always,
even if the rest of the webfonts library is not loaded.

By default this is disabled.

To enable it, set the variable $wgULSTofuLoggingChance
to a number between 0 and 100, indicating the chance of it
getting logged. The idea of the lottery is that even a partial
sample can be useful.

Change-Id: Ia08fe0de348b7eebfa95498a6be58ae41608ba3b
2014-04-14 09:14:14 +05:30
Siebrand Mazeland
d219528467 Add loading of messages using $wgMessagesDirs
Change-Id: Ib7beb523d5765cba0743eb46fc4e5bd67860130a
2014-04-03 10:09:00 +00:00
Kartik Mistry
0b193144ff Update version date
Change-Id: I32a59dc7ac22f8d639364d3c2b229e357d09c88d
2014-03-31 10:54:43 +05:30
Niharika Kohli
7f405134c7 Put new compact language links Beta Feature behind a feature flag
Add new $wgULSCompactLinks feature flag, defaulting to false (as is standard
for Beta Features). Only allow enabling of the feature if ULS position is
'interlanguage'.

Change-Id: Ia268c3a49b5aa14b6a00e33c7f01a61eba48e776
2014-03-06 15:34:59 -08:00
Niharika Kohli
5ca0d5d400 Compacting the interlanguage links with the ULS
Displays a shorter version of the language list with the languages that are more relevant to you.
More info at https://www.mediawiki.org/wiki/Universal_Language_Selector/Design/Interlanguage_links

Due to a problem with duplicate patchsets we had to create a new one. 
The history and info on code and security revisions is available at
https://gerrit.wikimedia.org/r/#/c/104793/

Change-Id: I109bfb10f6181b6408aab170db5e8ca32493d657
2014-03-04 09:41:47 +00:00
Kartik Mistry
2c877d24fd Update version.
Change-Id: Id774269622a374ac2200df61f7e1791399094c94
2014-02-28 18:31:17 +05:30
Amir E. Aharoni
261542d738 Log tofu detection event
This only works if webfonts enabled (the checkbox is checked).

Change-Id: Ibbedc6a34dacb983f156d8a33afa5ab625e32f5f
2014-02-26 00:19:08 +02:00
Kartik Mistry
2a403e407a Update jquery.ime from upstream
Upstream: https://github.com/wikimedia/jquery.ime
Changes:
* Optimize all SVGs.
* Removed unused images/ime-inactive.* files.
* Renamed: rules/README -> rules/README.md

Also, updated version in UniversalLanguageSelector.php

Change-Id: Ifd848da55e8ac68ef63fef5d435ecc23fc20e000
2014-02-20 17:20:34 +05:30
Federico Leva
81f0e29d53 It's 2014 already
Change-Id: Ic6564ccdd897ee2f9449eac62d086de607943cdf
2014-02-11 09:27:49 +01:00
Kartik Mistry
1de86b4ba7 Fixed year in version
Change-Id: I06ad3251b91b00dc93a1fdf2a1d97ff7b9cc18f6
2014-02-10 18:54:02 +05:30
Kartik Mistry
b3a30c3e28 Update version and copyright year
Change-Id: I8ee6d6f53d24eceabf36f17c7e85e34f6034de0d
2014-02-10 18:50:03 +05:30
Santhosh Thottingal
27771fdeaf Restore enableWebfonts pref and remove uls-enable
This patch restores the enableWebfonts preference, stored inside
the uls-preferences blob. It existed as 'enable-webfonts' in
the past and was removed in
If735a733717596fae03042c5e277bd538bd8501f

Each wiki can be configured to load the fonts by default
using the new global variable $wgULSWebfontsEnabled.
Its default value is true (to load fonts).

This also removes the preference 'uls-enable', recently added in
I71b70d8ee7c3cad7f49b32e5dc494ef4fc1bdb2f

The initialization of ext.uls.webfonts.js is changed as well,
so that minimal webfonts JS library code is loaded,
and the rest is loaded only if a user requests it.

Bug: 60304
Change-Id: I49e812eae32266f165591c75fd67b86ca06b13f0
2014-02-10 17:40:30 +05:30
Amir E. Aharoni
5796a742ca Clarify the comment according to the variable name
Change-Id: Ie196339c26737f86d31a2a258123049901dcf7c6
2014-01-22 22:27:10 +02:00
Kunal Mehta
ad9caf32be Add user preference to enable ULS
Adds an option, 'enable-uls' for users to enable ULS. By default
it is enabled. Wikis can use $wgHiddenPrefs to prevent users from
disabling ULS.

Bug: 46306
Change-Id: I71b70d8ee7c3cad7f49b32e5dc494ef4fc1bdb2f
2014-01-21 02:46:01 -08:00
Santhosh Thottingal
1113786330 Detect tofu before applying any default fonts
To detect whether the client can render a given string,
use a tofu detection algorithm.

If the user has an explicit font preference, do not override it.

If the user has no preference and there is a default font for a
language, see if that language can be rendered at the user's browser
using tofu detection.

If tofu is detected, apply the font.

If the element has 'autonym' class, apply Autonym font only when
that language has tofu.

Change-Id: Ib9ee9497e6bcfa7eb86f7d264e0980d8880d6b70
2014-01-20 22:20:58 +05:30
Niklas Laxström
f3f61fdbc9 Prepare for composer
Bug: 49121
Change-Id: I7b391cc856ca4526951db409173deb0f1b955c4b
2014-01-05 12:40:00 +00:00
Kartik Mistry
34eee436bb Update version date.
Change-Id: I9d189c8e0b37fee21230ea94ca3f9443e4d6958f
2013-12-31 14:23:26 +05:30
Santhosh Thottingal
e231ba72ae Update the $wgULSNoWebfontsSelectors defaults
$wgULSNoWebfontsSelectors had default value as '#p-lang li > a'
-the interlanguage links. It does not make sense after the class
'autonym' was added to such links. That 'autonym' css class has
fontfamily definition as Autonym, sans-serif

ie, Autonym font is applied to the interlanguage links.

So, now it make sense to have default value as .autonym to
exclude from parsing.

This also fixes the problems like Bug 58374 where in random cases
the default font for the language get applied even if it has 'autonym' class.

This issue was because the js get executed before the css for .autonym class is
ready and applied. The jquery.webfonts parser will miss to detect the explicit
fontfamily 'Autonym, sans-serif' and the default font is applied.

Bug: 58374
Change-Id: I7478a58583d3b029ae8e2d63e118917499c29c30
2013-12-12 16:17:30 +05:30
Amir E. Aharoni
fd885d9881 Initial support for webfonts in MobileFrontend
Written in pair-programming with Ryan Kaldari.

This adds a version of webfonts initialization that is stripped
of any smart features. It only loads the basic jquery.webfonts
library and the fonts repository in a way that is usable
with the MobileFronted extension.

It is completely disabled by default.

It can be enabled by setting
$wgULSMobileWebfontsEnabled = true;
and even then it will only be enabled for users
who opted in for the mobile beta mode.

Change-Id: I488e411232a1192bbf46ae5675c701366bda9a3e
2013-11-30 12:28:46 +02:00
Kartik Mistry
b511fca15e Update version date.
Change-Id: I8533c30bec825a2ef6ebde4c33bb9d5fb09ffd59
2013-11-27 10:40:58 +05:30
Santhosh Thottingal
328eb017c8 Json message loader clean up
* Rename JsonMessageLoader to ULSJsonMessageLoader
* Correct the return type of mw.uls.loadLocalization

Follow up: Ic39dec1c484982fb07edd167e83794c0b5f470ee

Change-Id: I13c64a5e89ac75be8a95d951658018a78534f466
2013-11-19 10:55:52 +00:00