Commit graph

258 commits

Author SHA1 Message Date
Translation updater bot 59f476dd8e Localisation updates from https://translatewiki.net.
Change-Id: I953297a88dfaede07a41fc1d6ebc7ede0b63fd1f
2022-10-17 08:22:54 +02:00
Bartosz Dziewoński d2e49b16f7 Use RevisionLookup methods instead of ApiParsoidTrait methods
Part of my secret plan to delete ApiParsoidTrait.

* Inject RevisionLookup into ApiVisualEditor
* Use RevisionLookup::getRevisionById instead of ApiParsoidTrait::getValidRevision
* Use RevisionLookup::getRevisionByTitle instead of ApiParsoidTrait::getLatestRevision
* Use standard MediaWiki error messages
* Delete unused ApiParsoidTrait::getValidRevision
* Delete unused ApiParsoidTrait::getLatestRevision

Depends-On: I7244ee4916fb011fad5faa1d9f837e83f6ac2dc1
Change-Id: I8089c0c516d9dba52e931a0a80740c0361216dbd
2022-10-11 14:54:40 +00:00
Translation updater bot 5c5673bc2b Localisation updates from https://translatewiki.net.
Change-Id: I6fc288a7b158f9d5ca463d5b32a279af9f1ae8ef
2022-10-03 09:46:46 +02:00
Translation updater bot a509020bee Localisation updates from https://translatewiki.net.
Change-Id: If9817782dfbd79ec98cde40ee8c7d3069063c30a
2022-09-30 08:55:15 +02:00
Translation updater bot ba17184845 Localisation updates from https://translatewiki.net.
Change-Id: I459fcd72595dc72c3b38926ca1df46d33882385f
2022-09-29 08:28:30 +02:00
Translation updater bot 62fa3a1903 Localisation updates from https://translatewiki.net.
Change-Id: I53228cb2c3236df742edf70af600b5110a02fa13
2022-09-22 08:47:41 +02:00
Translation updater bot 095d462165 Localisation updates from https://translatewiki.net.
Change-Id: Iceccacde27b4a33554e9a817cb9c873a656588fd
2022-09-21 08:30:02 +02:00
Translation updater bot cd913b4f18 Localisation updates from https://translatewiki.net.
Change-Id: I884506f98bb22eb0c3ac46884482c6df6edbd440
2022-09-20 08:35:03 +02:00
Translation updater bot 26bc9756fe Localisation updates from https://translatewiki.net.
Change-Id: I3f0cb4841f3673c74c2f871a9f43a39b2898a15b
2022-09-15 09:55:52 +02:00
Translation updater bot 60e69a0841 Localisation updates from https://translatewiki.net.
Change-Id: I6e831c93427a76ba49188f173fad9f8a4a0c2317
2022-09-12 09:37:23 +02:00
Translation updater bot 6c31c28a11 Localisation updates from https://translatewiki.net.
Change-Id: I8f2be21444913f86be49f7136151281f419b63ab
2022-09-09 10:11:04 +02:00
Translation updater bot bd173ad476 Localisation updates from https://translatewiki.net.
Change-Id: I37351c6027bc65b7400bcfee32fd02f653c3cfa9
2022-09-08 10:00:12 +02:00
Translation updater bot 948773fd15 Localisation updates from https://translatewiki.net.
Change-Id: I3f3acd353c4cfcc1ba484374a17f7f7e25341bb7
2022-09-07 09:55:25 +02:00
Bartosz Dziewoński 6f3de6d7f0 Improve some API param docs and validation
Change-Id: Ic1319f82e581b1a3c2108ab32449ce75aa187831
2022-09-02 04:20:41 +02:00
Translation updater bot 5eef7c3036 Localisation updates from https://translatewiki.net.
Change-Id: Ic25644afabb8deb1993c36c83fc29896fa99b1de
2022-08-31 09:36:04 +02:00
Translation updater bot dc70a0e599 Localisation updates from https://translatewiki.net.
Change-Id: I5174c709e38f5be173c144a2d0eaba31fdf33bb5
2022-08-29 09:16:16 +02:00
jenkins-bot 9ac8195013 Merge "Improve error messages for RESTBase errors" 2022-08-26 18:41:17 +00:00
Translation updater bot e51c055a8e Localisation updates from https://translatewiki.net.
Change-Id: I0ab0a136de50bf078343139d7593140bccaca92a
2022-08-22 08:24:24 +02:00
Bartosz Dziewoński f2df5dc7b9 Improve error messages for RESTBase errors
For error responses, the response body should be JSON containing a
'detail' key with a human-readable error message.

Remove old debug logging for T233320, it's no longer needed and it
stopped working on WMF wikis anyway (again, previously it was broken
due to T234564).

Change-Id: I64d0b934c90c7e9582e5433ae7a1b9ed2bc0c9a2
2022-08-19 21:13:35 +00:00
Translation updater bot 57c8f01b7b Localisation updates from https://translatewiki.net.
Change-Id: I18ba55242d9a97efa35d029409fee01945815d52
2022-08-12 08:44:28 +02:00
Bartosz Dziewoński 8d735bbd9e Create Parsoid helper for use outside of action API
ApiParsoidTrait depends on some ApiBase methods, which is inconvenient
when one wishes to access Parsoid HTML outside of the action API. Move
the bulk of the code into a new class ParsoidHelper, which doesn't.

Replace the uses of methods:
* dieWithError: throw a different kind of exception where it makes
  sense, or change the method to return a StatusValue instead of
  throwing where it doesn't
* getPageLanguage: use Title::getPageLanguage() or pass as parameter
* getConfig: pass to constructor
* getLogger: pass to constructor
* getRequest: pass the only required part to constructor,
  leave some other API-specific code using it in ApiParsoidTrait

Bug: T314565
Change-Id: I90656cc74bb1cb1f2f3c82ad51cfb164cb8a4a4b
2022-08-10 23:20:59 +00:00
Translation updater bot 799c0b86ea Localisation updates from https://translatewiki.net.
Change-Id: I5851d2c86d2ae51dbc44f791387d40456e93667b
2022-08-01 08:23:49 +02:00
Translation updater bot f4497c9ddd Localisation updates from https://translatewiki.net.
Change-Id: I480a16f3d6d2a3ca838deb4fd4bc0879d940f686
2022-07-25 08:39:48 +02:00
Translation updater bot fc85f06dd1 Localisation updates from https://translatewiki.net.
Change-Id: Id75506d4b41ba26ad25fa5de5c3861808a0ad975
2022-07-18 08:16:01 +02:00
Translation updater bot 1e580da334 Localisation updates from https://translatewiki.net.
Change-Id: I3aff596dc6bb3cc20576f18d815d9a5d018cbc5c
2022-07-11 09:50:54 +02:00
Translation updater bot 02377f4b0f Localisation updates from https://translatewiki.net.
Change-Id: I506d3ec0d599761c21219b021b249fc764d10b45
2022-06-16 09:25:52 +02:00
Translation updater bot d1d4ba4636 Localisation updates from https://translatewiki.net.
Change-Id: I203d6ffdbb8608075c3639c1c1db4ccbb04ed272
2022-06-13 08:29:25 +02:00
Translation updater bot 80092b55d9 Localisation updates from https://translatewiki.net.
Change-Id: I5ad276330fc551b0e261691568412d4c6b8b163b
2022-06-09 08:17:53 +02:00
Translation updater bot 17715f6c43 Localisation updates from https://translatewiki.net.
Change-Id: Ie349c19df6cd5f16dbbc5430e82eff4a0e5d2ef9
2022-06-08 08:28:23 +02:00
Translation updater bot 6e9387b626 Localisation updates from https://translatewiki.net.
Change-Id: If32d7acf8ab1e264d247709e616224a65ff136ea
2022-06-06 09:27:08 +02:00
Translation updater bot b659eafe5a Localisation updates from https://translatewiki.net.
Change-Id: I5ea61db27522e37b3b57d190ba7c39d8ce07fac2
2022-06-02 08:15:48 +02:00
Translation updater bot 107727eb12 Localisation updates from https://translatewiki.net.
Change-Id: Iee387e366d5478f52f23c6f208b7934b02e658db
2022-05-30 09:24:35 +02:00
Translation updater bot 0bee2c6ce9 Localisation updates from https://translatewiki.net.
Change-Id: I4ff19a0e7896443cff27f009009accab6ca25592
2022-05-26 08:52:21 +02:00
Translation updater bot 2ec96bf0c4 Localisation updates from https://translatewiki.net.
Change-Id: Ie86751a61ed86f341df7e3d772db1e87a9ffd2d9
2022-05-25 08:33:17 +02:00
jenkins-bot bb7f777ffe Merge "Zero-configuration VisualEditor for mainline" 2022-05-25 00:01:15 +00:00
Translation updater bot 24a00796fb Localisation updates from https://translatewiki.net.
Change-Id: I3445bd329c8262e14d0a6e1de94d2bb02fd952a1
2022-05-23 08:17:53 +02:00
C. Scott Ananian 57dc7aa630 Zero-configuration VisualEditor for mainline
Now that Parsoid's ServiceWorkers have been merged to core, this adds
support for "zero configuration Visual Editor" to the master branch.
Like earlier zero-conf work, this does not use RESTBase for stashing
or for reliable selective serialization.  Future integration work
with ParserCache will reintroduce this functionality.  Nevertheless,
this implementation should have feature parity with the "loopback interface"
zero conf VE we've been shipping since 1.35.

Bug: T305108
Change-Id: I7b5b4a6d16b07914f947cbaf498ad1d3cf2447a5
2022-05-20 15:01:09 -04:00
Translation updater bot 2ddbb6b708 Localisation updates from https://translatewiki.net.
Change-Id: I792241e3d2b2b9f12faa059b020e99ba13f215fa
2022-04-18 10:07:08 +02:00
Translation updater bot 3fa5423da0 Localisation updates from https://translatewiki.net.
Change-Id: I76e4ce6b17980b1b36473ac91902794486ff6e55
2022-04-14 08:27:34 +02:00
Translation updater bot 87c2ee3c79 Localisation updates from https://translatewiki.net.
Change-Id: I43f5f3e5152560d1072420d22dc603c47f373aa9
2022-04-13 08:33:05 +02:00
Translation updater bot d221b2dd22 Localisation updates from https://translatewiki.net.
Change-Id: Ie37a0e143826387d29bb7f61484ef0a58a099f35
2022-04-08 08:28:37 +02:00
Translation updater bot 5648463ceb Localisation updates from https://translatewiki.net.
Change-Id: I98ff381676e55788a223ff6792d2649c5f1fe45c
2022-04-04 09:35:24 +02:00
Translation updater bot 83db4cc3e8 Localisation updates from https://translatewiki.net.
Change-Id: I1a16df64dc1f00c793ae9368cea1efa6f5d5daea
2022-03-28 08:22:24 +02:00
Translation updater bot 8059f845a3 Localisation updates from https://translatewiki.net.
Change-Id: I21a6287eaae469b68c13cb21ca80685d25cb5aac
2022-03-17 08:37:49 +01:00
Translation updater bot a2a73aab7d Localisation updates from https://translatewiki.net.
Change-Id: I864345e8072818e4b525bcfce2a3d28e8dbda1cf
2022-03-16 08:08:23 +01:00
Translation updater bot 9e47ab1892 Localisation updates from https://translatewiki.net.
Change-Id: I699c55784025b2adad6a0e8c145495ceb6f4c1d0
2022-03-14 08:15:01 +01:00
Translation updater bot afde13a965 Localisation updates from https://translatewiki.net.
Change-Id: Ic41522d1cdb4cff7150808bc3bd9ce08b88c3b3a
2022-03-07 08:11:54 +01:00
Translation updater bot 09e405386b Localisation updates from https://translatewiki.net.
Change-Id: Id7717ffa2fa37ec29cd883655c1b2610316e3725
2022-02-25 09:46:26 +01:00
Translation updater bot e65c63f2ad Localisation updates from https://translatewiki.net.
Change-Id: I9029503fcc32f8c9555d5e173c6221d5b2e388e2
2022-02-22 14:20:50 +01:00
Translation updater bot a6ffafb982 Localisation updates from https://translatewiki.net.
Change-Id: Ic09d05200ddc74ef9c26799f019a154292a9a7db
2022-02-21 08:17:15 +01:00
Translation updater bot 1e399587e2 Localisation updates from https://translatewiki.net.
Change-Id: I04c6ad88c97b24ff40bbd7ac42b5303ce3ce24c7
2022-01-20 09:18:21 +01:00
Translation updater bot 0ec4a5a291 Localisation updates from https://translatewiki.net.
Change-Id: I4cad34e72516a7e42081bcbee54ce6f280827368
2022-01-17 08:13:23 +01:00
Translation updater bot 1bf508e2ca Localisation updates from https://translatewiki.net.
Change-Id: Iab9a565ab972b74d2f06fa3c9da1f51e82c679de
2021-12-27 09:31:19 +01:00
Translation updater bot 63dfd2492a Localisation updates from https://translatewiki.net.
Change-Id: Ic393105b2217dda422df819c1c4f276c5225e2fb
2021-12-23 08:38:43 +01:00
Translation updater bot 955f360c52 Localisation updates from https://translatewiki.net.
Change-Id: I77a284fff376a37fdda6b839197b3612e745dc64
2021-12-06 08:20:32 +01:00
Translation updater bot 4abe4e4c71 Localisation updates from https://translatewiki.net.
Change-Id: I5b068748310886e4fae1044170b77542ef6ec290
2021-11-17 08:31:11 +01:00
Translation updater bot a5fa21f1f1 Localisation updates from https://translatewiki.net.
Change-Id: Ic52a39e3672ecd4138516beb669c08fbb2af0eb4
2021-11-16 08:16:36 +01:00
Translation updater bot d57b3ad10d Localisation updates from https://translatewiki.net.
Change-Id: I689a7432ef84b9801092c48d551b1172df1e3699
2021-11-11 10:03:12 +01:00
Translation updater bot be30ca5ffd Localisation updates from https://translatewiki.net.
Change-Id: I59581127d4b7b586ab6a25b8e38a1a5ca96c844b
2021-11-01 09:34:52 +01:00
Translation updater bot a0cfdf7cde Localisation updates from https://translatewiki.net.
Change-Id: I67ef6fff8b227267b3553de27840eb0262bc8928
2021-10-20 08:38:09 +02:00
Translation updater bot 47fa7bc308 Localisation updates from https://translatewiki.net.
Change-Id: I6dcd90a920473f3811d302b21571aca72cbb2fdc
2021-10-18 15:21:43 +02:00
Translation updater bot 74eedd61dd Localisation updates from https://translatewiki.net.
Change-Id: I2d1d4eed6572bb3aa19b54e071ae8322e486329a
2021-09-23 12:28:11 +02:00
Translation updater bot 8b05105981 Localisation updates from https://translatewiki.net.
Change-Id: I0ee0b80d0afc75033db114df53a17454e7a77089
2021-09-21 08:09:35 +02:00
Translation updater bot ecf3b9b388 Localisation updates from https://translatewiki.net.
Change-Id: Ieb257e045e7d996f595b9ff9b808fabdd7e754e0
2021-09-20 08:19:50 +02:00
Translation updater bot 273cfbdd61 Localisation updates from https://translatewiki.net.
Change-Id: Ic670bf1485047ea92ea9f5e6df6d70bb9d16f1bf
2021-09-13 08:30:34 +02:00
Translation updater bot fec6c43353 Localisation updates from https://translatewiki.net.
Change-Id: I231e9fba493e3b9fcc356bc0aa11d16c0e2f76b1
2021-09-06 08:21:29 +02:00
Translation updater bot fa0792e002 Localisation updates from https://translatewiki.net.
Change-Id: I1b12838127487dc724384dfb32e80561ecb32ea5
2021-09-02 08:26:58 +02:00
Translation updater bot 8ca81204e9 Localisation updates from https://translatewiki.net.
Change-Id: Ie94f81beac0844834160f7eb2340883fd09e0480
2021-08-17 08:19:53 +02:00
Translation updater bot 258178a04c Localisation updates from https://translatewiki.net.
Change-Id: I475fa9297b8668b343da1d2a268d3c81a703762c
2021-08-16 08:17:02 +02:00
Translation updater bot 8b809794cd Localisation updates from https://translatewiki.net.
Change-Id: Ia7bdf54324026eb4955787ae339e158228bfe3e3
2021-07-26 08:12:53 +02:00
Translation updater bot 951f025b1d Localisation updates from https://translatewiki.net.
Change-Id: I2fab4aa94b253d84a3dbb89562efdcec5aec537d
2021-07-20 08:21:12 +02:00
Translation updater bot 7fcb36385c Localisation updates from https://translatewiki.net.
Change-Id: I6eebaea4f621aad4d198de30c7bb7259c9251ea5
2021-07-06 08:38:58 +02:00
Translation updater bot 96f4b4d716 Localisation updates from https://translatewiki.net.
Change-Id: I6d049225c75087f978117ff20f863123ad203c1a
2021-07-05 08:07:30 +02:00
Translation updater bot 3ecdcf63c6 Localisation updates from https://translatewiki.net.
Change-Id: Ieb541ae46b1f4732e687c6bab256c6ac26187db7
2021-07-02 08:31:39 +02:00
Translation updater bot 080de68972 Localisation updates from https://translatewiki.net.
Change-Id: If7d122051b2bcd459499863f9be1964dc51ac3aa
2021-06-29 08:14:01 +02:00
Translation updater bot 10c84cbf34 Localisation updates from https://translatewiki.net.
Change-Id: I969f946dcaa771f76cdd829618797c8b329e1772
2021-06-02 14:36:10 +02:00
Translation updater bot f3757befa7 Localisation updates from https://translatewiki.net.
Change-Id: I54df46dce949f7b87de42e6b565e966db5468dd4
2021-05-31 08:33:30 +02:00
Translation updater bot 1811893632 Localisation updates from https://translatewiki.net.
Change-Id: Ib05124e2d7e1d387b94227db2e75cd0af7933610
2021-05-21 08:34:55 +02:00
Translation updater bot 04e468e5d3 Localisation updates from https://translatewiki.net.
Change-Id: I1772bfc3d8a05789bf5126180a7a8bd81960c321
2021-05-18 08:48:10 +02:00
Translation updater bot 03c277e96a Localisation updates from https://translatewiki.net.
Change-Id: I0e8507be3cf38c993020e5ea05144b6a53eeba33
2021-05-11 09:08:30 +02:00
Translation updater bot 752cc487e2 Localisation updates from https://translatewiki.net.
Change-Id: Ie07dc3f2354dadbb464c60706a11c8339c1653e4
2021-05-10 08:54:22 +02:00
Translation updater bot 39dea795d9 Localisation updates from https://translatewiki.net.
Change-Id: I59dd6fb5c903595e0995998bd0e290c6ac14ca83
2021-05-07 08:43:59 +02:00
Kosta Harlan f035ce51f1 Introduce VisualEditorApiVisualEditorPostSaveHook
What:

Add hook that runs after a save attempt is made in ApiVisualEditorEdit.
The hook receives the same data available in ApiVisualEditorEdit, and
implementations of the hook can modify the API response.

Also introduce templated
parameters (https://www.mediawiki.org/wiki/API:Templated_parameters) in
the API parameters; this allows plugins to pass arbitrary data along
with their request using e.g. plugins=linkrecommendation&data-linkrecommendation=foo

Add ServiceWiring files, a PHP namespace, and a HookRunner class to
support the above changes.

Why:

VE plugins may wish to send additional data when saving an edit and take
action based on that data on the server-side. See for example the
AddLink plugin in I7a052f8e which sends annotation data, and then uses
the new hook to perform a database operation.

Change-Id: I392691475fbdcec766acbd832600e82efcb5bfe8
2021-04-30 20:50:01 +02:00
Translation updater bot 788b168073 Localisation updates from https://translatewiki.net.
Change-Id: Icefa5c0035c1f39e9c63d54f15dce401e317d323
2021-04-23 08:37:42 +02:00
Translation updater bot d0b48d9bbf Localisation updates from https://translatewiki.net.
Change-Id: I2989ccbec957e54c5b885445bf3261129e81c5d7
2021-03-26 08:51:21 +01:00
Translation updater bot 86db8ff85f Localisation updates from https://translatewiki.net.
Change-Id: Ia31770f454e29c4e901c9e6a91830ad085a2e236
2021-03-09 08:33:42 +01:00
Translation updater bot 256145cadf Localisation updates from https://translatewiki.net.
Change-Id: I8f8b2c9950ceba3975a008810dad475c15bcce5f
2021-03-02 08:51:05 +01:00
Translation updater bot 9b73bc0da8 Localisation updates from https://translatewiki.net.
Change-Id: I70b96aae24e85e3af50e2b8846e6ac9ed4c94af1
2021-03-01 08:54:12 +01:00
Translation updater bot a4da38dcbe Localisation updates from https://translatewiki.net.
Change-Id: I41bc686d863baa1709e6d3cca088c27b3cbf650c
2021-02-22 08:54:16 +01:00
Translation updater bot 4b34308bc0 Localisation updates from https://translatewiki.net.
Change-Id: Ib3f15f4cd49192e43424dd8ba3152308fa0a774c
2021-02-18 08:44:18 +01:00
Translation updater bot 84da14f22f Localisation updates from https://translatewiki.net.
Change-Id: I7cf79e7641e90ec3bb670b8d7d823920492bedab
2021-02-15 10:06:57 +01:00
Translation updater bot 4dffd99bc7 Localisation updates from https://translatewiki.net.
Change-Id: I0857022e8dc470853cf2078dad76788929e1f9ae
2021-02-11 08:40:50 +01:00
Translation updater bot 8a6616629e Localisation updates from https://translatewiki.net.
Change-Id: I6988a87ef5f30303a5f1c53a3f690c0e902e6f0a
2021-02-08 08:46:27 +01:00
Translation updater bot 5789eb680b Localisation updates from https://translatewiki.net.
Change-Id: I1ca01a75350be7eb95675ccdecdcbcaee08baf6b
2021-01-21 08:33:11 +01:00
Translation updater bot 8c48722e52 Localisation updates from https://translatewiki.net.
Change-Id: I47271ac438febe5126d9252a526574fdf8c5cb56
2021-01-12 08:38:45 +01:00
Translation updater bot 94621896a4 Localisation updates from https://translatewiki.net.
Change-Id: I7d2d6b407d9035b05b81e21043d25b1d1c764252
2020-12-30 10:15:37 +01:00
Translation updater bot 12860d0a53 Localisation updates from https://translatewiki.net.
Change-Id: I89cb809619d007280f4edc2e6917c1d39c9b6763
2020-11-30 08:48:20 +01:00
Translation updater bot 9768adbedb Localisation updates from https://translatewiki.net.
Change-Id: I6296c6d09e103366ba51f9afc7404936bc280578
2020-10-22 08:32:01 +02:00
Translation updater bot 714e255a4d Localisation updates from https://translatewiki.net.
Change-Id: I1adbc96c45d1655eb793652974281fef517bad16
2020-10-21 08:28:16 +02:00
Translation updater bot 5a5a6deb28 Localisation updates from https://translatewiki.net.
Change-Id: Idff525109ce1bbda0b0140962050025fabdda819
2020-10-20 08:31:48 +02:00