Commit graph

2292 commits

Author SHA1 Message Date
Translation updater bot 11ab70abaf Localisation updates from https://translatewiki.net.
Change-Id: I0cd4550da713727db89388d282e2594c56048b6d
2023-10-18 07:23:40 +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
Translation updater bot 10f2f21e86 Localisation updates from https://translatewiki.net.
Change-Id: I861ae80103d1fc4e065be969464f58c475a4c732
2023-08-23 08:40:37 +02:00
thiemowmde bb7b801b64 Show much more actionable context when paramOrder is incomplete
So far we show nothing but the index in the "paramOrder" array. This
is especially useless when a parameter is missing. The index just
points to the end of the array then.

Same when an unknown parameter appears. What the user needs is not
the index but the name of the unknown parameter.

I played around with a few formats. As suggested in this patch:
 Required property "paramOrder[ "foo" ]" not found.
 Invalid value for property "paramOrder[ "foo" ]".

A possible alternative is:
 Required property "paramOrder[0] ("foo")" not found.
 Invalid value for property "paramOrder[0] ("foo")".

Bug: T340377
Change-Id: I1dbef1b6e585d5b972a0c9a373a040aee6027cf3
2023-08-21 12:52:42 +02:00
Timo Tijhof 1f105ed5f6 Load GUI on action=edit if page has templatedata even outside NS_TEMPLATE
Bug: T189989
Bug: T300676
Change-Id: I372e29af7f14fba6ebc60bb6ea025b8e1015f2a7
2023-08-21 10:22:45 +00:00
Translation updater bot db882362a4 Localisation updates from https://translatewiki.net.
Change-Id: Iabc6c50633fac422bd9f7782e520a16dde70f89a
2023-08-21 08:48:36 +02:00
gerritbot cfd2e5b664 Replace some moved Title class uses, now MediaWiki\Title\Title
Bug: T321681
Change-Id: I2a7aaadc47dd068ccea8fd8110054433973df52c
2023-08-19 18:11:41 +00:00
jenkins-bot fcd0fe2a2e Merge "build: Update MediaWiki requirement to 1.41" 2023-08-19 09:46:59 +00:00
James D. Forrester 661528f8c9 build: Update MediaWiki requirement to 1.41
All extensions in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: I2c7de2ce136d110704190b3dc288138a29d01933
2023-08-19 14:08:49 +08:00
James D. Forrester 879547ce54 build: Update MediaWiki requirement to 1.41
All extensions in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: Iab8dc9403341cec22d626f9d448e313d3c87e987
2023-08-19 14:08:44 +08:00
Translation updater bot 462dc9eeec Localisation updates from https://translatewiki.net.
Change-Id: Id80347c874ea4682ac9e7a2e9a8bf63e61ec6712
2023-08-17 12:10:52 +02:00
jenkins-bot 577e6ce77f Merge "Use HookHandlers for core hooks" 2023-08-16 00:57:45 +00:00
Umherirrender 8bd3dbc58c Use HookHandlers for core hooks
The use of "HookHandlers" attribute in extension.json makes it possible
to inject services into hook handler classes in a future patch.

Bug: T271031
Depends-On: Ic2d188d2c332ab8afeb5454fb5a956c8ba5670ae
Change-Id: Idf4cf94a0e4fae31a5c1f6c3dbf319c0d6913cd7
2023-08-15 13:03:15 +02:00
Translation updater bot de7e1cdd4c Localisation updates from https://translatewiki.net.
Change-Id: Iac6e159b6289ee0f5e9e9ad97ec74a2d60a9121e
2023-08-15 08:26:48 +02:00
Translation updater bot 2a6708bfa0 Localisation updates from https://translatewiki.net.
Change-Id: I87c7b5a4410b51e0440c60f4ac9e09a1158af7e7
2023-08-11 09:01:57 +02:00