This patch replaces the display and input settings menu bar at the
bottom of the content language selector, with a floating icon that
opens a menu containing all the available language actions. In case
that only the language settings action is available, the language
settings menu is being opened instead.
In order to provide extensibility and support the addition of new
action items from other extensions, a registry class that inherits
from OO.Registry class is created. This class is used to create a
singleton registry object that holds all action items that should
be rendered inside the menu. Other modules/extensions can use this
registry to add new actions items to the menu, by passing the item
as argument, in the following form:
{ name: "", icon: "", text: "", handler: function() {} }
Bug: T289840
Change-Id: Iee017a9e3e6a654145e9fdd2b7df35baa348697d
setlang will now display a dialog to confirm with the user that
they would like to change their interface language. The preferred
language will only be updated if the user confirms.
The dialog will be displayed if the setlang parameter is present in
the query string and,
* A user is logged in, and their preferred language is not the same
as the one passed via setlang.
* For an anonymous user if the wgULSAnonCanChangeLanguage is true,
and the current interface language is not the same as the one
passed via setlang.
Bug: T63115
Change-Id: I882297d99a594fd82fd0aec3b4664e8bfd1eac3a
Notable changes:
* First query global preferences to detect if global language setting
is in use. If there is no global language setting, or if GlobalPreferences
extension is not installed, it will fall back to changing the language
as usual. If global language setting is found, it will add an override
instead.
* If a local override is added, the undo tooltip is different and links to
the global preferences page. The task design shows mw.notify style popup
located on a bottom right corner (LTR). I deviate from the design and
re-use the old undo tooltip with a different message instead, for
consistency. The message is chosen depending on whether local storage
value `uls-gp` is set to '1' (set in mw.uls.changeLanguage).
* I removed one use of deprecated mediawiki.api.options module. One other
use still remains.
* I changed tooltip text generation from html acrobatics to use
mw.message.parseDom. Because of that I also had to move the click handler
to avoid buildup of click handlers.
* In message documentation fixed acronym -> autonym.
Bug: T198206
Change-Id: Ie2ed792e222be919522bd1cdea98042515a0619d
It's not a lot of messages, but this is a very common and basic extension,
and it's often one of the first to be translated, so it's good to make its
translation easier.
To be committed together with the corresponding
translatewiki configuration change:
I33ca817b457abc5504917745c2730ec223e263e0
Change-Id: I13ea351553319583051778cfb6c55f843b5f86e5
MediaWiki core change I04b1a384 added support for i18n of API module
help. This takes advantage of that while still maintaining backwards
compatibility with earlier versions of MediaWiki.
Once support for MediaWiki before 1.25 is dropped, the methods marked
deprecated in this patch may be removed.
Change-Id: I67395aff48185f3e09da31b51a08aa2541fe6a17
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