Change the edit recovery prompt to ask before recovering the
saved data, instead of recovering and then asking whether to
revert the recovery.
Also change the button's to the shorter text, and so remove the
need to have them on separate lines.
Bug: T364664
Change-Id: I05e53f302a80a9ad8223d4d2cacf2ca5fca6cc65
This adds a new message box for successful messages, and reworks the old
one to handle all error messages.
Error messages are inline for now (like the old Special:Block). Note
these are only the server-side messages, that chiefly serve as a
fallback for clientside error states which will be tackled in a future
patch.
A loading state is added for the block API request by simply disabling
the form fields. Once completed, the user is scrolled to the top to view
the appropriate messaging. This uses "smooth" scrolling so that it's a
bit less "in your face", but this is subject to design review. For now,
it's just important the user is brought to the approriate error message.
Other changes:
* Add a bit of left margin to the inline error message, consistent with
the no-JS version of this page. Without this, things "jump" a bit as
the Vue applicaton loads. More refinements for this to come later.
* Fix styles for .mw-block-partial-options to be exactly the same as
Codex labels.
* Remove unnecessary IIFE from init.js, and add a class to the form
so we can style it closer to the designs.
Bug: T369471
Bug: T358934
Change-Id: I47344e9581439289642c9424a5f229929805cdbe
The `copyright` has been marked as deprecated with
I5fd5607f8d43b6e934c8d4d35097cec430c56043 and was then removed by the
l10n bot in I6d82a827e20d18ff4d78d7351aa9e9c08129e400. Since the english
message has been kept, banana:core fails with:
>> 1 message lacks documentation in qqq.json:
>> * copyright
Restore the qqq message, I am assuming the deprecated `copyright`
message has been kept on english language for a good reason.
Bug: T45646
Change-Id: I116af83d7216ea492280183217d9528cfe7f14d1
This reflects the actual situation on translatewiki
and in the i18n json files:
* mnc is the main code, and it is in the Latin script
* mnc-mong is in the Mongolian script
* mnc-latn is a compatibility redirect to mnc
In the future, we may swap between mnc and mnc-latn,
but for now, let's at least make sure that the two
variants are supported in core properly.
This also adds namespace translations
given by User:MiiCii at
https://translatewiki.net/w/i.php?title=User_talk:MiiCii&oldid=12654825
(Note the different "Category" translation towards
the end.)
Bug: T284043
Change-Id: I3998d84aa51f3fced5642f611ba235687f4fe003
The mdy and ymd formats are removed because they are
not valid date formats in Croatian.
Bug: T373592
Change-Id: I579dd71c719aa14860b5cd7546e084c6ec6a21a3
Replaces 'copyright' with 'copyright-footer' and 'history_copyright'
with 'copyright-footer-history' (the original still takes precedence
if set). Adds SkinCopyrightFooterMessage hook which works the same
way as SkinCopyrightFooter for the new messages. Allows disabling
the old messages by setting $wgAllowRawHtmlCopyrightMessages = false.
Co-Authored-By: Gergő Tisza <tgr.huwiki@gmail.com>
Bug: T45646
Change-Id: I5fd5607f8d43b6e934c8d4d35097cec430c56043
Why:
* When code throws a UserNotLoggedIn error for a temporary account,
this takes them to Special:UserLogin and asks them to log in to
an account
* Users using temporary accounts are less likely to have a named
account, so should instead be sent to Special:CreateAccount
(as described in T358586)
* When doing this, the warning message should be customised to
talk about the user needing to create an account (and not
log in)
What:
* Update UserNotLoggedIn to redirect to Special:CreateAccount
when the user is logged in to a temporary account
** The code which constructs the exception object can override
this and force the redirect to always be to Special:UserLogin.
* When the redirect is to Special:CreateAccount, allow customising
the message shown by adding a '-for-temp-user' suffix to the
message key in UserNotLoggedIn.
** This suffix is only added if the resulting message exists,
so that code can choose whether they need a message that is
different to the one on Special:UserLogin.
* Update SpecialPage::requiredNamedUser to allow special pages to
force the redirect to always be to Special:UserLogin
** This is made use of in Special:ChangeEmail and
Special:ConfirmEmail, as these special pages only make sense
for use with an existing account.
* Update and add message keys to allow a different message for
Special:CreateAccount.
* Update and add tests for these changes.
Bug: T358586
Change-Id: Ie0dd06f51b1e2b85eef6be377f673a02732ce604
Why:
* The 'resetpass-no-info' message key was added in
bceb3c7d1a but was no longer used
after 854a462dc0.
* Removing this message will reduce the need for unnecessary
translations.
** This will also help reduce the extra message keys needed as a
result of T358586
What:
* Remove the 'resetpass-no-info' message as unused.
Bug: T358586
Change-Id: Ia3148c213732a03d04c13cae1203feb6d3ce30de
This changes the wording from "displayed" to "displaying" for the
whatlinkshere-count message.
Bug: T374759
Change-Id: I768167e1d5b8af6a297076bdc133121a05302502
Why:
* The 'exception-nologin-text-manual' message key was added in
68f3a22654 but then made unused in
d0439af89f
* The message key is unused and has been since 2014.
* Removing this message key will reduce unnecessary translation.
What:
* Remove the 'exception-nologin-text-manual' message key as unused.
Bug: T358586
Change-Id: Id4c868dfabbc133cb5aa9fb82956ccd70cf9f554
This update the fallback language from Minnan (nan) to Minnan (Traditional Han script) (nan-hant).
Change-Id: I40182e667c72778ad8e00a1a541bbc941938b11f
SpecialBlock calls HTMLForm::setSubmitDestructive(). This patch applies
that to the new Vue version of Special:Block.
Additionally, since we're not going to enable multiblocks in the initial
launch, the submit button message is changed to as it was before. "Save
block" is questionable even for multiblocks. It will likely be a while
before we iron out the UI for multiblocks, so we might as well remove
now-unused 'block-save' message.
The "[username] is already blocked" message is now also surfaced, i.e.
browsing to [[Special:Block/someblockuser]]. Like the old Special:Block,
changes to the block target field won't re-query to see if the user is
already blocked (though that would be a fine improvement). However
*unlike* the old Special:Block, such changes do make the message
disappear.
Bug: T373572
Change-Id: Iceaedbb1e3496c52b49a2b96d65445da45261b9f
Why:
* When a temporary account exits their session, the
Special:UserLogout page is loaded to indicate the success.
* However, the success page talks about the temporary account
logging out which may cause confusion.
* Per design mocks shared on T374519, this should be modified
to indicate that the user logged out of a temporary account.
What:
* Set 'templogout' as the page title when the user is logging out
of a temporary account.
* Set 'logouttext-for-temporary-account' as the message shown
for a logout success when the user is logging out from a
temporary account
* Update mediawiki.page.ready/ready.js to add a flag to the
URL Special:UserLogout URL that is redirected to once the
logout API call has occured.
* Update tests for SpecialUserLogoutTest
Bug: T374519
Change-Id: Ib62cdb5ba716976321cd556aa9defe97b3446b33
Add Html::listDropdownOptionsCodex() that takes a bulleted list like
[[MediaWiki:Ipbreason-dropdown]] and adapts the data struture for use
with a Codex Select component.
Currently optgroups are not supported (T367241) so we show the optgroup
labels as disabled options instead.
URL query string parameters do not yet prefill any fields. This will be
tackled as part of T368583.
Bug: T362912
Change-Id: Ib89dcf35ca2a1cd74404c42f5411d7c095b98952
Depending on configuration, this returns either the interface language
code of the current user or the current page language.
Bug: T4085
Change-Id: Iab7fda272ec81af88c74612727ff6bed014d4a81
Why:
* The contributions-subtitle message is used on contribution
special pages as a subtitle with user links shown next to the
text.
* To make this clearer, the word "Results" should be added as
without the word it is not clear what the word "for" applies to.
* This change was specified in the designs shared in
T367121#9962620 as part of adding Special:IPContributions to
the CheckUser extension.
What:
* Update the contributions-subtitle message to include the word
"Results"
* Remove the contribsub2 message key as unused, as it was made
unused in 908e387e36. Furthermore,
there are no usages of the message outside core shown in
code search.
Bug: T374265
Change-Id: I3b0a2b852675b74f62863a273991ad04b81e6d4c
Why:
* On wiki farm installs, it is possible that temporary accounts
are enabled on wiki but not another wiki
* Special:UserRights can assign groups to users on other wikis
* This currently allows temporary accounts to be assigned groups
from a wiki where the feature is disabled and not known.
* The Special:UserRights page should disallow this by preventing
cross-wiki assignment of rights when the target username is
reserved by the temporary accounts system.
** This works because the reserved pattern is accessible even when
the feature is not known
** Furthermore, the reserved pattern is expected to be set for all
wikis in the farm if one wiki has temporary accounts enabled,
so that the temporary account cannot be created on wikis which
have the feature disabled.
What:
* Update SpecialUserRights::saveUserGroups and ::fetchUser to
reject usernames when:
** The wiki ID for the username is not local
** Temporary accounts are not enabled on the wiki
** TempUserConfig::isReservedName returns true for the username
* Add a test to verify that temporary accounts cannot be given
user groups by the special page.
* Testing the changes made in this commit will be difficult as it
requires having a second wiki set up, and this is not done in
CI (which makes the test non-blocking for CI).
Bug: T372046
Change-Id: I2d60c5b3322caa4629b4e73c0b0b525fd1028946
This uses a new three-part form to allow the features of manually typing
an expiry (i.e. "31 hours") but allowing to do so for non-English users,
who previously didn't have this capability unless it was set in
MediaWiki:Ipboptions. The ability to use MediaWiki:Ipb-default-expiry to
set a default expiry is still supported, assuming it is either a valid
option in MediaWiki:Ipboptions or in the new "Custom duration" field
(i.e. "31 hours"). See https://w.wiki/B65S for more, though this
functionality doesn't appear to be used anywhere on the WMF cluster.
"Expiration" is renamed in the code to "Expiry" to match the naming of
other MW components (ExpiryDef), but the user-facing message is still
"Expiration".
No validation is done yet, but will be added in a future patch.
Similarly, pre-supplying values via URL params is saved for T368583.
Bug: T359684
Change-Id: Iffb6fa3f539d29ed25802a19f4c13c627208259c
Why:
* Special:Contributions and Special:DeletedContributions allow
a user to view contributions from IP addresses and ranges.
* When temporary accounts are enabled, no new revisions will
appear in the results when searching for IP addresses and ranges
* For this reason and to be consistent with designs on T369859,
the Special:Contributions and Special:DeletedContributions pages
should indicate that the contributions are legacy when
temporary accounts are enabled.
What:
* Define ::getResultsPageTitleMessageKey for both
SpecialContributions and SpecialDeletedContributions to return
the "legacy" title when temporary accounts are enabled and the
target of the search is an IP address or range.
* Because T269521 is resolved, remove the null default values for
the constructor arguments of SpecialContributions. This is done
because we are passing a new service through the constructor
and defining it as null by default is unnecessary.
* Test these changes.
Depends-On: I63ac28917788f947894ea4f0bf71a7ff30d7a5aa
Bug: T369859
Change-Id: I5d1007d7d317323e93103260985be4a23cdb6848
For decades MediaWiki has allowed "extra" px modifiers in image size
specifications, for example `100pxpx`. It has been suggested since at least
2008 (T15500#174968) that this behavior should be deprecated. This is
not localized, so (for example) on eowiki we allow `100rapx` as well (!).
As one small step toward eventually removing this weird corner case behavior
add a tracking category whenever it is used on wiki.
In the process, emit deprecation warnings for
ImageGalleryBase::setWidths() or ::setHeights() if called without
ImageGalleryBase::setParser() having been set. The ::setParser() method
already includes in its documentation that "If you do not set this and
the output of this gallery ends up in parser cache, the javascript will
break!", so please set the parser appropriately.
Bug: T15436
Bug: T15500
Bug: T372935
Change-Id: If86d949189a7d105595404d21447477499873b03
To be merged after the following change has been deployed: https://gerrit.wikimedia.org/r/1060893
Bug: T366271
Change-Id: I1dd9a91bc37e32bde15f52271fbea2580943ab99
First export in commit 5c6b75659f
(Change-Id Ied5002d2ca82a05d69e55442561f254f610e0d5c ).
Language codes nan, nan-hani, nan-latn will be used for language
converter codes.
Bug: T354937
Bug: T369899
Change-Id: If68512a24cac67daa033a634b1fb57d872d0039c
This makes it possible to use it in translations
without warnings on translatewiki and makes it
consistent with sp-contributions-blocked-notice.
Change-Id: I5437688f19496f8336b6cf4155cd9e282aae12e7
Many changes tags added by extensions include links in the 'tag-<tag>'
label messages, which point to help pages for the tags and the software
features that add them. This makes translating the labels unpleasant.
Introduce localisation messages like 'tag-<tag>-helppage' (following
the pattern of 'tag-<tag>-description'), which should contain a URL
or a page title of a help page for the given tag. When such link
message is defined, the tag description in changes lists, history
pages etc. is wrapped in a link that points to the given URL or page.
Unlike the label messages, the link messages are always used in wiki
content language, for easy on-wiki customization. For compatibility
with old translations and existing on-wiki overrides, if 'tag-<tag>'
already contains any links, 'tag-<tag>-helppage' is ignored.
Add buttons that allow editing the new links on Special:Tags. Correct
existing buttons that allow editing the labels to use user language.
Add help links using the new messages to the changes list filtering
interface (which can't display links in tag descriptions themselves).
Introduce a link message for 'mw-contentmodelchange' tag as an example.
Bug: T372175
Change-Id: I1e2242a8591597a110a5a430f4c251f0f601cfbe
The following patches should be merged immediately
after this one:
I66fbebe2f43484973fa060285e1b41efae499864
I13c7d94b050a38e9d5599493af34266029e97225
Bug: T372213
Change-Id: Ice859477e511b38f7bf6c051082d04f6c83a10e7
Codex 1.11.0 introduces a number of new message keys. These messages
should all be defined within MediaWiki's i18n system in advance of
the introduction of Codex 1.11.0 to MW Core.
In the future this process will be streamlined according to the
pland described in https://phabricator.wikimedia.org/T371330.
Bug: T371628
Change-Id: I038fe6a8fd02614a60aa8912796384ba986b4ca4
Also:
1. Other minor fixes in comments touched by this patch.
2. Add a separate test for subpage with spaces.
Change-Id: I267f19027098e5778b1cd491826e1741fc7ee794