| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the user's date option is not available in the selected user
language, fall back to the site default and then to "dmy", the last
being guaranteed to exist since all languages are merged with
MessagesEn.php.
Add test.
Change-Id: I9ccc6ebe747070fec2b80398a8251924c9a28fbc
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| | |
Thanks to Krinkle's research:
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1113193/comment/f2487490_d85e5600/
Change-Id: If0299825f3f784503d42fb2ae8fd2b1072c6ab62
|
|/
|
|
|
|
|
|
|
|
| |
Five new locales, two of which map to supported languages in core
(ku-kmr -> ku, and tk -> tk), and three of which don't but are added
in for future support and for languages that might be configured in
production systems (ar-ps, bn-bd, and es-mx).
Bug: T389416
Change-Id: Ic69ddf92f922515bf36a2ea1770b2c8ebd2c46b2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the target is an IP or IP range, show an 'Active range blocks'
accordion that lists all range blocks that apply to the target. The idea
is that admins should be informed if an IP or range is already blocked,
even if the target is a wider CIDR range. Each row in the table has a
'View' link to load that range as the target. We do this instead of
providing direct 'Edit' / 'Remove' links because admins may not realize
the range block is for a different target.
In effect, 'Active range blocks' surfaces blocks that effect the target,
but not directly. The 'Active range blocks' accordion is always shown
for IPs and ranges (situations where there could be active range blocks)
but has an empty state like the other tables.
Bug: T389987
Change-Id: I4d5f42984b05cf1b30e2f962b9381779196fcab3
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We did this for the new Vector 2022 search, given now
Vector 2022 is everywhere, these metrics are not being used or worth
logging.
Bug: T379861
Change-Id: I29212897abcac81d62f565fb6e3363dcd2c2f1b0
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Show error message when there's some unknown error message returned from
the API when retrieving a block log.
Bug: T388139
Change-Id: If0ee9fcb3d3567db9d3fa3e60ef6689279df01b5
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
@hideconstructor should be used instead of @ignore to prevent the class
as a whole from being documented.
The module exports the class, thus we can use @exports instead of
@module so that they are treated the same, allowing for easier
navigation of the docs.
Bug: T389161
Follow-Up: Ib6bc8ebd4d01317aaf32225c6006ea2dc7a1b39e
Change-Id: I24e678b68de6abf8e99b5d028c8f15c2bd20d260
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Given the Lookup component a template ref and force a lookup and display
the results when the user types in something before Vue loads.
A TODO is left for making the test assert that the menu is visible.
Related: T390127
Move refs to the top of setup() and document them to be consistent with
the structure of other components as well as the store.
SpecialBlock.php: if the Codex form is submitted, treat as no-submission
since this code path isn't supposed to be possible with a JS-only form.
Bug: T389955
Change-Id: I6b9788370495648f1629ec7c3b768e704d78f157
|
|\ \ \ \
| |_|/ /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: T388007
Change-Id: I1c91a94a37837b230e2ad0f6a0c58ac29c9271e8
|
|\ \ \ \ |
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Add a library providing date/time formatting according to the user's
preferred time zone and date preference.
I tested formatting of an example date with all defined formats in all
languages, and I found that it gives identical output to PHP in about
90% of our ~500 languages.
Resolve some of the outstanding issues by aliasing the problematic date
formats on the client side, so that the user will see the date in
another acceptable format for the same language.
The remaining issues mostly relate to the use of a fallback language to
display weekdays and non-Gregorian month names.
Details:
* Add Language::getJsDateFormats(), which converts existing date formats
to an options array that can be interpreted by the client.
* In Messages*.php, add $numberingSystem, which is the CLDR numbering
system ID. I set it for all languages that had overriden
$digitTransformTable. This is sent to the client in the library's JSON
config and is used as the default numberingSystem option when
formatting dates.
* In Messages*.php, add $jsDateFormats, which overrides the
automatically generated date format options.
Bug: T389161
Change-Id: Ib6bc8ebd4d01317aaf32225c6006ea2dc7a1b39e
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bug: T310158
Bug: T386298
Bug: T386482
Bug: T388049
Bug: T388857
Bug: T389234
Bug: T390589
Bug: T390615
Change-Id: I1325618ae8ccd554f8f0891abe6a51df539ab6da
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is disabled by default but can be added on skins that support
dark mode. This replaces existing code in Minerva and Vector 2022.
Bug: T388197
Change-Id: I4302b629d42aa58073108bc75eaf857d7e55d9cf
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I6c4d7d8d7358d554d5f47096c9ee3cd72f81af5b
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* Avoid using on* for methods which aren't event listeners
* Add missing documentation
* Remove unnecessary 'use strict' directives
Change-Id: I5b386e56c55c390a246595d06a5cb985f4de0ce4
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Also remove unused 'event' argument from save promise
Change-Id: Ie7f1e05462af7ea1eca8aa0220b629c3626a70e4
|
|/ / /
| | |
| | |
| | | |
Change-Id: Ia2fb4a5876e6fe8ab41f0fe7f52d132d21b1ba52
|
| |/
|/|
| |
| |
| | |
Bug: T388197
Change-Id: Ie842c3aab71cf354436e273046cde1af3f83d947
|
|\ \
| | |
| | |
| | | |
about..." doesn't redirect to target page [4H]"
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
about..." doesn't redirect to target page [4H]
Bug: T388953
Change-Id: I3f1a5a75aaee564c717665932f861fe4719d57c3
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Found via disabling phan's alias support for a run (and ignoring wgLang's
hard-coded state of being a \Language, alas).
Change-Id: I4753bcd84d72d6de111fc7ffc5841fa417bf7333
|
|\ \ \
| |_|/
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The way ResourceLoaderModule is currently set up, when packagedFiles
are used to declare files, only a "main" script is initially executed,
and other files are executed with require("./file path"). This is not
the same with using "scripts" to declare your module files. Such
scripts are concatenated together into one large script, and require()
can only load modules in this instant.
When you use require() in such script (outside a package file),
we directly use mw.loader.require().
What this fix does is, if require("./*") is encountered in
mw.loader.require(), it throws a descriptive error early, instead of
later in a more confusing way as `Module "." is not loaded`.
Bug: T386833
Change-Id: I97a572c9fefa41e6b97db1d9fd86706490da5c4f
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Write an equivalent for IPUtils::sanitizeRange() in JavaScript. Add
the tests from IPUtils, and also add a few extras for branches that
were otherwise uncovered.
* Use the new function when fetching block log entries for IP addresses
or ranges. The linked task only mentions range normalization, but IPv6
addresses also need to be correctly normalized, e.g. the target
"cafe::1" needs to search for "User:CAFE:0:0:0:0:0:0:1".
* In Resources.php, specify a base path.
Manually tested the Special:Block log searches with single IPv6
addresses, IPv6 ranges and IPv4 ranges.
Bug: T388097
Co-Authored-by: MusikAnimal <musikanimal@gmail.com>
Change-Id: Icee67dff9d5f36e48dcdbd5a3c17ae56206cb675
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The blockId is both a form field (it gets used in the API request) and
also a behavioural so-to-speak, since the presence of a blockId is what
highlights the row in the 'Active blocks' table. As such, when we want
to clear behaviourial refs, also clear the blockId.
Bug: T389056
Change-Id: I6e76ae847c9bedd47962df6330c70b60cc5481a4
|
|\ \ \
| |/ /
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
The expiry 'Infinite' option might come from a custom message. Check the options
and select the expiry `Infinite` option has been set.
Bug: T388653
Change-Id: Ib22ef41deb121dc151a5ea8ca7d4ea5768041c66
|
|/
|
|
|
|
|
|
| |
To reduce the bundle size and for consistency.
Also use an arrow function in a place where that made sense.
Change-Id: I5a638c232c13028ef75622d9f2fc0a2735fcdfa2
|
|
|
|
| |
Change-Id: I34bb289e941751ae4722c708511326a2a5431bfc
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Log entries now correctly show the timestamp instead of a relavtive
expiry if the date was entered as a timestamp. We aren't able to do the
same for active blocks without a larger refactor, so for now it will
continue to show computed relative expiries even for those entered as
exact timestamps.
Bug: T389275
Change-Id: Iae28dc9cfd6eb7193f7b5cfc7b34fd9537ae2079
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug: T373222
Bug: T386152
Bug: T386482
Bug: T386485
Bug: T386997
Bug: T387217
Bug: T387218
Bug: T387867
Bug: T388709
Bug: T388710
Bug: T388831
Bug: T388835
Bug: T389094
Change-Id: Idd564f5720960a9376f6d83a25d19a42e9c50f19
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
* Add header to form.
* Remove ":" from labels.
* Update submit button label
Bug: T387492
Change-Id: I1d10b8e0e4e82261f18e0ee2f3fc1379704709f1
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add mediawiki.Title as a dependency, used in the same component
Bug: T389258
Change-Id: I2c6d7df0a0708d4131bece6bc514f4e09496101d
|
|\ \ \
| |_|/
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This ensures the target is set properly, and thus auto-loading the form
will also work (as $this->codeFormData['blockTargetExists'] is set).
Use server-provided blockId in SpecialBlock.vue, and move the loading of
blocks from URL param as well as the confirmCloseWindow logic to an
onMounted() hook.
Remove blockId from Jest fixture; this wasn't even being set by the
server but we were pretending it was. Adjust other tests accordingly.
Bug: T389198
Change-Id: Icf5130dc0a873b991513b4034e51ed006659f262
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allows passing a user agent in the constructor, which will be sent
in the Api-User-Agent header (changing the User-Agent header is
not possible under the browser security policy, and it also holds
its own valuable information).
Setting Api-User-Agent was possible already via the `headers` option,
but was uglier and less obvious. Also, this patch adds a default of
"MediaWiki-JS/<version>"
* different from the MediaWiki PHP user agent ("MediaWiki/<version>"),
* clearly related to MediaWiki frontend JavaScript
* avoid generic words like "mw.Api" which are easily mistaken for
any number of "MediaWiki" "API" things.
Usage:
const api = new mw.Api( { userAgent: 'MyGadget/1.0.1' } );
This allows gadgets, user scripts, MediaWiki core, and extension code
to easily identify which client makes an API request.
Identifying the client helps:
* WMF and other sysadmins, to debug and find the source of a problem.
* MediaWiki maintainers, to assess what disruption would be caused
by backwards-incompatible changes in the API response or with
proactively fixing clients before such changes.
* Gadget and extension maintainers, by enabling them to use
Special:ApiFeatureUsage to check whether they rely on deprecated
APIs.
Bug: T373874
Change-Id: I08cbe95675c7e3b6b3a20875f3d061afdc04efd6
|