Commit graph

1847 commits

Author SHA1 Message Date
Translation updater bot f61d349d6c Localisation updates from https://translatewiki.net.
Change-Id: I3ce54a657608dd3270ee3cf4fd116b27e776909c
2023-03-28 07:51:55 +02:00
Translation updater bot 4e8f19ac27 Localisation updates from https://translatewiki.net.
Change-Id: I6866df70cc6c34dfeeffb7704c6deeede83faf8d
2023-03-21 08:23:56 +01:00
Translation updater bot 41e7742128 Localisation updates from https://translatewiki.net.
Change-Id: I341e82d6f743b13ee88d3f53adecede36f1f8fdc
2023-03-14 08:14:43 +01:00
Translation updater bot 2f47ad447f Localisation updates from https://translatewiki.net.
Change-Id: I02d55f9f0941ae87acae3c7ea628614aa7d92811
2023-03-07 07:51:11 +01:00
Translation updater bot 5ccdc917f8 Localisation updates from https://translatewiki.net.
Change-Id: I0469b02c7c85817f9a3e64e788afc65991e4fda2
2023-02-28 07:07:12 +01:00
Reedy 34e2ecddf6 ScribuntoException: Use value property not dynamic property
Bug: T330524
Change-Id: I69a102497fffb939c849d2836302068ac9eff3d0
(cherry picked from commit 033c69cfab)
2023-02-25 13:25:01 +00:00
Umherirrender 688184b1ff tests: Fix i18n part of test data to match new translation
https://translatewiki.net/w/i.php?title=MediaWiki:Duration-minutes/kaa&oldid=11412949

Follow-Up: Ibc5e8cee9e076c8952eb24839d5e97d4eca4ccf4
Change-Id: If352609c5ad7d9a52a94c737cac3f0f1a47de2e0
(cherry picked from commit f15b30cdb7)
2023-02-25 13:24:29 +00:00
Translation updater bot 1f5bfea5bf Localisation updates from https://translatewiki.net.
Change-Id: I9334b4153103656db4c4a84c330f7350cbfdd6d5
2023-02-14 07:17:06 +01:00
Translation updater bot df99db152b Localisation updates from https://translatewiki.net.
Change-Id: I6cf230ff75200cd7230f4b22022ed8ed9dba536b
2023-01-24 07:16:15 +01:00
Translation updater bot 3d440716d2 Localisation updates from https://translatewiki.net.
Change-Id: I4447948fee1bb1b617357e25fed06466a3fee2ae
2023-01-17 07:09:18 +01:00
libraryupgrader 3ec8c65d6c build: Updating json5 to 2.2.2
* https://github.com/advisories/GHSA-9c47-m6qq-7p4h

Change-Id: I9768e3683d6d8b90bb7b7984c3f88e3ca9b78ac3
2022-12-29 12:36:25 +00:00
Translation updater bot c8174cd170 Localisation updates from https://translatewiki.net.
Change-Id: I2aeabe9b0ac4ee6b54cf1c480e31bff5e3876a24
2022-12-27 07:12:48 +01:00
Translation updater bot df0babb6ee Localisation updates from https://translatewiki.net.
Change-Id: Id198afd102b32725fbfac8ba863a5f5e0b0271f2
2022-12-20 07:57:25 +01:00
Translation updater bot b2dcbd436e Localisation updates from https://translatewiki.net.
Change-Id: I2100d4a5130d7cba025c880c0c54f098b729e9a6
2022-12-13 07:29:34 +01:00
Translation updater bot 13ee4009e4 Localisation updates from https://translatewiki.net.
Change-Id: I41f4b535148becafee1e0ed1a2ac779e8316265c
2022-12-08 07:42:53 +01:00
libraryupgrader 7864126199 build: Updating npm dependencies
* grunt: 1.4.0 → 1.5.3
* async: 3.2.0 → 3.2.4
  * https://github.com/advisories/GHSA-fwr7-v2mv-hh25
* minimatch: 3.0.4 → 3.0.8
  * https://github.com/advisories/GHSA-f8q6-p94x-37v3
* minimist: 1.2.5 → 1.2.7
  * https://github.com/advisories/GHSA-xvch-5gv4-984h
* nanoid: 3.1.25 → 3.3.4
  * https://github.com/advisories/GHSA-qrpm-p2h7-hrv2

Additional changes:
* Set `name` in package.json.

Change-Id: Id8af4cade3ac2fee4ce09927aecac738d138999b
2022-12-04 20:21:22 +00:00
Translation updater bot 69b2b76b31 Localisation updates from https://translatewiki.net.
Change-Id: I153acaa806f7a5750b0b1122d3a26c981ec7a059
2022-12-01 07:20:56 +01:00
Translation updater bot 7a235299b7 Localisation updates from https://translatewiki.net.
Change-Id: I5ab480952e6c2f7ee4767f271baf119cea52aa1d
2022-11-24 07:08:56 +01:00
Translation updater bot 5e281fcbc0 Localisation updates from https://translatewiki.net.
Change-Id: I5cee835bc0c62c5da536b12d408b6e6ceb42674b
2022-11-17 07:18:43 +01:00
Translation updater bot af69ebb9fd Localisation updates from https://translatewiki.net.
Change-Id: Id5a1bb754801467f46f719e36cb7898593797d81
2022-11-10 07:21:57 +01:00
Kunal Mehta ffd5b0bd4a Simplify creating JSON pages in the Module namespace
Pages ending with a ".json" suffix in the Module namespace will use the
built-in JSON content model by default. Previously editors had to use
Special:ChangeContentModel to get a JSON page, which requires the
"editcontentmodel" userright that is not granted to a wide set of users
by default.

Bug: T144475
Change-Id: I1546fcad823a55a8c5a93177df8715844de1e87c
(cherry picked from commit 4ccebcdf4b)
2022-11-08 10:05:34 +00:00
Kunal Mehta a839ba855d Add mw.loadJsonData()
Backporting this so the LTS release has forwards compatibility with
Wikipedia templates.

mw.loadData() allows for optimizing the loading Lua tables by requiring
only one parse and lookup. However it's often easier for people to
write/maintain bulk data in JSON rather than Lua tables.

mw.loadJsonData() has roughly the same characteristics as mw.loadData()
and it can be used on JSON content model pages in any namespace.

As noted on the linked bug report, it's possible to already implement
this by writing a wrapper Lua module that loads and parses the JSON
content. But that requires a dummy module for each JSON page, which is
just annoying and inconvenient.

Test cases are copied from the mw.loadData() ones, with a few omissions
for syntax not supported in JSON (e.g. NaN, infinity, etc.).

Bug: T217500
Change-Id: I1b35ad27a37b94064707bb8c9b7108c7078ed4d1
(cherry picked from commit 1000d322e5)
2022-11-07 07:34:42 +00:00
Kunal Mehta d51ae237ad Add strict.lua to replace "Module:No globals"
This is being backported because many users copy lua modules from
Wikipedia, and thus benefit from forwards-compatibility.

For the most part, it is a good idea to avoid global variables and use
`local` variables instead. Quoting from the ScopeTutorial[1], "The
general rule is to always use local variables, unless it's necessary for
every part of your program to be able to access the variable (which is
very rare)."

Wikimedia module authors have written "Module:No globals", which errors
on the use of any global variable. On the English Wikipedia, this is
used on 32% of pages (18 million). Wikidata[2] indicates that it's been
copied to 334 other wikis.

Lua itself distributes an extra named "strict.lua"[3], which is what
this is based off of. Similar to bit32.lua, this is a pure-Lua library
that can be imported/enabled with `require( "strict" )` at the top of a
module.

The two changes I made from Lua's strict is to exempt the `arg` key,
which is used internally by Scribunto, and remove `what()`, since we
don't enable access to `debug.getinfo()` for security reasons.

[1] https://lua-users.org/wiki/ScopeTutorial
[2] https://www.wikidata.org/wiki/Q16748603
[3] http://www.lua.org/extras/5.1/strict.lua

(Cherry-picked from 829c53ef05)

Bug: T209310
Change-Id: I46ee6f630ac6b26c68c31becd1f3b9d961bcab29
2022-11-06 21:58:19 -08:00
Translation updater bot ed7acd78a2 Localisation updates from https://translatewiki.net.
Change-Id: I150484ff58b20abae489eb131f296011fbe51779
2022-11-03 07:21:35 +01:00
Translation updater bot 3e671010f4 Localisation updates from https://translatewiki.net.
Change-Id: I498ebd1e9a0ff2594227e57df2bd21dc2eef251e
2022-10-27 08:04:23 +02:00
Translation updater bot c7409c9bef Localisation updates from https://translatewiki.net.
Change-Id: I95a994e53768ebbc9eeaf0e1fc90381726218b56
2022-10-13 07:24:01 +02:00
Kunal Mehta 1716fd6704 Restore padding on #mw-scribunto-input to make cursor visible
In Chromium-based browsers the lack of padding means the cursor
isn't visible in the textarea when focused. In this case, it's
probably more important for the cursor to be visible than the
lack of padding to make it look more like a terminal.

Bug: T272678
Change-Id: I09ed2933bdac292ee9b9b98a2c8c48d96914d096
(cherry picked from commit 835631de27)
2022-10-08 22:04:09 +00:00
Translation updater bot 5b04d28319 Localisation updates from https://translatewiki.net.
Change-Id: I6e2e884a4224356e6c85175791cce4d721fed034
2022-10-06 07:13:21 +02:00
Brian Wolff 1fbb8d73c1 Make sure that lua stack trace is valid UTF-8.
This fixes a warning on php8.1 related to preg_match_all returning
null when given invalid UTF-8.

I made a separate patch to change the null into an exception Ic0c9083b

In a sense, this is a follow-up to ec103b6966.

Bug: T319218
Change-Id: Ia17fc2fa428ec35bdbd242f1127fcdff501fb741
(cherry picked from commit 047200c11e)
2022-10-06 00:45:15 -04:00
Translation updater bot 3e5edee111 Localisation updates from https://translatewiki.net.
Change-Id: I699eabb3e0553aa55247414fa017d2990a590ecc
2022-09-29 07:15:03 +02:00
Translation updater bot bcc6bf6d2f Localisation updates from https://translatewiki.net.
Change-Id: I35bd56ccb8dd547d8834ba3098a56db339c2d428
2022-09-22 16:18:41 +02:00
Subramanya Sastry 3aa6ad45db Temporarily disable the newly added test in f230419b
* This test fails with a core patch and will only pass in a
  subsequent patch in this repo.

Needed-By: Ied0295feab06027a8df885b3215435e596f0353b
Change-Id: Id6ea611549e98893f53094116a3851e9c42b8dc8
2022-09-01 21:24:25 +00:00
Arlo Breault 7778a6eef3 Revert "Disable Parsoid testing tempoarily"
This reverts commit 2c3a363cdc.

Depends-On: I7c419e1d508c337328db1d5132454fb805bfb1b5
Change-Id: I1770656d450ee0ba0ca115993812c06116eb5928
2022-09-01 21:08:20 +00:00
Translation updater bot 8c6653960a Localisation updates from https://translatewiki.net.
Change-Id: I0dcaf9e9be58b3db5adbed7b82ba2dcf25428453
2022-08-31 09:35:40 +02:00
Subramanya Sastry 7170021941 Update failing language tests
* Ia3cc8f95833cd0e9ae985528f8e72396111c4504 in core changed
  localizations for kaa language

Followup-To: Ia3cc8f95833cd0e9ae985528f8e72396111c4504
Change-Id: Ie1b686b65f008c0cd5f4017102699e51f6960b39
2022-08-29 16:20:59 -05:00
Subramanya Sastry 2c3a363cdc Disable Parsoid testing tempoarily
* Running into a missing module error in CI but cannot reproduce
  locally.

* Let us unbreak CI for other dependent repos and investigate this
  in the followup patch that reverts this.

Bug: T316331
Change-Id: Ic5983e503203f132fff521e422f0c7143f91d779
2022-08-26 14:57:48 +00:00
Subramanya Sastry f230419baf Enable testing with Parsoid + add failing test for T272507
* Turned on wt2html and wt2wt Parsoid modes for all tests with
  aggressive normalization to eliminate the need to add html/parsoid
  sections.

  We expect these modes to pass.

* The failing wt2wt tests is because the input wikitext duplicates
  arguments and Parsoid's wt2html doesn't capture duplicate template
  args which cause the wt2wt output to be normalized.

  This explains the two failing wt2wt tests and the corresponding
  selser "failures".

* The failing wt2html safesubst test might be a real failure and
  something we will have to look into. Will file a phab task for this.

* Added a new test for T272507 that fails with Parsoid right now,
  but will pass in a subsequent patch.

Change-Id: I96fba68dda7524d2fe562eb60ced64e5e0518f65
2022-08-22 13:27:20 -05:00
Tim Starling 6f437487b8 Fix incorrect param type, causing phan error
Change-Id: I3a87b0c58fd897ea83dbb44c51a01d206d1cd024
2022-08-22 17:26:57 +00:00
Alexander Vorwerk 738ca8d72d Bump scribunto-stats cache version
The addition of PSquare::__serialize() in wikimedia/running-stat is
having the same cache implication as the issue this was meant to fix.

The legacy PHP serialized form is not compatible with the stable
serialize form that we're switching to.

Bug: T313341
Change-Id: Iec4c1c958e10560abcbd4184a0ca4e1a0c19183a
2022-08-16 19:09:36 +00:00
Subramanya Sastry 8adcc1668f Update failing language tests
* Core changed these kaa localizations in
  Ie0ce427238412d3badb247d2e2fae9bc9f57fbeb

Followup-To: Ie0ce427238412d3badb247d2e2fae9bc9f57fbeb
Change-Id: I7fc0334bf78222f2d7c1b636a70b3c60f899363c
2022-08-12 17:57:21 +00:00
Translation updater bot fc5e20a651 Localisation updates from https://translatewiki.net.
Change-Id: If14a2d08e9094621344736bf0ad84fbe6e75d40a
2022-08-08 08:59:26 +02:00
Lucas Werkmeister (WMDE) 18d122b60d Revert "Namespace LuaCommon"
This reverts commit 62e1fb0b5f.

Reason for revert: caused several errors:
* unnamespaced HooksTest collides with core’s class of the same name
* Scribunto_LuaError renamed without class alias despite being used in Wikibase

Bug: T314464
Change-Id: I8b151327236bf86945e59823fba155497e4b3fc6
2022-08-03 10:03:12 +00:00
Reedy 62e1fb0b5f Namespace LuaCommon
Change-Id: Ib6e912e71fb797942aca4b4f22eb0ff9e005a662
2022-08-03 06:03:57 +00:00
Reedy c479ad6f86 Namespace LuaStandalone engine
Change-Id: I7d3f77a56c8b74e0481197224006f19ff4c9d108
2022-08-03 06:03:48 +00:00
Reedy dc97acc945 Update mediawiki/mediawiki-phan-config to 0.11.1
Bug: T295285
Change-Id: I65db513703b54b377dfbeacf2956c1ff13a27b99
2022-08-02 01:14:06 +00:00
Translation updater bot 3d52349f1b Localisation updates from https://translatewiki.net.
Change-Id: Id455d8b53dabffcd5241b823a3bf588de0c6dcaf
2022-08-01 08:23:24 +02:00
Reedy 1628cfa367 Namespace LuaSandbox engine
Change-Id: I485401c202057ae0fea7226ab21e68ce1c7d40c8
2022-07-30 22:51:42 +01:00
Reedy 492966dc12 composer.json: Bump mediawiki/lua-sandbox to 4.0.2
Bug: T314233
Change-Id: I2a749a3bf43731a19d9e6a8c7baa092a0e971f90
2022-07-30 22:14:53 +01:00
Reedy 0eaa8edfb0 Fix MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment
Change-Id: Ia2148daf26cb167cbe71a0ab419473a31d97a506
2022-07-30 18:56:55 +00:00
Timo Tijhof e9988b8473 Hooks: Minor clean up, remove redundant PSquare check
PSquare is part of wikimedia/running-stat which is bundled with
MediaWiki core. There is no valid way to install a wiki without
the vendor libraries present.

The check was introduced in 2015 with I0d39920733fe7 when the class
was newly added to the package and deployment was happening
concurrently to the extension change.

Bug: T313341
Change-Id: I6717151c39b589f2e5b5e87da6896f62252cb5d8
2022-07-19 14:58:17 -05:00