Commit graph

2305 commits

Author SHA1 Message Date
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
jenkins-bot 9f280126c0 Merge "Simplify test data providers with yield" 2023-08-23 22:30:21 +00:00
jenkins-bot cbba18a667 Merge "Add lang="…" and dir="auto" to inputs that support languages" 2023-08-23 14:00:54 +00:00
thiemowmde 7650219451 Add lang="…" and dir="auto" to inputs that support languages
This might not be perfect but hopefully helps a lot already.

Bug: T238329
Change-Id: I5f52fe3b69c8477550d844cce18ab142e0ec6f4b
2023-08-23 14:11:08 +02:00
thiemowmde c3eb1abb90 Fix "Add new map" button overflowing in other languages
E.g. in German it says "Neue Zuordnung hinzufügen". The long string
peaks into the other UI elements because OOUI enforces some `nowrap`
for no good reason.

Change-Id: Ib5f8584d4ac652479d6f646dcaa8cf06654832fd
2023-08-23 13:59:03 +02:00
thiemowmde 416c3d4f45 Make use of the ??= and ?: operators where it makes sense
This patch also removes small pieces of code from tests that are
never called, as it turns out.

Change-Id: I10ce18339135fefd9a99e0613dc6bfc457ddf4df
2023-08-23 09:24:50 +02:00
thiemowmde b522972cac Simplify test data providers with yield
Change-Id: I6315ad66bcfa9437e1473d59776404c280b8ce4f
2023-08-23 09:20:25 +02:00