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
Style modules currently added through addModuleStyles default
to being in the head ("top" position). This is an unhealthy default,
since only critical styles that are needed at pageload should be
in the head. In order to be able to switch the default to "bottom",
existing module positions have to be defined explicitly.
Bug: T97410
Change-Id: I209f93a49ddd0aa143348c0238849a121856dce1
This reverts commit 30d26a4fd2.
Some issues in this patch were identified, see T52599.
Reverting so that MLEB can be released and issues fixed and
tested properly after the release.
Change-Id: I35c1eb2db5ead8ca75dc2724997d789c83c69b6d
Replaces many of the styles with the new standard ones in mw-ui, which is
present in v1.22 of Mediawiki, the current lowest supported version of
ULS.
Might require a follow-up to reduce the amount of redundant CSS present
Bug: T52599
Change-Id: Id186ece6513f154e0388bc4170c21bdabb59038a
Not loading the "json" module either, because of backwards compatibility
and because we are likely already blacklisting browsers which don't
support json natively (mainly IE7 and older and IE8 not in standards mode)
Change-Id: I80b9eb9a7c224b5c843d42c36aca4c5e9f20c207
VE has its own copy of ULS, but uses it only if ULS is not loaded. If
ULS is loaded, original ULS modules are used and mobile target specified
in VE is not sufficient.
See also I6e1024b0f636b3a18d1073f5c38b9feea340b583
Bug: 66594
Change-Id: I8e521f537fcd5089e4a9e8e94bedcc6f49ceabe1
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
Turns out the messages for language selector were not loading
in Special:MainPage. This fixes that as well as cleaning up the
dependencies.
Change-Id: Ice8dcf1b2e878a0fe3cd0e002a9b1cff2f1901dd
Use RL for trigger tooltip messages to avoid using jquery.i18n just
to display the triggers. Reordered dependencies so that messages
are loaded for the setting panels and ime menu.
Change-Id: Ic9518f7b63699542deb02a413e03c28344c99fa4
With the user preference now enabled, we can no longer
assume that ext.uls.init will be loaded on every view.
This also fixes integration with the Translate extension.
Bug: 46306
Change-Id: I05c76e478ddcfb29000471dc79ca35ce77ad59b8
Upstream: https://github.com/wikimedia/jquery.i18n
Changes:
* Support fallback loading when folder is passed as source to load
* Do not overwrite existing messages for a locale while adding messages
second time
* Fix the country code case issue
* Renamed jquery.i18n.messages.js to jquery.i18n.messagestore
* ULS: Updated Resources.php for renaming of jquery.i18n.messages file
Change-Id: I60a6e3224cb7b8ea813a8ccd7e389071b3d1244c
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
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
In the "interlanguage" position ULS is shown after 2 clicks,
so don't load it initially.
In the "personal" position ULS is shown immediately after
the language icon click, so load it, but conditionally.
The new RL module ext.uls.mediawiki is added for setting
jquery.uls defaults in a way that will lazy-load the language names.
Change-Id: Ic33ef034c794a523b5403867196c6098a58eb5b1
Move it to a seperate css file ext.uls.webfonts.css so that the RL
modules are more granular and clear.
Also get the @font-face css for Autonym font get ready on page load
so that the font applied automatically to any future elements on page.
Change-Id: Icb76df5baedaba8ab613d665a1be923779a6b9e7
* 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
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
Removes 8 KiB from *uncompressed* initial payload
Also added missing dependency to jquery.cookie to ext.uls.init
Change-Id: If0e30d3822fa7db317d53a0a58051295da0ec0e6
upstream: http://github.com/wikimedia/jquery.ime
changes:
* Support for contenteditable, like the VisualEditor surfaces. This
support is very minimal now. Because of VE bugs on IME support, many
things are broken. But one-one keyboard mappings should work with less
issues. The UI of jquery.ime is not integrated with VE toolbar
* More input methods
- IPA-X-SAMPA by Amir
- Armenian keymaps by Aleksey Chalabyan
- Kurdish keymaps by Ghybu
- Кыргыз keymap by Amir
- Central Kurdish keyboards by Çalak
* A lot of input method bug fixes multiple contributors
* Minor UX fixes
Introduces Rangy library.
A module named rangy is defined in VisualEditor extension with more features of rangy.
Here we need only the core library. This module is loaded dynamically from
client when rangy is undefined. If VE is present rangy will be defined, the module
defined in VE will be used. ie, This get loaded only when VE is not present and
user trying to type in a contenteditable.
Bug: 49569
Bug: 50849
Bug: 50220
Change-Id: Iadad5a4e5972fbd1359847526d28e9dbbe00a7c4
Separating event logging out of ULS functionality. Event logging
is now loosely coupled with ULS. ULS core modules can emit an event
whenever EventLogging is required. The eventlogger module will act
on the event if configured.
Change-Id: I59dfcfb25c1acb85376b56239f2355ee7c4aff1e
In Iddef0805ab a custom message store was introduced for ULS, but
there were updates in jquery.i18n that allows us to use default
message store again.
(see https://github.com/wikimedia/jquery.i18n/pull/40)
Change-Id: I86cb7a44efa83e5811824cd1104c6be11b1e2925