In the Japanese locale, add the following fonts to the Universal Language Selector's Web Fonts feature.
Font Name: Noto Serif Hentaigana
Version: v1.000
Download Site URL: https://github.com/notofonts/hentaigana
Bug: T347520
Change-Id: I70d9bab18c138ea786df1aaf2394450f1f7044ea
There is potentially a lot of time between when the attribute is
checked and when it is finally set. At least the two RessourceLoader
modules need to load. This can take a while, even on fast internet
connections. Just double clicking with the mouse can trigger the code
twice without the attribute being set.
The proposed solution is not the only one, but I believe moving this
single line is the most trivial one.
Bug: T358637
Change-Id: Ic9b99859841439febb83e91f70930e8676a4968a
This code was introduced as a hotfix for avoiding loading @wikimedia/codex
module in vector 2022 skin, in I44835e672bce97a7d3a98d9d75c4805ee2cc448d.
Now that the issue has been properly handled after this patch
(I43551be73da2126fd84ffaa0d37faec58bc47135) has been merged,
we can remove this code.
Bug: T353850
Change-Id: I458a0a6835caedb25bfaa1c58800fb9ce849fb1b
The existing strpos code is not working and the code is loading on
Vector 2022, it also appears to be required on Vector 2022 as without
it the language button does not appear to work (these should be
decoupled in a later patch)
The easiest possible solution here, is to move the check to the
client side and not create the trigger button in Vector 2022. e.g. do
the equivalent check for the node existence in the client instead
of the server side.
Bug: T353850
Change-Id: I44835e672bce97a7d3a98d9d75c4805ee2cc448d
* Replace all instances of mw-ui markup with Codex markup
* Use codex-search-styles
* Where codex-search-styles is not installed (e.g. 1.39)
register an alias which points to @wikimedia/codex as that is
available.
Bug: T340255
Bug: T340257
Change-Id: I4f3ddfb68ea6c033ee7a49729187f4ddbc8abe5c
This reverts commit d29050d080.
Reason for revert: I had mistakenly assumed the @wikimedia/codex
module was loaded on clicking the language button. It appears to
be added on page load.
Given T248718 it's still unclear what our policy on loading
@wikimedia/codex on page load is and given several people are out
I think it would be better to attempt this again next week, possibly
delaying further if needed.
Bug: T353071
Bug: T248718
Change-Id: I09334a1faec06a7400e61013ddda374156bf5d72
* Replace all instances of mw-ui markup with Codex markup
* Use @wikimedia/codex as it is available in 1.39
and codex-search-styles is not.
Bug: T340255
Change-Id: Id85cf3b4af782c0d93bfa3bed5f3e6cbed856f1b
This is happening due to operator precedence. Taking a simpler
example:
return i || typeof i === 'function' ? i() : (i + 3); where i is 1
Explanation from ChatGPT:
* First, the typeof operator is evaluated for i. Since i is 1, typeof i
returns the string 'number'. The result of this operation is `'number'.
* Then, the === operator is applied to 'number' and 'function'. The
result is false because these two strings are not equal.
* Now, we have the logical OR (||) operator. The i (which is 1) is
compared to the result of the typeof and === operations combined, which
is false. Since 1 is considered truthy, the || operation results in 1.
* After the || operation, we have the conditional (ternary) operator ? :.
In this case, the condition to the left of ? is 1, which is truthy, so
the expression after ? is evaluated.
* i() is the expression after ?. Since i is not a function, and the
condition to the left is truthy, it attempts to call i() but throws
a "TypeError: i is not a function" error.
Fiddle that demonstrates the issue: https://jsfiddle.net/t2v1w6ae/2/
Bug: T347847
Change-Id: If5e8405141dfafd53c4495c91265545ec01acab3
Add a new method isNamed in ext.uls.common to use the isNamed
method if available else use the isAnon method as usual.
mw.user.isNamed was added in MW 1.40
Bug: T337780
Change-Id: I747c042a95e8edc793a2265a15ed6ba8ae9f1997
The stylesheet is needed on legacy Vector but not modern
Vector 2022 meaning Vector 2022 loads two sets of styles
for buttons.
This is a short term fix until UniversalLanguageSelector can
use Codex.
Bug: T340255
Change-Id: Ie34949e31e93dcfcabc07fa418dec06022159ca7
The stylesheet is needed on legacy Vector but not modern
Vector 2022 meaning Vector 2022 loads two sets of styles
for buttons.
This is a short term fix until UniversalLanguageSelector can
use Codex.
Bug: T340255
Change-Id: Ib4e228908d2813898654886bc1ee76e90dc52f22
The .html() can replaced by .text() which avoids a possible JavaScript
injection by a malicious message.
Change-Id: Iffdf13299db6fb4ccd8a35b9df4c2f235646ea9d
Currently, inside the page language selector of multilingual wikis
(like Commons), the user can access the language settings by clicking
the display and input setting buttons that are provided at the bottom
of the language selector. However, instead of these buttons, the quick
actions trigger should be used instead for a consistent user experience.
The trigger will only provide access to the language settings, and other
quick action items won't have any effect in this case.
Bug: T314021
Change-Id: Iaaf61c85518b4d3d44d4a92dbf5dc7fdb96282fa
NOTE: This patch is identical to patch with change-id:
Ifdf2a529b30e5a2df8867b606a525c9f7b3bdb6c
The above patch has been merged but reverted because of the usage
of '$skin->getTemplateDate()' method, which should be avoided. The
current patch replaces the usage of this method, with the usage of
the output page title ($out->getTitle()). All the rest of the code
has been kept the same.
Bug: T316559
Change-Id: Ibef9f6fd46d9055c3e0865905fb8aa8d031c1940
This reverts commit 5d576d05b4.
Reason for revert: Using Skin::getTemplateData method outside the
skin rendering layer is dangerous and likely a performance issue as
it means generating the rendering data twice and makes various hooks
execute multiple times.
It has caused T326538 and may be causing other issues.
Bug: T326538
Change-Id: Ie5d079deae414eb199d2a40b98d04b57439eaac4
During the implementation of the “addEmptyState” method, a part of code
was copied from the “addActionsMenuTrigger” method. This part is the
rendering of the action menu items (Translate button, Open Language
Settings button, etc) that is common for both the empty state and the
actions menu. During this copy, two unused lines were also copied. These
lines basically create the trigger for the actions menu (the “ellipsis”
or “cog” icon button at the bottom right corner of non-empty ULS), which
is not rendered for the ULS empty state.
This patch removes these unused lines.
Change-Id: I4776c2038cb6e1c74401c4caa6705e98181c6dca
OOUI widgets are required for the actions menu dialog, but no need
to have them loaded unconditionally.
Bug: T309793
Change-Id: Icc09b88aa70af1316bd67a56b13a411ebc8f7f8a
Currently, actions menu button only support an event handler to be
called upon button click. However, when the desired result of a
button click is just a redirection, "href" attributes are preferable,
due to their accessibility support.
To better handle such cases, this patch also adds support for "href"
attributes inside action item buttons. When "href" property exists
for an actions menu item, it is used and the event handler is
ignored.
Bug: T289840
Change-Id: I776680c19564f032acd550206c7d1306407420e0
"ext.uls.actions.menu.items.registry.js" should be required at the
top of the "ext.uls.interface.js" file. The latter is the main file
of the "ext.uls.interface" module, and it's the only one that is
executed when the module is added as an external dependency. Since,
the "mw.uls.ActionsMenuItemsRegistry" object is needed outside ULS
extension (inside ContentTranslation), the corresponding file should
be required at the top of the main file so that it's available.
Bug: T289840
Change-Id: I70ced03c09b7907c6dbf2aa35a29d5fd14b790e6
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