Commit Graph

117 Commits

Author SHA1 Message Date
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
Niklas Laxström
193f69b017 Refactor ime lazy loading
* Do not load anything unless input field is focused
* Split the setup function to smaller functions
* Introduce $wgULSImeSelectors to allow configuration and avoid
  duplication of selectors in two places.

Change-Id: If5a476e66681dde9f0b72f619d35ddf6255246ac
2013-11-05 16:48:47 +05:30
Santhosh Thottingal
76e82e4a9c ResourceLoader Module for serving json based localization messages
ApiULSLocalization is still present since we have to provide live
language preview feature.

Moved the loading of json file to includes/JsonMessageLoader.php

Also moved all RL modules to includes folder.

Bug: 56509
Change-Id: Ic39dec1c484982fb07edd167e83794c0b5f470ee
2013-11-04 14:59:14 +00:00
Kartik Mistry
3457c697f0 Update version date and copyright year.
Change-Id: I86d529d388bad7124f9974cf565987e715f9bab6
2013-10-28 19:33:37 +05:30
Ori Livneh
03e40f7215 Make base font repository path configurable via $wgULSFontRepositoryBasePath
This patch adds a configuration variable, '$wgULSFontRepositoryBasePath', which
specifies the base path to the font repository. By default, the variable is set
to its existing value, which is $wgExtensionAssetsPath +
'/UniversalLanguageSelector/data/fontrepo/fonts/'. However, adding a discrete
configuration variable makes it possible to configure ULS to use a custom URL
scheme that is more suitable for large static assets that change infrequently.

Change-Id: Idbe57072c4f3258757eb691e54cab5429cadcfda
2013-10-17 00:10:00 -07:00
Ori Livneh
e7539a341e Prefer __DIR__ to $dir
__DIR__ is the more common idiom these days, and there is absolutely no
advantage (in fact, there's a slight performance penalty) to storing it in a
variable. Use alternate syntax for declaring autoload classes to avoid
exceeding line length limits or having to break lines in unsightly ways.

Change-Id: I20211539ccc17937b141331c1875f219a92b1483
2013-10-14 01:22:56 -07:00
jenkins-bot
bb535a2eed Merge "Update formatting" 2013-10-10 20:30:02 +00:00
Siebrand Mazeland
315cf739bc Update formatting
Change-Id: Iaee2ab4f36d3a0dce143c62965ab29de504b31ea
2013-10-09 15:40:39 +02:00
Santhosh Thottingal
efaa3dc317 Disable jquery.ime for VE till IME support is improved
Bug: 55492
Change-Id: I30cffd94413b50bb57a403a9d06dbc0498a02d0a
2013-10-09 19:05:20 +05:30
Santhosh Thottingal
3fbbf05c26 Optionally exclude elements from applying webfonts
* Updates jquery.webfonts from upstream
* Introduces wgULSNoWebfontsSelectors configuration variable. It
  takes an array of jquery selector to which webfonts will not be
  applied if defined.

Change-Id: I0dc263f84620af4077f52e18eeb0f986ff0f13b9
2013-09-19 10:17:54 -07:00
Amir E. Aharoni
a3bca89a42 Implement language-selection-method event
Change-Id: If2d207f8a221c8f2a560b1399ad69a3032b2064b
2013-08-20 05:16:35 +00:00
Amir E. Aharoni
8205e294d7 Allow disabling of IME by a jQuery selector
Add the variable $wgULSNoImeSelectors to allow custom
disabling of IME in specific elements.

Add captcha input field id to the exclusion list.

Bug: 41675
Change-Id: Ib03a20c50a4f473e6a58638b85da16659268eb09
2013-07-05 13:37:31 +00:00
Niklas Laxström
4543d43dda Prepare ULS for EventLogging
This change introduces a new configuration variable, $wgULSEventLogging. When
set to true, ULS will register an EventLogging schema module for
<http://meta.wikimedia.org/wiki/Schema:UniversalLanguageSelector>,
making it possible to log events using `mw.uls.logEvent`. When false, the
schema module is not loaded, and `mw.uls.logEvent` is a no-op.

Change-Id: I7139e67cc2f830a6b4b3c8ff1fc72dfcdec9a699
2013-07-02 12:47:22 +00:00
Siebrand Mazeland
7ad76c6b64 Coding style updates
Fix issues pointed out by PHP Code Sniffer.

Change-Id: I31279cda12101bb0ad66f104c9cd0e11019d46f1
2013-06-17 16:48:41 +02:00
Siebrand Mazeland
48b8f11ca6 Update version
Change-Id: Ica44e38470c5d4356130ec9e398274b624b4045c
2013-06-17 16:45:14 +02:00