Commit graph

1987 commits

Author SHA1 Message Date
libraryupgrader 377db6157f build: Updating mediawiki/mediawiki-codesniffer to 41.0.0
Change-Id: I0fa27e75318e2a52a7d56c45a5159a00dbc0b97f
2023-03-12 10:06:04 +00:00
Translation updater bot d7f2b3a75c Localisation updates from https://translatewiki.net.
Change-Id: Ib64ff3d2aa6edeaed7a569a84d2ce3f5d952bd0f
2023-03-08 08:42:56 +01:00
Translation updater bot 5bc9aad260 Localisation updates from https://translatewiki.net.
Change-Id: Ie08de530a9a5554ef93552872b608e2c034f4e4a
2023-03-06 08:34:11 +01:00
Amir E. Aharoni 68943f5d71 Update namespace translation for Chechen (ce)
Bug: T330587
Change-Id: I41dfb83258aa54e2726fde2ecec594f724ea5d82
2023-02-26 14:54:16 +02:00
Reedy 033c69cfab ScribuntoException: Use value property not dynamic property
Bug: T330524
Change-Id: I69a102497fffb939c849d2836302068ac9eff3d0
2023-02-25 00:57:56 +00:00
Translation updater bot 2ffa6cf4a6 Localisation updates from https://translatewiki.net.
Change-Id: Iabd3bcb2a460dbfec2dbf44edc6dd23b65f6db3f
2023-02-23 08:39:59 +01:00
Translation updater bot 7719cfcb93 Localisation updates from https://translatewiki.net.
Change-Id: I6ef6f744cc78aabbc9c73e85a259b218e65d4175
2023-02-22 09:01:25 +01:00
C. Scott Ananian ab7452c343 Remove unnecessary targets definitions from extension.json
As of MW 1.40, the default targets are now ["desktop","mobile"] so we
don't need to define this ourselves.  Minimum MW version bumped to
match.

Bug: T328497
Change-Id: I763607ad4a9eb6f9c35a1ac73c0d44b84b9063d2
2023-02-16 19:36:42 +00:00
Umherirrender f15b30cdb7 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
2023-02-13 20:39:57 +01:00
Translation updater bot da539f97f5 Localisation updates from https://translatewiki.net.
Change-Id: Ic6e3fc752dda558dc54b8d049e9079d066838b3e
2023-02-13 08:31:03 +01:00
Translation updater bot 7221fc558c Localisation updates from https://translatewiki.net.
Change-Id: I7fc31b1f08f853ceb50745e980c89e16b817977a
2023-01-23 08:23:59 +01:00
Translation updater bot f1a4be0700 Localisation updates from https://translatewiki.net.
Change-Id: Iac81e2877880ee5ab1116c6880b04026a88a1015
2023-01-11 09:02:34 +01:00
Umherirrender e2c3b41026 Use LanguageNameUtils::AUTONYMS/DEFINED instead of hard coded value
Easier to spot the documentation what happen with this option

Change-Id: Ic053e8daf14a74306b7ca3052503a59a19d16743
2022-12-29 13:43:27 +01:00
Umherirrender a20054fa34 Replace deprecated Language::isValidCode/isSupportedLanguage
Bug: T325974
Change-Id: I0245ea66abeebd9ae9b6d1edce9e8e93a479fdc0
2022-12-29 03:04:32 +01:00
Umherirrender bf4bdddb41 Replace deprecated Language::getFallbacksFor
Bug: T325979
Change-Id: Ia9658d0ce5bcd0c322cca0ffcec6aee82fb20a62
2022-12-29 02:01:09 +00:00
Umherirrender 3b84d90eb7 Replace deprecated Language::factory
Bug: T325986
Change-Id: I27a8742eb4897104d9bdaef298ec97c471baf641
2022-12-29 01:42:41 +00:00
Jon Robson 5425626fda Fixes "Module not loadable on target mobile" warnings
These modules get silently removed on mobile. This seems
unnecessary and most likely unwanted behaviour.

Bug: T324723
Change-Id: Ie3473deb10d96df046963b0bcf1b00bea965e3b3
2022-12-29 01:39:53 +00:00
Umherirrender 6e313296c5 Replace use of deprecated Parser::$mOptions
Bug: T275160
Change-Id: Id17fc7c2db20975fb6fbb2b9bf63a45135f7f354
2022-12-28 00:56:41 +00:00
Umherirrender e76dff032d Replace deprecated Language::fetchLanguageName(s)
Bug: T325962
Change-Id: Iff57224d231480507f138f9ba51f385ed32bf5b1
2022-12-27 17:21:10 +01:00
Translation updater bot b0cbcfffbf Localisation updates from https://translatewiki.net.
Change-Id: Ifd7181cd42240b215b6b8730e5a132c261a242d0
2022-12-22 11:04:35 +01:00
Translation updater bot f7a0c5f88e Localisation updates from https://translatewiki.net.
Change-Id: I516f662b7fa96182128b12f8b82d9a0887f0508c
2022-12-21 09:17:48 +01:00
Translation updater bot 10c5ad416c Localisation updates from https://translatewiki.net.
Change-Id: I2be106a4973bc75b8ea2ea12b78d9161044ad4e3
2022-12-15 11:36:50 +01:00
Translation updater bot abb3a3a24f Localisation updates from https://translatewiki.net.
Change-Id: Ifeef1f7e25eaece71837af5c8a59a185005dfd52
2022-12-14 08:16:23 +01:00
Translation updater bot 258af23151 Localisation updates from https://translatewiki.net.
Change-Id: Ib1e7baafb25439b1cb407ae033a3c45c7f6e365d
2022-12-12 08:22:58 +01:00
Translation updater bot 2272901850 Localisation updates from https://translatewiki.net.
Change-Id: I085c3df7f48d6579c728023b703ff0ac4999531b
2022-12-09 08:47:26 +01:00
Translation updater bot be7f8f0ff9 Localisation updates from https://translatewiki.net.
Change-Id: I382211871e8deac6bae2fd2034f9c01748b22485
2022-12-05 08:34:21 +01:00
Amir E. Aharoni cf446a223c Add namespaces aliases for Moroccan Arabic (ary)
The names are copied from Standard Arabic (ar).

Change-Id: I2ed6e3cc61540e92c9e39ef356fc3ff5ff53ad14
2022-12-05 07:18:14 +02:00
Translation updater bot 7fdc28b76b Localisation updates from https://translatewiki.net.
Change-Id: Ifdff04b918c74acc65fb8344a475f2cc7ed45858
2022-11-29 08:59:16 +01:00
Umherirrender a0732c2db8 tests: Replace assertEmpty with assertCount
Change-Id: I0002bb228701a3a5184ac7f1e38321bf10b23064
2022-11-25 10:26:34 +00:00
Translation updater bot 64b010e9f7 Localisation updates from https://translatewiki.net.
Change-Id: Id81e3c335c5aba30d8637fb11bb3d6fb6992f39b
2022-11-24 08:18:10 +01:00
Ideophagous a871801160 Namespace translations for Moroccan Arabic (ary)
Bug: T291737

Change-Id: I343f2be70ecc50d0ef0400914bddd7adc334386c
2022-11-22 14:00:25 +00:00
Bartosz Dziewoński 46bb5b0ac4 Avoid try…catch where if…else will do when using LanguageFactory
Needed for I869af06896b9757af18488b916211c5a41a8c563, where I am
trying to change LanguageFactory in MediaWiki core not to use
MWException.

Language::isSupportedLanguage() does not actually throw,
so this sigh can be one of relief.

Change-Id: I3079d8e18d88a4a26c2f2b09dccd4beea06678ee
2022-11-18 19:56:45 +00:00
Translation updater bot e415ed564c Localisation updates from https://translatewiki.net.
Change-Id: I8345c5275f6a89a4042f2655ab19197762b6ff70
2022-11-17 08:27:54 +01:00
libraryupgrader 5ba4e6d14d build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 38.0.0 → 40.0.1
  The following sniffs are failing and were disabled:
  * MediaWiki.PHPUnit.AssertEmpty.AssertEmptyUsed

npm:
* stylelint-config-wikimedia: 0.11.1 → 0.13.1

Change-Id: I5c0a3179d60555a334000e4acddf1b5cb0ba0bfa
2022-11-16 15:03:55 +00:00
Translation updater bot 01799a5646 Localisation updates from https://translatewiki.net.
Change-Id: I54d6778fe282f71d43c86c4541f7f59720337af5
2022-11-14 08:11:12 +01:00
libraryupgrader fe04311e6e build: Updating grunt-stylelint to 0.18.0
Change-Id: Ic254bd62e6c05e4c44960ffa8a8cf665ad0008be
2022-11-13 08:52:04 +00:00
Kunal Mehta 66e9257feb Partially revert 912324993f, restore old line ending behavior
As explained in T322883, the switch to
TextContent::normalizeLineEndings() means that rtrim() is run over the
input, which is a breaking and unintentional change.

This partially reverts commit 912324993f.

Bug: T322883
Change-Id: I2ad47d46e05112f413af453d61eb3f13434b2774
2022-11-11 21:04:19 -08:00
Translation updater bot ac1a2fa914 Localisation updates from https://translatewiki.net.
Change-Id: Iab534bbfa2c68b15a5896aa3c0c9b2b0a96aa49a
2022-11-11 08:42:07 +01:00
libraryupgrader 7c682efbef build: Updating dependencies
composer:
* 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:
* grunt: 1.4.0 → 1.5.3
* grunt-banana-checker: 0.9.0 → 0.10.0
* grunt-eslint: 23.0.0 → 24.0.0
* 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: I5c6d1443eed4bdb1c0eebceaa06c10b249c59cff
2022-11-11 03:35:49 +00:00
Translation updater bot 3ef9b40ecd Localisation updates from https://translatewiki.net.
Change-Id: I336ce9777673b5ab259ee28267ddc3b6b436d50f
2022-11-07 08:35:24 +01:00
Translation updater bot 395db27aca Localisation updates from https://translatewiki.net.
Change-Id: Ie9129c3eb31fcc10031d5343845389cfa2102dc6
2022-11-04 09:03:47 +01:00
Translation updater bot 6ab7c3b6cf Localisation updates from https://translatewiki.net.
Change-Id: I6d38d9fe9c8ac78f355bd9ef95c61ae72acfa47b
2022-11-02 08:38:45 +01:00
Translation updater bot 771c551f02 Localisation updates from https://translatewiki.net.
Change-Id: I09f356d044e1ecead725d378d62c9df5a27121ff
2022-10-25 08:24:47 +02:00
Translation updater bot c3c71b6d8a Localisation updates from https://translatewiki.net.
Change-Id: I80684f92510f7cfb8647662d44b7da6e679c6c76
2022-10-24 08:23:32 +02:00
Translation updater bot 1b2788d3a5 Localisation updates from https://translatewiki.net.
Change-Id: I9375f1e4ed53ec22e416df80942f57c11c611e00
2022-10-20 08:32:14 +02:00
Jackmcbarn f032e847bf Include the bad timestamp string in the error when unable to parse it
Change-Id: I0a79c25baf829f755aa5d251a78e032a12168364
2022-10-17 03:13:05 +00:00
Kunal Mehta 1000d322e5 Add mw.loadJsonData()
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
2022-10-13 04:46:25 +00:00
Kunal Mehta 829c53ef05 Add strict.lua to replace "Module:No globals"
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

Bug: T209310
Change-Id: I46ee6f630ac6b26c68c31becd1f3b9d961bcab29
2022-10-13 04:39:21 +00:00
Translation updater bot 58a9707c8f Localisation updates from https://translatewiki.net.
Change-Id: I2c351c91e6a13ff3f9b6b39676208ae5c6f0b892
2022-10-10 10:21:09 +02:00
Kunal Mehta 9d94f11309 Hide mw.hash.setupInterface from users
Part of the standard library boilerplate that got missed.

Bug: T276138
Change-Id: I6d55d55405b57b18f3f413a108848f34620c15a6
2022-10-08 22:01:00 +00:00