Commit graph

15 commits

Author SHA1 Message Date
Amir E. Aharoni cc865692f1 Remove "successfully" from a message
This word is usually unnecessary in messages. See
https://www.mediawiki.org/wiki/Localisation#Avoid_jargon_and_slang

Change-Id: I54a11d4e18365209ff198a45e5e3c1c20e8353c4
2021-10-31 10:16:12 +02:00
jenkins-bot 10111ea872 Merge "Generate form tokens in the client to prevent double posting" 2021-10-29 22:32:47 +00:00
Ed Sanders 6022982eb9 Generate form tokens in the client to prevent double posting
Store used tokens in session storage.

Bug: T286409
Change-Id: I88c81689d9cf3447f6cc77c849a84d52c8b2c0db
2021-10-29 00:17:14 +01:00
Bartosz Dziewoński 6fb376a11a Rephrase 'apierror-discussiontools-commentname-ambiguous'
I think API error messages should be impersonal. Also clarify which
parameter must be provided.

Change-Id: I43ab66fddbd0c7f9948a6e2859d621a45d3f34ba
2021-10-22 17:18:54 +02:00
Ed Sanders 02642e48dd Fix linting on i18n key order
Change-Id: Id30b228f2aaa710f75086b6b64ffda5726d59a8e
2021-10-07 17:37:51 +01:00
Bartosz Dziewoński 8bb36bd782 Add API to get the status of topic subscriptions on a page
(Split off from Ic0fabda0de4ebbc5e424f49641e6b03ebb4b7e6a)

Bug: T290185
Change-Id: Iacc0f92bedfcb49e8a05d98af4d8170d08b1c8de
2021-09-07 21:38:09 +00:00
Bartosz Dziewoński 6dd90eda4a Improve discussiontoolssubscribe API documentation
Bug: T280314
Change-Id: I0987faac2cd8c5276a37869212fa968f0d642c09
2021-08-23 18:40:00 +00:00
Bartosz Dziewoński 6a50d1203c Limit number of topic subscriptions per user
Per Manuel Arostegui in T263817#7033384. The limit is 5000.
(I picked it arbitrarily, there's no real rationale for it.)

Also log a warning when any user reaches half of the limit,
so that we might make a decision about changing this mechanism
before it starts affecting users. Maybe at that time we'll
have data to show that it's safe to remove the limit.

Bug: T263817
Change-Id: I18a8ee0ad7383759229c5721d5253fb591457d4d
2021-05-25 17:16:24 +02:00
Ed Sanders 0bf7539eb9 Topic subscription action API
Bug: T264885
Change-Id: Ie4ddbcef8769c124039a72f544702c9a88bc49eb
2021-04-06 21:25:24 +00:00
Bartosz Dziewoński 42ce942c86 Introduce comment "names" to identify comments across revisions/pages
The existing comment IDs can't be used to find the same comment on
a different revision or page (when it's transcluded), because they
depend on the comment's parent and its position on the page.

Comment names depend only on the author and timestamp. The trade-off
is that they can't distinguish comments posted within the same minute,
or in the same edit, so we will still need the IDs sometimes.

Prefer using comment names when replying, if they're not ambiguous.
This fixes T273413 and T275821.

Heading names depend on the author and timestamp of the oldest comment.
This way we don't have to detect changes to the heading text, but we
can't distinguish headings without any comments.

Bug: T274685
Bug: T273413
Bug: T275821
Change-Id: Id85c50ba38d1e532cec106708c077b908a3fcd49
2021-03-23 16:08:42 +00:00
Ed Sanders 6c023da581 Sort message keys (and enforce sorting)
Change-Id: I72236c23323dc3292bf8a060c4270685c6decb9a
2021-02-23 16:33:11 +00:00
Bartosz Dziewoński 03f22c538e Improve API parameter documentation
These messages are used on Special:ApiSandbox.

Change-Id: I07809d3f9402d30c5d2d364e0634bd020f86f64f
2021-02-13 00:08:31 +01:00
Bartosz Dziewoński a59dee8ec2 Fix 'discussiontoolsedit' API module description
The text of this message looks like a description for a 'summary'
parameter for the API (which doesn't exist, and if it did, we'd reuse
the message from core anyway). It's supposed to contain an overall
summary/description of the whole module.

Change-Id: I110d0ac6cd6fa9c2dc171615cbf1cd9629452d5a
2020-09-09 23:06:38 +02:00
Ed Sanders 5d8f3b9051 Create a 'transcludedfrom' API endpoint
Bug: T252558
Change-Id: I2220f26dc2b744f03feeee9124f6936858dda3eb
2020-07-27 21:20:01 +01:00
Ed Sanders 8829a1a412 Edit API for replies
Bug: T252558
Change-Id: Iac43b5bb0315ceaad7698fb2b708b7c3cde403f8
2020-07-27 21:19:58 +01:00