Commit graph

1678 commits

Author SHA1 Message Date
jenkins-bot e02ad426b8 Merge "Remove dead code from #titleparts implementation" 2022-11-08 22:46:18 +00:00
Translation updater bot b3feb7198b Localisation updates from https://translatewiki.net.
Change-Id: Ia12244836fdadbcf86513f17a148d6349bb043e5
2022-11-07 08:35:08 +01:00
daniel f97da7df26 Use HookContainer to register hooks on the fly.
Manipulating $wgHooks is deprecated and unreliable.
Use HookContainer instead.

Needed-By: Iddcb760cf8961316d6527e81b9aa968657d8354c
Change-Id: I413cd2ae43fe4b13917d61a50e190b536fce7279
2022-11-05 20:02:09 +00:00
Translation updater bot 7bf2843201 Localisation updates from https://translatewiki.net.
Change-Id: If55384ec9683b8555cd77a26e6a81c06937f0eea
2022-11-04 09:03:31 +01:00
thiemowmde 928a21605a Remove dead code from #titleparts implementation
It's impossible that explode() returns an empty array. This is dead
code.

Also add tests for the previously untested #titleparts function to
make sure this patch doesn't change any behavior. Including weird
usages with negative numbers.

Change-Id: Ib0d2503fdb0900bf6db3ebbc26d2ff648dbfc86d
2022-11-03 18:30:49 +01:00
thiemowmde ee66f0bfff Simplify weirdly complex ParserFunctions::ifexistInternal()
Personally I find the code much more readable when the private
helper method returns a bool.

Note this patch is intentionally tiny and focusses exclusively on
this one detail. There are many parser tests to prove that nothing
changed.

Change-Id: Ibe07c27aab9cbfc4705769820be679cd54acb79b
2022-11-03 17:50:41 +01:00
thiemowmde 129745609b Remove unused default values from method parameters
These methods are private and never called without these parameters.
These values are dead code.

Change-Id: I422f2d28f60cf3caf6234e5421b3613f80c1e6f1
2022-11-03 07:32:04 +00:00
libraryupgrader fd724482c6 build: Updating minimatch to 3.0.8
* https://github.com/advisories/GHSA-f8q6-p94x-37v3

Change-Id: I6a3c60602b45daf0a9e4b43f858d41c3dcf2299d
2022-10-21 12:27:00 +00:00
jenkins-bot b646b6b528 Merge "build: Updating mediawiki/mediawiki-phan-config to 0.12.0" 2022-10-13 13:28:57 +00:00
Translation updater bot cb13f4217e Localisation updates from https://translatewiki.net.
Change-Id: I40dcc6bb77cb22577c26a878ae991fa13fa68a42
2022-10-13 08:09:31 +02:00
libraryupgrader 57d87a2e33 build: Updating mediawiki/mediawiki-phan-config to 0.12.0
Change-Id: Ica980c2a25fb00feb6f9775ecb2d7830a3559a95
2022-10-10 21:05:20 +00:00
Translation updater bot 809ba0839d Localisation updates from https://translatewiki.net.
Change-Id: Iecf2cbc29ca16e9eedb2801cc26682e222984764
2022-10-10 10:20:51 +02:00
libraryupgrader f10f99636a build: Updating grunt-banana-checker to 0.10.0
Change-Id: Ifaf2028616809e842d5994c1c010d9c277e3f712
2022-10-07 03:37:19 +00:00
C. Scott Ananian f11b1099d0 Replace Parser::getFunctionLang() with ::getTargetLanguage()
Parser::getFunctionLang() is being deprecated.  These two functions
have been identical since 7df3473cfea59df53debb7a9eefffed8a7f20fb3
in MW 1.19 (2012) and this extension already requires MW >= 1.35.

Bug: T318860
Change-Id: I87a7ceedce173f6de4bb6722ffe594273c7b0359
2022-09-28 15:59:38 -04:00
jenkins-bot 4aae195626 Merge "Replace deprecated Language::isValidBuiltInCode and Language::factory" 2022-09-28 19:58:18 +00:00
Translation updater bot 46187a7441 Localisation updates from https://translatewiki.net.
Change-Id: Ibb14702c4d364a59e7cb5765393973eca19e8310
2022-09-28 08:22:26 +02:00
Fomafix 88e6b48dd0 Avoid confusion about single quotes in README
Change-Id: I6198dbfff86528e976c9a86b5c828fca908d2a4d
2022-09-17 10:09:14 +00:00
Fomafix 6468bf9ebb Replace deprecated Language::isValidBuiltInCode and Language::factory
Change-Id: I4c5bf4d68bcb79da33864dbffe395e3818050eb4
2022-09-17 10:00:50 +00:00
Translation updater bot a29459d71c Localisation updates from https://translatewiki.net.
Change-Id: I21e3cefe84b3aab25ad4328a44169e642a56ede6
2022-09-01 09:34:24 +02:00
Fomafix cd17cb4a18 Remove LEFT-TO-RIGHT MARK (U+200E) from comments and messages
'LEFT-TO-RIGHT MARK' (U+200E) is not needed in the source code
comments and messages.

c8caf26ffd9 removed already the LRM/RLM from Names.php.

Change-Id: Ic9856b680b94d41168eaee14e596c6b21420ad22
2022-08-10 21:23:14 +00:00
Translation updater bot 5c390830fe Localisation updates from https://translatewiki.net.
Change-Id: I1e19fcdc955d77529a4c5ff63707d11825d56282
2022-07-25 08:38:26 +02:00
Translation updater bot 50a5489982 Localisation updates from https://translatewiki.net.
Change-Id: I177a93341735225fea74e274294e62c8f1cc7cdb
2022-06-22 08:13:49 +02:00
libraryupgrader 0c277db498 build: Updating grunt to 1.5.3
Change-Id: I0f1acd10895db307099efc9edf1f5f44ae240c80
2022-05-26 21:03:00 +00:00
libraryupgrader 5d7fb4eda7 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 38.0.0 → 39.0.0
* mediawiki/mediawiki-phan-config: 0.11.0 → 0.11.1
* php-parallel-lint/php-console-highlighter: 0.5.0 → 1.0.0
* php-parallel-lint/php-parallel-lint: 1.3.1 → 1.3.2

npm:
* eslint-config-wikimedia: 0.20.0 → 0.22.1
* grunt: 1.4.0 → 1.5.2
* grunt-eslint: 23.0.0 → 24.0.0
* async: 3.2.0 → 3.2.3
  * https://github.com/advisories/GHSA-fwr7-v2mv-hh25

Change-Id: I54fc48633d5da238935d565ff32e8e0a7179ab0d
2022-05-21 09:29:14 +00:00
Translation updater bot 57fe1bb148 Localisation updates from https://translatewiki.net.
Change-Id: I1327eec6b23749526e2d1e993b0669f14b172e3f
2022-05-02 08:20:10 +02:00
Translation updater bot 277507b12a Localisation updates from https://translatewiki.net.
Change-Id: I3bc27985840a01d993369deb78ba5cb86495d35b
2022-04-29 08:43:32 +02:00
Translation updater bot f7145ab8a4 Localisation updates from https://translatewiki.net.
Change-Id: I2427a0559e9c3e7e896a46437e0121dbfd875ef2
2022-04-20 08:19:08 +02:00
Translation updater bot a9d71405bb Localisation updates from https://translatewiki.net.
Change-Id: I54a1ba53e5f7d5034c9bdd2b4b5cf18d2349afdf
2022-04-18 10:06:35 +02:00
Translation updater bot 3e6da3da0b Localisation updates from https://translatewiki.net.
Change-Id: I798159e64dc477202865ec6e908bc7893b4a297b
2022-04-11 08:14:28 +02:00
Translation updater bot c99d12b648 Localisation updates from https://translatewiki.net.
Change-Id: I471bfca5e2cdbaf8a69f8d12f5a91efb3afb9997
2022-03-08 09:01:58 +01:00
Reedy f647423039 Correct namespacing to match best practices
Bug: T303105
Change-Id: Ic09ed23c4248e74f93e5807212fe73d241251281
2022-03-05 15:06:59 +00:00
Translation updater bot 6fe5971325 Localisation updates from https://translatewiki.net.
Change-Id: Ic9b01c1464006010a5f2d8d406dc8b715f797531
2021-12-13 08:21:59 +01:00
Translation updater bot d5e0af669d Localisation updates from https://translatewiki.net.
Change-Id: I755ddf79655fd0870ede14f30185a06ab3ba4a33
2021-12-09 08:22:45 +01:00
Translation updater bot 48c8e854b1 Localisation updates from https://translatewiki.net.
Change-Id: I6833e6feb18c8340efdcc76aee427ddcf937328a
2021-12-08 08:12:45 +01:00
Translation updater bot c456660778 Localisation updates from https://translatewiki.net.
Change-Id: I03f09c6eba0cd44651243911772e1ea1882e676b
2021-11-30 08:22:03 +01:00
Translation updater bot 94fc61a457 Localisation updates from https://translatewiki.net.
Change-Id: Icd35242233df7e2408b152ec1bb3458e8d0a114d
2021-11-22 09:03:31 +01:00
jenkins-bot 7fce8ab74b Merge "Fix and update PHPDoc type hints" 2021-11-21 00:09:47 +00:00
jenkins-bot 333b74ea35 Merge "Use more IDE-friendly callback syntax for parser hooks" 2021-11-21 00:04:32 +00:00
jenkins-bot af7d9aa503 Merge "Use wfLoadExtension in README" 2021-11-20 22:46:28 +00:00
Fomafix e04f4e0d73 Use wfLoadExtension in README
The old way with ParserFunctions.php is not supported anymore.

Change-Id: I530dbc51a153d87c3e460767e57ddc587bd5f448
2021-11-20 18:38:15 +00:00
Thiemo Kreuz ce22d48123 Fix and update PHPDoc type hints
The parameters passed to these parser hook handler functions have
guaranteed types. They are either strings or an array of PPNode
objects, depending on the SFH_OBJECT_ARGS flag. When a parameter is
missing the default value from the function header is used.

Change-Id: Ie0196f43f94cf002110c07ad2de30adfa6b77179
2021-11-20 08:52:38 +00:00
Thiemo Kreuz dbe77d7edf Use more IDE-friendly callback syntax for parser hooks
This way my IDE (in this case PHPStorm) can actually follow these
references. Strg+click brings me straight to the function, and back.
I assume other tools, linters and such might benefit the same way.

I think this is worth having a bit more duplication.

Change-Id: I16260443e0f1513b9a4715874a513c7a399b5d92
2021-11-19 18:25:10 +01:00
Translation updater bot 7dc5d1e9e2 Localisation updates from https://translatewiki.net.
Change-Id: I17e82050c30868a1bfd3a7a8744cbac6b000c88f
2021-11-17 08:30:52 +01:00
Translation updater bot 0fc6624120 Localisation updates from https://translatewiki.net.
Change-Id: I656b8667e662ace4c15cece6e54bef06f757b2da
2021-11-15 08:12:24 +01:00
Translation updater bot 9b3392bb7f Localisation updates from https://translatewiki.net.
Change-Id: Ib640722c027800b5840d04fe4c676b1c9603650f
2021-11-11 10:02:49 +01:00
Translation updater bot b10e53e48b Localisation updates from https://translatewiki.net.
Change-Id: I091c2b5840e64b6846e5ce2139b64615642f97e3
2021-11-09 07:29:29 +01:00
Translation updater bot cf0f480f0b Localisation updates from https://translatewiki.net.
Change-Id: Ie3fefe16ecc245ea12d30ddab2f97323cde63868
2021-11-08 08:17:17 +01:00
Translation updater bot c7b1475e9a Localisation updates from https://translatewiki.net.
Change-Id: Idaa7498b6673561f049b2505660c4f8a94d377a4
2021-11-03 08:21:04 +01:00
Translation updater bot 0d51ae394f Localisation updates from https://translatewiki.net.
Change-Id: I7a36e381117ea6fad5b17358fcc20fef8be16688
2021-11-01 09:34:19 +01:00
Translation updater bot bc02306dd9 Localisation updates from https://translatewiki.net.
Change-Id: Ied10a3601935f163ee515fa26120e4c6d47cb314
2021-10-29 08:22:13 +02:00