Commit graph

893 commits

Author SHA1 Message Date
Translation updater bot 7f3f575768 Localisation updates from https://translatewiki.net.
Change-Id: Ie7550f0743c4d0867d96f187988ca0ae2e15e9e5
2024-04-29 09:23:20 +02:00
Translation updater bot 8c7369c93e Localisation updates from https://translatewiki.net.
Change-Id: Ida3eb38fde424dcc74c24a7710b3ee675d40fbd7
2024-04-22 09:28:22 +02:00
Translation updater bot 72ca1f7d20 Localisation updates from https://translatewiki.net.
Change-Id: I838abba4cbdc6d53a9ea8cfb4ede74e5f3710d3d
2024-04-15 09:27:59 +02:00
Translation updater bot 02009d6acc Localisation updates from https://translatewiki.net.
Change-Id: I7e90da6a54328a29e8314e86f81cfa921fd407c5
2024-04-09 09:26:45 +02:00
Translation updater bot 27534fffe1 Localisation updates from https://translatewiki.net.
Change-Id: I43115797159b01aa1a8445f25c4fbd119731efe4
2024-04-08 09:25:50 +02:00
Translation updater bot 2467e0e0cf Localisation updates from https://translatewiki.net.
Change-Id: I2eb63eb838ea70b70c4f58766eafcd3bea4de7bb
2024-04-05 09:38:12 +02:00
Translation updater bot fd58ef286d Localisation updates from https://translatewiki.net.
Change-Id: If416686c14cd3bc901b650ebd82b97234b6d25f1
2024-04-04 09:38:12 +02:00
Translation updater bot 6aa40e3926 Localisation updates from https://translatewiki.net.
Change-Id: I533be48420a6a1839942a3066fef1a27c844789c
2024-04-03 09:23:44 +02:00
Translation updater bot 110dbf5703 Localisation updates from https://translatewiki.net.
Change-Id: Ie27417dc357b0205b096cb0e93500e63a81ff64a
2024-04-01 09:22:41 +02:00
Translation updater bot 85383fc410 Localisation updates from https://translatewiki.net.
Change-Id: I69ce979e86b5e6904d350882c0103b7262600840
2024-03-29 08:46:48 +01:00
Translation updater bot 96872806b9 Localisation updates from https://translatewiki.net.
Change-Id: I6b93b691b9cbd5fb06ff3d1dd530a730f172540d
2024-03-28 08:31:58 +01:00
Translation updater bot 23957f5093 Localisation updates from https://translatewiki.net.
Change-Id: I2dfcf9ef6718991a6a118108d595dd0cdc8c0fef
2024-03-27 08:17:35 +01:00
jenkins-bot fd261440ca Merge "Improve localisation on Special:Gadgets, minor code cleanups" 2024-03-26 15:43:31 +00:00
Translation updater bot a9ba1efc51 Localisation updates from https://translatewiki.net.
Change-Id: I6312851de326ba4325a16070e51c25da9dbaacdd
2024-03-26 08:19:41 +01:00
Timo Tijhof 9c5b7cef9e Improve localisation on Special:Gadgets, minor code cleanups
For each item, either display human-readable and translated text,
or display a technical non-translatable identifier as `<code>`,
with optional localised text in the title attribute.

* Re-format "rights" as a sentence instead of a bullet list. It was
  the only one using a bullet list, which made it feel a bit long.

* Re-format "actions" as `<code>` since they are not localised.

* Re-format "contentModels" as `<code>`, and add the localised display
  name in a title attribute, same as we do with "rights" already.
  ContentHandler::getLocalizedName() is also used already on
  Special:ChangeContentModel.

* Fix "contentModels" to set `needLineBreakAfter = true`, otherwise
  if a gadget also sets "supportsUrlLoad", then that sentence is
  appended to the previous line.

Update phrasing and sorting to be consistent everywhere, and adopt
native PHP types where possible.

In most cases, I made things alphabetical, with the exception of
Special:Gadgets user interface output, and Gadget class methods,
which both follow the order of most recently added feature last
(rights, skins, actions, namespaces, contentmodels, categories).

Highlights:

* Fix namespace IDs type. These can be strings when they are parsed
  from the gadget definition text, not always integers.

* Add explicit default for 'category'. In theory not needed because
  MediaWikiGadgetsDefinitionRepo has a `$section = '';` default, and
  MediaWikiGadgetsJsonRepo uses GadgetDefinitionContentHandler where
  `category: ''` is part of both the initial page content, as well
  as merged via getDefaultMetadata.

  This default benefits simpler test cases, and static analysis,
  since the Gadget class constructor does not (yet) require it.
  Without this, getCategory() could TypeError due to returning null.

Bug: T63007
Change-Id: I3b2c72a6424d520431d03761d23a5a222518ce3d
2024-03-25 15:37:40 -07:00
Translation updater bot 0daef7e54b Localisation updates from https://translatewiki.net.
Change-Id: I680e123bc3d75d2238603fc94f6083f5f457c1f5
2024-03-25 08:35:57 +01:00
Translation updater bot e3ea7d97b2 Localisation updates from https://translatewiki.net.
Change-Id: Iad57fc6d1d1f048f02144445bdf9398c020429b7
2024-03-21 08:55:15 +01:00
Translation updater bot 4711609d13 Localisation updates from https://translatewiki.net.
Change-Id: Ie3b9db92189bd19e39486907de051dca4adf4942
2024-03-19 08:25:05 +01:00
Translation updater bot 0170bfc967 Localisation updates from https://translatewiki.net.
Change-Id: Ia1f36a8f95130ebca2e91db5ac4f43df01ff9531
2024-03-18 08:31:00 +01:00
jenkins-bot d6e1510af0 Merge "Add support for categories in definitions" 2024-03-16 22:54:42 +00:00
Sophivorus e2cb01ddcd Add support for categories in definitions
Adds a "categories" option to the gadget definition, which takes a
list of category names. Enabled gadgets will only load when the
viewed page is in one of the required categories.

Bug: T204201
Bug: T63007
Change-Id: I0ced9507bdab6cacd0baf2a331859099f35b73e5
2024-03-16 22:31:03 +00:00
Translation updater bot 33ff6adb15 Localisation updates from https://translatewiki.net.
Change-Id: Ifd3abf64b68860a8128c7611acb24294fb81049e
2024-03-13 08:25:37 +01:00
Translation updater bot 4b9f6f2a09 Localisation updates from https://translatewiki.net.
Change-Id: I54a6dbf16486187909ae2d0be68938e67ba82e0a
2024-03-11 08:27:01 +01:00
Translation updater bot 2c99c24a15 Localisation updates from https://translatewiki.net.
Change-Id: Ie8db699049f5519c01347a5a1e7278455ab02571
2024-03-08 08:23:04 +01:00
Translation updater bot b09872b79d Localisation updates from https://translatewiki.net.
Change-Id: I763caede8eca0546a5d1b4775cc99e0c7027baa1
2024-03-07 08:48:37 +01:00
Translation updater bot 76cfeb1ebb Localisation updates from https://translatewiki.net.
Change-Id: I40ba4d233b44100aea3e13b66cdf566e2c55019d
2024-03-05 08:27:39 +01:00
Translation updater bot 056fb151e7 Localisation updates from https://translatewiki.net.
Change-Id: I79757339442a5e50220d1ce5ff53c5c600611cfa
2024-03-04 08:23:26 +01:00
jenkins-bot 0b9f7f907d Merge "Introduce MultiGadgetRepo to facilitate repo migration" 2024-03-02 18:43:01 +00:00
Siddharth VP a629d7f71d Introduce MultiGadgetRepo to facilitate repo migration
MultiGadgetRepo is a wrapper around two or more GadgetRepos so that
they can be used at the same, facilitating migration from one repo to
another.

If a gadget appears in both repos, the definition in the first repo
takes precedence, and a warning is shown on Special:Gadgets.

This can be enabled to wrap GadgetDefinitionNamespaceRepo and
MediaWikiGadgetsDefinitionRepo by setting $wgGadgetsRepo to
'json+definition'. In this configuration, once a new JSON definition
exists for the same name, it is used instead of the old one, and the
old one can then safely be removed at a later time in the safe
knowledge that it is no longer used.

Adapted from If3cc5e22e9812d0fd1a9e8e269ea74a7f667dadd

Bug: T140323
Co-authored-by: Kunal Mehta <legoktm@debian.org>
Change-Id: Ibad53629e63ec8713d7a3b84a19838b94600588e
2024-03-02 18:22:04 +00:00
Translation updater bot 773af86f13 Localisation updates from https://translatewiki.net.
Change-Id: Ibff44c7bd8349e26056fd04252b6d302f63750ae
2024-02-29 08:36:00 +01:00
Translation updater bot 820a010016 Localisation updates from https://translatewiki.net.
Change-Id: I6d53731629c54c66d2888ffa83a8aa3145fc8175
2024-02-26 08:36:07 +01:00
jenkins-bot 88e934c6cb Merge "Goodbye Gadget/Gadget_definition namespaces!" 2024-02-24 16:50:56 +00:00
Translation updater bot 305ef9b6ce Localisation updates from https://translatewiki.net.
Change-Id: I34e80febbc04435f64bf3820ce76a0b1b8f19187
2024-02-23 08:44:27 +01:00
Translation updater bot 1093394176 Localisation updates from https://translatewiki.net.
Change-Id: I979a52f6620f13b716e5833f58406cef74644426
2024-02-22 08:43:35 +01:00
Translation updater bot d8130a9cb0 Localisation updates from https://translatewiki.net.
Change-Id: I7fbc148288412de930e2d5c9acd8de6ebbd99649
2024-02-15 13:28:16 +01:00
Translation updater bot c8a8348fd9 Localisation updates from https://translatewiki.net.
Change-Id: I1bf93d9e612090fa09fc4d01a030ba48a7eb6793
2024-02-14 08:18:48 +01:00
Timo Tijhof fce6fdfb20 Goodbye Gadget/Gadget_definition namespaces!
== What ==

* Remove the empty Gadget and Gadget_definition namespaces.
* Remove the "gadgets-definition-edit" user right.
* Remove need for custom namespace permissions that previously
  had to extend editsitejs to apply to NS_GADGET.

== Why ==

Simplify the (unused) "GadgetDefinitionNamespaceRepo" backend for
Gadgets 2.0 by making it less radically different from the status quo.

The experimental 2.0 branch will now make use of the "gadget definition"
content model via "MediaWiki:Gadgets/<id>.json" pages, instead of
through a dedicated namespace.

When I first worked the Gadgets 2.0 branch, content models
were not a thing in MediaWiki, and interface-admin wasn't a thing yet
either. Now that we have per-page permissions and per-page content
models, we don't really need a separate namespace.

This follows the principle of least surprise, and fits well with other
interface admin and site configuration tools such as:
- Citoid, MediaWiki:Citoid-template-type-map.json,
- VisualEditor, MediaWiki:Visualeditor-template-tools-definition.json,
- AbuseFilter, MediaWiki:BlockedExternalDomains.json,
- the upcoming "Community Config" initiative.

If/when we develop the SpecialPage GUI for editing gadget definitions,
this can save its data to these pages the same as it would in
any other namespace. Similar to how Special:BlockedExternalDomains
operates on MediaWiki:BlockedExternalDomains.json.

See also bf1d6b3e93 (I6ffd5e9467), which recently removed the
gadgets-edit user right in favour of the editsite{css,js,json} rights.

Change-Id: I5b04ab251552e839087d0a8a6923d205adc7f771
2024-02-13 13:30:26 +00:00
Translation updater bot 64c44829b9 Localisation updates from https://translatewiki.net.
Change-Id: I41e50302641f7b7bedc4912b0cb811957c27e534
2024-02-12 14:49:39 +01:00
Timo Tijhof a8c3eb1282 Move "gadgets" message to "special-gadgets"
This makes way for "MediaWiki:Gadgets/<id>.json" to be used free of
any confusion or misinterpretation about the subpage being a
translation of "MediaWiki:Gadgets".

Change-Id: Icb68ce6c26a83d7201a97a5406f8752b3c5b0855
2024-02-09 19:10:54 +00:00
Translation updater bot 86000a8718 Localisation updates from https://translatewiki.net.
Change-Id: I19ae09d1edb8ae8fdb4bc8ad33eb53d1be466526
2024-02-05 08:49:44 +01:00
Translation updater bot 5ec56bef7d Localisation updates from https://translatewiki.net.
Change-Id: I82f87498d700c4be85ef94bd0dd03c273aa8fae0
2024-01-31 08:29:04 +01:00
Translation updater bot 11fa3db4a4 Localisation updates from https://translatewiki.net.
Change-Id: I7c634517cd4dfbf7bbcf967ce726d239870fae6a
2024-01-30 09:39:04 +01:00
Translation updater bot e87235edaf Localisation updates from https://translatewiki.net.
Change-Id: Icb93c28cc7e06f137617865c45da70b6b405ced1
2024-01-28 16:06:41 +01:00
James D. Forrester 27f913cc96 Drop RL targets definitions from module class, and validation / error code
Bug: T328497
Change-Id: If6d742ea719e4c8db9d915e8297d915d2150ef50
2024-01-24 12:11:20 -05:00
Translation updater bot b0cb91e055 Localisation updates from https://translatewiki.net.
Change-Id: I5a33f2fa139b25e0139e7b02ed8025ad31799c65
2024-01-19 09:17:01 +01:00
Translation updater bot baff83d550 Localisation updates from https://translatewiki.net.
Change-Id: I58d3aefa499ab19d0f7a70b4c7e0469abf608563
2024-01-17 08:37:18 +01:00
Translation updater bot 4b656f781d Localisation updates from https://translatewiki.net.
Change-Id: Icabbb59cf05b0eb64854a0a3ad3eec35032a2570
2024-01-16 08:25:44 +01:00
Translation updater bot 474e6d7d55 Localisation updates from https://translatewiki.net.
Change-Id: I629f7a203e613030587c43c8d5ca7f794d6fe41b
2024-01-15 08:24:27 +01:00
Translation updater bot 549e9c015d Localisation updates from https://translatewiki.net.
Change-Id: I8bdfa3981c37668489f8ad700943edb06a100a17
2024-01-12 09:00:18 +01:00
jenkins-bot 50d2405a43 Merge "Add validations for skins and rights" 2024-01-11 17:03:15 +00:00