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
MediaWiki 1.33 is released. The next version MLEB 2019.07 will be
compatible with MediaWiki 1.32 and 1.33.
Change-Id: I9487706125fe84d02cb8d3fec0a10e1f10006e64
This could've been done longer ago (by defining ext.uls.common
in Hooks.php), but didn't notice it before.
The ext.uls.eventlogger was (if configured) loaded on all page
loads. Same as ext.uls.init (but without config condition).
ext.uls.ext is an empty shim around ext.uls.common, which is thus
also loaded on all pages. Merge this into there given has no
reason for being its own module. They are always loaded together.
Change-Id: Icdda6f27470a1d56a37275164c06541514a488a0
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
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
$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
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
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
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
* Do not group search results by region
* Replace ULS trigger icon with monochromatic one
* Custom no-results message support
* Upgrade jquery in the example to 3.2.1
* Use .siblings to locate the suggestions, clear elements for efficiency
* Removing assigned ids to elements that are not guaranteed to be unique
* Use eslint and stylelint, fix all errors
Update the language icon in ext.uls.pt module with new monochromatic one
Also use custom style for monobook skin.
Bug: T182539
Bug: T175769
Change-Id: I7341064cd0de367d933048c4800f951568747d11
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
Following core base font-size of `0.875em` in Vector to align with
other elements on the page.
Bug: T175295
Change-Id: Id9c8652820641d6fa1c6b1dd06247967ba649f25
Replacing all colors with current WikimediaUI palette ones.
Also:
- changing two files over to LESS in order to
- make use of central gradient mixin instead of one with
unnecessary vendor extensions and
- concatenating selectors in one occurrence.
Bug: T174237
Change-Id: I5d302f29b079f6abdba5abf3b58d6ba254e1a4ac
For interlanguage toggle, interlanguage position is no longer assumed to be a
left sidebar, and is determined on the fly in order to appear correctly
regardless of where it is, and not go off the side of the page. This works
across most skins, and regardless of language directionality.
Does not necessarily resolve issues with interlanguage links appearing in the
middle of the page (header/footer), or the callout just plain not fitting for
other reasons (mobile devices).
bug: T161586
Change-Id: Icd55498a945e12c0ff79ba891c094d60ce791115
This should fix the unparsed plural syntax shown in the sidebar
in the Wikipedias (only in production).
Bug: T148117
Change-Id: Idcbecd606e11d23a341421224b3f21fe03bf509e