Commit graph

2311 commits

Author SHA1 Message Date
Translation updater bot efb1c49a39 Localisation updates from https://translatewiki.net.
Change-Id: I6230aba87f1efa3bc4905adbb1676c99520a533d
2023-12-04 09:06:05 +01:00
Translation updater bot 92b6486416 Localisation updates from https://translatewiki.net.
Change-Id: Id42759e2f580233c6100b4c0250c96d4ecf6c740
2023-12-01 09:40:56 +01:00
jenkins-bot ca8061b4a5 Merge "Turn deprecated/required/suggested checkboxes into select widget" 2023-11-30 10:53:32 +00:00
Translation updater bot 8e422b33ef Localisation updates from https://translatewiki.net.
Change-Id: I2f39c5aa42e859fbdbc10c1e40a5944f48aabd8f
2023-11-27 08:33:36 +01:00
Translation updater bot faced39260 Localisation updates from https://translatewiki.net.
Change-Id: Id98b83891161173325c969df66cd0bc8b1142b93
2023-11-23 11:57:36 +01:00
Thiemo Kreuz b2574932e9 Turn deprecated/required/suggested checkboxes into select widget
* deprecated means "please do not use this".
* required means "you must use this".
* suggested means "it's a good idea to use this".
* optional means "you typically don't need this".

There is no combination that makes any sense. They are really
exclusive to each other.

Still we have to keep the three checkboxes for backwards
compatibility reasons. It was always possible (and will probably
continue to be possible) to have more than one of the three fields
enabled. While users like VisualEditor will make a good guess (e.g.
ignore the rest when "deprecated" is checked) I really think we
should not attempt to hide (and auto-fix) it in this dialog. That's
why the proposed code continues to show the old checkboxes when
more than one is checked.

Bug: T202851
Change-Id: I994268d658602761b180f489bedb50b91fe0c419
2023-11-16 14:06:06 +01:00
thiemowmde 10a43a9ae3 Minor code cleanups in Hooks class
Change-Id: Ied3d5241df04b3fd070319070c0addfd3856e3bf
2023-11-16 13:59:24 +01:00
Translation updater bot 7d010a616f Localisation updates from https://translatewiki.net.
Change-Id: I001adb7d1a083a83da6b698c1a1b8a0926c63fb6
2023-11-13 08:42:25 +01:00
Bartosz Dziewoński f2a60308aa Use expression builder instead of addQuotes()
Bug: T350960
Change-Id: Ib994ad36427f1404e3cc011a6187799842e08df0
2023-11-11 00:30:41 +01:00
thiemowmde b8e437a38d Introduce prop var to reduce code duplication in Dialog.js
Most of the code is already using a "prop" variable for the same
purpose. I hope that following the same pattern everywhere makes the
code easier to read.

Change-Id: I00e344b9041e1cb7e2dee129b17549959f32e4d9
2023-11-07 11:48:08 +01:00
Translation updater bot d8af17875e Localisation updates from https://translatewiki.net.
Change-Id: I2b16157769568bd7eb92dce06edbb42d4922e235
2023-11-06 08:57:59 +01:00
Translation updater bot 7fb278fa94 Localisation updates from https://translatewiki.net.
Change-Id: I465d55200b72f34b071a1574a0e0d725fc7dbb7b
2023-11-01 09:09:02 +01:00
jenkins-bot aeb7f4eb4b Merge "build: Update linters" 2023-10-26 15:26:11 +00:00
Ed Sanders a180f5db36 editTemplatePage dialog: Fix typo in comment
Change-Id: I3db668ad01c2f78ca2c8873660b7685d7e6e6918
2023-10-26 13:58:38 +01:00
Ed Sanders 225e9ec1c0 Simplify multiline config generation
Change-Id: I4551c90ef8360d42c8b74848ce437e20bb792a55
2023-10-26 13:56:23 +01:00
Ed Sanders a53a1bfa5e build: Update linters
Change-Id: I1d32a8c331d7abae89d8fa539e0af4ee96935575
2023-10-26 13:52:08 +01:00
Bartosz Dziewoński f150c176e4 TemplateData editor: Use built-in 'allowLinebreaks' option
New in OOUI v0.48.2.

Unlike the old version, this also prevents inserting line breaks by
copy-paste and other methods.

Change-Id: I2fe1b7cfe70ebb6b66a9dfdf012522b574f6e774
2023-10-25 08:27:57 -04:00
Translation updater bot a70ac9aa8a Localisation updates from https://translatewiki.net.
Change-Id: Ie23e695c561e9d3c7bd5e2cee5badb5e1d0da031
2023-10-24 09:38:44 +02:00
Umherirrender 46d9842652 Replace empty() with falsy check
empty() should only be used to suppress errors
When the type of the variable is array,
a falsy check is the same (checks for null, false and empty array)
Found by a new phan plugin (T234237)

Change-Id: I17e48498c9be9c542b48a9d77c5574fba9f38d4d
2023-10-21 21:58:58 +02:00
Translation updater bot 3518d97b9c Localisation updates from https://translatewiki.net.
Change-Id: If5a6e8fadca05179a89426b821411805da629fad
2023-10-13 08:56:51 +02:00
Translation updater bot 0fbd00556e Localisation updates from https://translatewiki.net.
Change-Id: I67cf7d3090d089e2336cc449f7957dd23a253f37
2023-10-09 08:57:09 +02:00
Translation updater bot f4bbba759a Localisation updates from https://translatewiki.net.
Change-Id: I8b9669cda5a52f31a7b086dca676443f59090b5d
2023-10-02 10:58:24 +02:00
jenkins-bot 3485282894 Merge "Inject MainConfig service to TemplateData hooks" 2023-09-26 03:44:09 +00:00
thiemowmde 3c360bfeea Remove bogus updateParamDetailsLanguage call with no language
Turns out this was always pointless. Nothing the method does makes
sense without a language. A default language is only choosen much
later as part of getSetupProcess, and the method called a second
time, this time with a language.

Issue introduced a long, long time ago and finally surfaced via
Ifcbb877.

Bug: T238329
Change-Id: I47c8ce16107ebe7a1d955665dc890bef80ec892a
2023-09-25 14:42:01 +00:00
Translation updater bot 9fd7a035af Localisation updates from https://translatewiki.net.
Change-Id: I960fe04636c3365f8a85587363c2376106ab41ea
2023-09-25 08:47:06 +02:00
Sam Wilson ab3a80555b Inject MainConfig service to TemplateData hooks
Removes the global config variable.

Change-Id: I67c266a3f5189365de506230d1a7064a7427bff6
2023-09-25 10:40:05 +08:00
thiemowmde f302f65dbb Use correct BCP 47 language codes in lang="…" attributes
A small mistake made in I7a82143. This is only relevant for very few
(but critical) language codes. For example, the dialog allows to add
the MediaWiki code "zh-classical". This needs to be translated to
"lzh", but only when we use it directly in HTML.

Bug: T238329
Change-Id: Ifcbb877fb6a348937e85a82459e924548f5ca856
2023-09-21 17:33:41 +02:00
jenkins-bot 10e1c26580 Merge "Simplify client-side translateObsoleteParamTypes implementation" 2023-09-21 06:18:34 +00:00
jenkins-bot ae345d50ac Merge "Remove unused return true from addParam() method" 2023-09-20 14:17:31 +00:00
Translation updater bot fa8076c902 Localisation updates from https://translatewiki.net.
Change-Id: I0cc42c981828394e19a4472bcc5798896caa4914
2023-09-20 08:55:57 +02:00
Translation updater bot 6ad8514fa6 Localisation updates from https://translatewiki.net.
Change-Id: Ieb03bc16a22b69317acfd60ba6344e371960f9ac
2023-09-19 09:26:11 +02:00
thiemowmde ef357ab4a2 Remove unused return true from addParam() method
It's always true and doesn't make any difference because of this.
I think the idea was to do some validation in the method. This
never happened and is done outside of the method instead (better
separation of concerns).

This is split from I1655174 to make it easier to review.

Change-Id: I48b7da75659365e5a2f72b680d40ee4b5b2904a2
2023-09-18 17:46:49 +02:00
thiemowmde aa0d7389ea Simplify client-side translateObsoleteParamTypes implementation
Reasons:
* It's not the job of this code to validate the incoming types. This
  happens server-side.
* The new code reflects better what actually happened: we stopped
  using the prefix "string/".
* This was not (probably never) in sync with the server-side
  validation. Some types got replaced, some didn't.

Change-Id: I0a35ca334c9e243dee548b271ddb3e1ca4498611
2023-09-18 17:31:12 +02:00
thiemowmde 8c4b970eab Use more consistent variable names in Dialog class
This is split from I1655174 to make it much easier to review. This
patch here doesn't do anything but rename existing variables to
follow existing, less confusing naming schemes.

Change-Id: Ibd9db5ca5a355246eeaed98d48edc835659ec2c5
2023-09-18 17:17:11 +02:00
Translation updater bot 57453da932 Localisation updates from https://translatewiki.net.
Change-Id: I9ca068bd0068ab6633662570107a3b29878f47a6
2023-09-18 08:45:04 +02:00
thiemowmde 61ac3f9645 Remove unused lang argument from Dialog.updateParamDetailsLanguage
It's always `this.language` anyway.

Change-Id: Iaad6db9c5406c36307e827416ab8c08d80003f8b
2023-09-15 15:07:32 +02:00
thiemowmde 9eb2e46f37 Remove two messages that are unused since 2014
The "uneditablefield" was added in 2014 via I9b13e2f, apparently
as a temporary workaround. It was apparently not possible to edit
multi-lingual language object back then.

All code related to that was removed about 5 months later via
I985ea03. The patch made it possible to edit such fields. They just
forgot to remove the message.

The "actions" message was added via I863a819. Apparently used for
an "action" table column where parameters could be deleted. This
also got lost in the same big rewrite in I985ea03.

Change-Id: I57329bef8de10ee19e1904d33605d2102fd22741
2023-09-14 18:01:35 +02:00
Translation updater bot 616e136342 Localisation updates from https://translatewiki.net.
Change-Id: I86a98130a769ccd2be3874647715a601b6cec8fd
2023-09-11 09:05:10 +02:00
Translation updater bot ba1a5092f2 Localisation updates from https://translatewiki.net.
Change-Id: I7a26524c6b736d305a10287b249ba3ec522c153a
2023-09-07 11:13:54 +02:00
thiemowmde 8f81812242 Enable and enforce a few extra PHPCS sniffs
This is not really anything new. Most code already followed these
sniffs. This patch just fixes the remaining exceptions. Also:
* Remove PHPDoc blocks that don't add anything but just repeat the
  strict types.
* Remove @file comments in favor of class-level comments.
* Add strict types where possible, most notably some `void`.

Change-Id: Iff6872dff68170b0fc4e82ac2ba3cad385e8773e
2023-09-06 18:15:22 +02:00
jenkins-bot bde2188280 Merge "Show much more actionable context when paramOrder is incomplete" 2023-09-04 13:45:24 +00:00
jenkins-bot 491fed6bc6 Merge "Fix "Add new map" button overflowing in other languages" 2023-09-04 13:37:12 +00:00
jenkins-bot cae3c4f41e Merge "Add lang="…" and dir="auto" to inputs that support languages" 2023-09-04 13:35:26 +00:00
Translation updater bot 3cafc0ea74 Localisation updates from https://translatewiki.net.
Change-Id: I78e05e6489e33083b6fd0a5f523600f55a29a0fa
2023-09-04 08:45:14 +02:00
jenkins-bot 76e4322516 Merge "Replace calls to deprecated ApiPageSet methods" 2023-09-01 13:27:03 +00:00
thiemowmde 39602bdb8d Replace calls to deprecated ApiPageSet methods
Bug: T339384
Change-Id: Iafc14bb31fd37d38fe0cf53c81f0b774f939f6ef
2023-09-01 07:08:25 +00:00
Translation updater bot 7ffff7e221 Localisation updates from https://translatewiki.net.
Change-Id: I0b4667990977cb6068657d05e7a14b3eead09e38
2023-09-01 09:03:38 +02:00
jenkins-bot 4aaa893c4b Merge "Load GUI on action=edit if page has templatedata even outside NS_TEMPLATE" 2023-08-30 19:42:09 +00:00
thiemowmde eed932e3fb Add lang="…" and dir="auto" to inputs that support languages
The first patch I5f52fe3 worked only for fields with an existing
value. Turns out it's undefined for new fields.

Bug: T238329
Change-Id: I7a8214335b720c9ab738f6c4e47febbc0abf7dc4
2023-08-29 11:04:50 +02:00
Translation updater bot f8b327da6e Localisation updates from https://translatewiki.net.
Change-Id: I0bf6742eb849df73232bae926014208b82505a6e
2023-08-24 09:52:31 +02:00