Commit graph

1817 commits

Author SHA1 Message Date
Bartosz Dziewoński 11566e4b27 Allow more flexible overrides for the terms-of-use messages
Bug: T284097
Change-Id: Ibacd9397a40ffcc8a8127ec543cb2f7300ce5464
2021-10-05 17:58:37 +02:00
jenkins-bot 1a67ab6d74 Merge "Make reply links more robust so Google Translate won't break us" 2021-10-05 13:53:03 +00:00
Translation updater bot bbf98c00a4 Localisation updates from https://translatewiki.net.
Change-Id: I9a0584c3b7e17e6d7dc078cd57951824b34317da
2021-10-05 08:29:31 +02:00
David Lynch 4211494ed7 Make reply links more robust so Google Translate won't break us
Normal link: `<a>reply</a>`

Google Translate: `<a><font><font>reply</font></font></a>`

Using jQuery's `closest` method to make sure we go up if the event
target isn't the data-mw-comment element should avoid problems.

Bug: T245563

Change-Id: I19ffb9a5b91617b98b0f00e4d185c01bcde093b0
2021-10-05 01:07:36 -05:00
Ed Sanders 9b19b32fc0 Compress emptystate.svg with svgo
14k -> 9k

Change-Id: Iec26b332627d8084f511edfbb69505b045ab6939
2021-10-04 12:56:20 +01:00
Ed Sanders f140e725a9 "Reply ... in one click" -> "Reply ... with one click"
"in" suggests that the "one click" fully encapsulates the
process of replying, and would probably be better used with
a timeframe, e.g. "Reply in one minute".

Change-Id: Iff323c3bc88959f3a0e6ea5b2f0a4174da5e8e21
2021-10-04 12:52:47 +01:00
Translation updater bot cfc4f8b7a3 Localisation updates from https://translatewiki.net.
Change-Id: I112c8dbfa82b89348f9d89443bd460bb6519dbb7
2021-10-04 08:55:44 +02:00
Translation updater bot cdf089b20c Localisation updates from https://translatewiki.net.
Change-Id: Ice11be400a9d4893eb5fad9367bdda296047b7f4
2021-10-01 09:29:49 +02:00
Translation updater bot 0ddcdb8a5b Localisation updates from https://translatewiki.net.
Change-Id: I35c68af690b6662ce9b4b2815200ed0bd4bb72ca
2021-09-30 08:57:24 +02:00
Translation updater bot 2e18a49315 Localisation updates from https://translatewiki.net.
Change-Id: I2c05926cc8d035728ec2fb99ca2e06b72fa5fc32
2021-09-29 09:01:43 +02:00
jenkins-bot 268b704b48 Merge "Add a link to preferences within the Reply and New Discussion Tools" 2021-09-28 16:34:59 +00:00
jenkins-bot 162cc03e6a Merge "Clarify the references to talk pages in notification preferences (#2)" 2021-09-28 14:57:55 +00:00
Bartosz Dziewoński 4be0751517 Fix almost all errors codes being logged as http-0
Follow-up to b52699ad35.

Bug: T290514
Change-Id: If82f10c58872d990b9dfa7cbdc9b784454a5fa46
2021-09-28 13:14:29 +02:00
Bartosz Dziewoński 7126d0f656 Clarify the references to talk pages in notification preferences (#2)
Bug: T286954
Change-Id: I8f351bf277c7acfaff37fe36eefce6768c3a04c6
2021-09-28 11:53:56 +02:00
Translation updater bot 57f6b6ddd3 Localisation updates from https://translatewiki.net.
Change-Id: Ibaabb077e6a7bbeefbd078797d19353311de7df1
2021-09-28 08:18:41 +02:00
Bartosz Dziewoński ca8781a3a0 Add a link to preferences within the Reply and New Discussion Tools
Bug: T291002
Change-Id: Id99f77d3a181aedd23305b7afa61a0a3fb6dabb7
2021-09-27 21:52:07 +00:00
Bartosz Dziewoński c1f4668806 Change CommentParser and ImmutableRange to use offsets in codepoints instead of bytes
The PHP DOM extension measures lengths and offsets in Unicode codepoints.
Our PHP code used UTF-8 bytes, causing some offsets to be slightly off.
Now it mostly uses Unicode codepoints as well (we're forced to use bytes
in a few places, because preg_match returns offsets in bytes).

In practice, this had no visible effect to the user. It caused the
markers `<span data-mw-comment-end="..."></span>` to be placed at
the end of their container instead of the correct position when the
timestamp contained multibyte characters (e.g. "ź" in Polish); but
the correct position is usually at the end of the container anyway.

In the test cases, the only difference is placing these markers before
a trailing line break inside `<p>...</p>` tags rather than before it.

The patch also accidentally fixes another bug, where element nodes
with no children (mostly <img>) were incorrectly excluded when calling
cloneContents(), because they were treated as if they were text nodes.

Change-Id: Iccdccf1078598f4b62cab96225e9c85a4c0e93ee
2021-09-27 19:04:16 +00:00
jenkins-bot 408bbc62a3 Merge "Change the "Watch this page" label to distinguish it from topic subscriptions" 2021-09-27 17:26:14 +00:00
jenkins-bot 118b958f8b Merge "Use MediaWiki's new section edit summary if the user didn't modify it" 2021-09-27 17:11:32 +00:00
Translation updater bot f6c5a0f804 Localisation updates from https://translatewiki.net.
Change-Id: If332718d4ded6e55b5bbb9a01caedc1d3547727c
2021-09-27 08:34:44 +02:00
Alexander Vorwerk b73f4b1a70 Replace usage of deprecated PageProps::getInstance()
Bug: T289544
Change-Id: Ib4d86c298508b3dc56c44a4fa7314218f8a0d930
2021-09-26 00:48:51 +00:00
Translation updater bot e6c9d3f328 Localisation updates from https://translatewiki.net.
Change-Id: Ic0da565b5509ea688d16e24dfe446dc7c6e47a93
2021-09-24 08:26:09 +02:00
jenkins-bot abd6c2fedd Merge "Enhance Echo user talk edit and mention notifications" 2021-09-24 02:17:57 +00:00
Translation updater bot 1105554785 Localisation updates from https://translatewiki.net.
Change-Id: I4f2383fb709a1c965a2e315a53161fd47f1c94fa
2021-09-23 12:27:33 +02:00
Translation updater bot ac8ff605d9 Localisation updates from https://translatewiki.net.
Change-Id: Ib3ef82dcf166e03f306957c1e145817f93da1c04
2021-09-22 08:10:37 +02:00
jenkins-bot 15747aba3a Merge "CommentParser: Remove outdated legacy ID algorithm" 2021-09-21 16:50:37 +00:00
jenkins-bot d25975209f Merge "Deduplicate logic for subscribable headings" 2021-09-21 16:50:29 +00:00
jenkins-bot 02a214d928 Merge "Put all checks for enabling the empty state for talk pages in one place" 2021-09-21 15:43:11 +00:00
Bartosz Dziewoński 0bf4a6ca90 Use MediaWiki's new section edit summary if the user didn't modify it
Bug: T275178
Change-Id: I5966cb5a523343f02ca955c27aa45822c29aab3f
2021-09-21 16:27:35 +02:00
Bartosz Dziewoński b6c8de03ef Change the "Watch this page" label to distinguish it from topic subscriptions
Bug: T290712
Change-Id: I02b89466a4e980e3cb2859b1ba5a3cbf4b5ae0ed
2021-09-21 11:44:06 +02:00
Bartosz Dziewoński 4a824abd0d Apply page transformations only when viewing pages
Follow-up to e634701460. We didn't need
this previously, because we relied on the ArticleParserOptions hook
only being called when viewing pages.

Context from code reviews a year ago:
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/641837/comment/15ee0218_e4ab602f/
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/641837/comment/b62d4327_5ebc2e02/

Bug: T291459
Bug: T291460
Change-Id: I64f0be170719d874f5460934462917f4f13af6c1
2021-09-21 10:19:42 +02:00
Translation updater bot 8f929ccc26 Localisation updates from https://translatewiki.net.
Change-Id: I0013781874f0c7253b48e5249e7fb573d3368ad3
2021-09-21 08:08:55 +02:00
jenkins-bot c50b1630d1 Merge "Add API to get the status of topic subscriptions on a page" 2021-09-21 04:43:03 +00:00
Bartosz Dziewoński ca17555a67 Put all checks for enabling the empty state for talk pages in one place
They were spread across several places, and some of them were checking
different things, causing us to show the view mode on some
action=edit&redlink=1 links but without showing our empty state.

Bug: T291085
Change-Id: Id1864e58c47dbd22abb41d48e31f81318d9f94f9
2021-09-20 23:15:00 +02:00
jenkins-bot 152a663fb6 Merge "Always apply DiscussionTools page transformations" 2021-09-20 17:30:43 +00:00
Bartosz Dziewoński 435b0c65c7 Enhance Echo user talk edit and mention notifications
If the user talk edit or mention coincides with exactly one new comment:
* Change the primary link to be a direct link to the comment
* Add a text snippet to notifications that don't already include one
  (user talk edits that are not new sections).

This is done for all such notifications, regardless of whether anyone
has topic subscriptions enabled.

Bug: T281590
Bug: T253082
Change-Id: I98fbca8e57845cd7c82ad533c393db953e4e5643
2021-09-20 15:05:42 +02:00
Fomafix c1371b7416 Remove uppercase of first character of auprefix
Since Id9afb2dd0212e4b871bb6a7a9d8762e1bcb81d6a included in core since
MediaWiki 1.38 the uppercase of the first character of the parameter
auprefix is not needed anymore.

Bug: T291339
Depends-On: Id9afb2dd0212e4b871bb6a7a9d8762e1bcb81d6a
Change-Id: Ic14ca9c9c61d2a50bdbaff50b56302a60ed17a96
2021-09-20 07:28:34 +00:00
Translation updater bot 70dd1e97ea Localisation updates from https://translatewiki.net.
Change-Id: I6590484d7d3824055646f389672140f40ffa4828
2021-09-20 08:18:49 +02:00
Bartosz Dziewoński 3dbc5749ea Adjust use of 'plainlinks' class to fix button styling in some cases
It was previously applied on the whole wrapper of the anon
warning, including the buttons. In some cases (on mobile, and
on some sites with weird customized site CSS), this causes the
buttons to lose some styling. Apply it only on the label.
Follow-up to 522b7932d7.

Bug: T270536
Bug: T291000
Change-Id: Ia4bc99fc219a80efbf46a7cc196ea29720a34de8
2021-09-18 03:16:43 +00:00
Translation updater bot 4c39068eb3 Localisation updates from https://translatewiki.net.
Change-Id: Ibd743268bc7dbeed1ae7d60f7e8311a99c198269
2021-09-17 08:45:16 +02:00
jenkins-bot 8de4776c20 Merge "Enable email delivery for our notifications for new users by default" 2021-09-16 18:59:32 +00:00
Translation updater bot be62b09ad7 Localisation updates from https://translatewiki.net.
Change-Id: I82647334b14d6ec651223ad7338ff8dd932c1a9b
2021-09-16 08:11:33 +02:00
David Lynch 46b6d76433 Enable email delivery for our notifications for new users by default
We're using the same approach as Echo is for its new-users-only settings

Bug: T287547
Change-Id: I1d8fff364da919caaf86af94cf5f0c6e40b67ff9
2021-09-15 23:54:30 -05:00
Translation updater bot 2265dd3732 Localisation updates from https://translatewiki.net.
Change-Id: I5a8ac3dd105a4f45364fe6c40111e7628356d9fe
2021-09-15 08:14:07 +02:00
Alexander Vorwerk 97a702cbc7 CommentParser: use IPUtils instead of the deprecated IP class
Bug: T291008
Change-Id: I0207940a642a32f2ca997b78387c9ff0af101599
2021-09-14 22:19:05 +02:00
Translation updater bot 7485d2d18f Localisation updates from https://translatewiki.net.
Change-Id: Iccbcc7cf9fac35932a6c4cb1384b5a97724d361e
2021-09-14 08:32:40 +02:00
Bartosz Dziewoński 9c20efcd4d Record timing for 'saveSuccess' and 'saveFailure' events
Bug: T290931
Change-Id: Id4ead2e0cc72174eec5f3849d8182d660905daea
2021-09-13 23:47:30 +00:00
jenkins-bot 269111d7aa Merge "Log more precise error codes for timeout etc. (and HTTP statuses)" 2021-09-13 16:17:35 +00:00
jenkins-bot 8581e4d3d7 Merge "Add some tests covering ThreadItem::getHTML() and related methods" 2021-09-13 16:12:55 +00:00
Translation updater bot 2d4b53a452 Localisation updates from https://translatewiki.net.
Change-Id: I0b46e987280a455de582ad0f53a0e7bb3eb6b1fc
2021-09-13 08:29:24 +02:00