Commit graph

2768 commits

Author SHA1 Message Date
Translation updater bot ce3aa70f98
Localisation updates from https://translatewiki.net.
Change-Id: I65628685b392e809c1d48fc8772a46115b579687
2024-06-19 08:27:56 +02:00
libraryupgrader 8aa5a930b0 build: Updating braces to 3.0.3
* https://github.com/advisories/GHSA-grv7-fg5c-xmjg

Change-Id: I8d87bfebea5a29f2351d8427b09a55bfb5dd2399
2024-06-15 10:33:36 +00:00
Translation updater bot 31061103f9
Localisation updates from https://translatewiki.net.
Change-Id: I2b282154130fd163eab1b89878c4ac83f9527f0c
2024-06-12 08:32:12 +02:00
Translation updater bot 3c5516dcc9 Localisation updates from https://translatewiki.net.
Change-Id: Ic87c292c5762b7d26364260fa6077b88efa70a0a
2024-06-05 08:11:57 +02:00
Translation updater bot a428817345 Localisation updates from https://translatewiki.net.
Change-Id: Ie669942b728bf9b12246d91bec6004ade160ed14
2024-05-29 08:44:29 +02:00
Translation updater bot d393199bd5 Localisation updates from https://translatewiki.net.
Change-Id: Ica553f4caac48a25ca8ec982f9e157ac436d4611
2024-05-22 07:53:20 +02:00
Translation updater bot 4664d3c351 Localisation updates from https://translatewiki.net.
Change-Id: I2fef2fa94fa70ba751250ceb357eaa6e40859e43
2024-05-15 07:51:13 +02:00
Translation updater bot 7def4e14ab Localisation updates from https://translatewiki.net.
Change-Id: Ia33fd2e6937c1998a3798e84cef80f11ead79800
2024-05-08 08:23:40 +02:00
Translation updater bot e9e5a739ba Localisation updates from https://translatewiki.net.
Change-Id: I3b62fcda6d7206df4aec82b49296c1beb5f8b7c8
2024-04-24 07:52:32 +02:00
Translation updater bot 768b949afc Localisation updates from https://translatewiki.net.
Change-Id: Id6c4c2c142fdda24a76b0a9dd25c775a43391249
2024-04-17 08:11:27 +02:00
Translation updater bot 7a7fe3f6a5 Localisation updates from https://translatewiki.net.
Change-Id: Ic16dea9d019493bdbed90b18d215a90ce9e7c1f6
2024-04-03 08:17:08 +02:00
Translation updater bot 5e1305fdab Localisation updates from https://translatewiki.net.
Change-Id: Ia2fbea86151ca4dfa107a6d66c5c7a07e7957383
2024-03-27 07:23:56 +01:00
Translation updater bot 0cd5363bf7 Localisation updates from https://translatewiki.net.
Change-Id: I64404a212779e2b9b618789ca5663cc2106677ef
2024-03-20 06:54:32 +01:00
Translation updater bot bd98ad9ba6 Localisation updates from https://translatewiki.net.
Change-Id: I847ff290054113dfdfb0fb11c540719de2f15ad9
2024-03-13 07:03:43 +01:00
Translation updater bot 77c664e03a Localisation updates from https://translatewiki.net.
Change-Id: Ia09947593f9289d4e037bb2b3349dabb02d06cf2
2024-03-06 07:17:33 +01:00
Translation updater bot 5b041fd75b Localisation updates from https://translatewiki.net.
Change-Id: If69f3ea6b4087565770cd02c21fab8dadd7b9486
2024-02-28 07:17:41 +01:00
Translation updater bot 1700427699 Localisation updates from https://translatewiki.net.
Change-Id: Ib352f4d0206dfb88e319d521d6e93f5852dec8a1
2024-02-14 07:21:24 +01:00
libraryupgrader 74962bcc8a build: Updating npm dependencies
* eslint-plugin-compat: 4.1.4 → 4.2.0
  * https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
* postcss: 8.4.21 → 8.4.35
  * https://github.com/advisories/GHSA-7fh5-64p2-3v2j
* semver: 5.7.2, 6.3.1, 7.3.8 → 5.7.2, 6.3.1, 7.6.0
  * https://github.com/advisories/GHSA-c2qf-rxjj-qqgw

Change-Id: Icd74e7993a2f214ec1ba7f47be88ed6ddcf87ba6
2024-02-11 18:21:18 +00:00
Translation updater bot 1168060411 Localisation updates from https://translatewiki.net.
Change-Id: I235c14ca6baa46e7a6ae9b0292b1dab4f422c459
2024-01-31 07:16:10 +01:00
Translation updater bot 839bd13586 Localisation updates from https://translatewiki.net.
Change-Id: I90697d2423d0a5735e2204b14c14956199027d64
2024-01-17 07:38:09 +01:00
Translation updater bot a539676587 Localisation updates from https://translatewiki.net.
Change-Id: I0fc29cdccb2ca0d8a48095af0b5f516435a93426
2024-01-10 07:42:36 +01:00
Translation updater bot 38fc906226 Localisation updates from https://translatewiki.net.
Change-Id: Ia392c980961f2ba5b8e8c86949366ad6573dc414
2024-01-03 07:26:01 +01:00
Translation updater bot 6e65053367 Localisation updates from https://translatewiki.net.
Change-Id: If8ac593f7938bfeb97a00603be8ddd0c1f47c49f
2023-12-27 07:13:13 +01:00
Translation updater bot f646a9d6a4 Localisation updates from https://translatewiki.net.
Change-Id: I4080cb7dbf853554cfa9c647d34f0aed90768fe0
2023-12-20 08:29:38 +01:00
Translation updater bot b35034b951 Localisation updates from https://translatewiki.net.
Change-Id: If6f18000201471ed116005f1cd7df96b6ffa7925
2023-11-29 07:59:41 +01:00
Translation updater bot 6c32d251c4 Localisation updates from https://translatewiki.net.
Change-Id: I87dae9c281667fa40da9f249f8ba86df4db2bb1a
2023-11-15 07:36:44 +01:00
Translation updater bot 8c6ef8c804 Localisation updates from https://translatewiki.net.
Change-Id: I65c8899185764af7767ffbc497412a2b7d1e23f2
2023-11-08 07:28:14 +01:00
Translation updater bot f18f9bb53b Localisation updates from https://translatewiki.net.
Change-Id: Iff368e27f061b8a774faf1ee3e04916ef3cab190
2023-11-01 07:57:30 +01:00
Translation updater bot dace8189e1 Localisation updates from https://translatewiki.net.
Change-Id: I47a992cdce8fe3796998b45c24471cbb46e3f25b
2023-10-25 07:29:53 +02:00
Translation updater bot eba1758d8a Localisation updates from https://translatewiki.net.
Change-Id: Ie1481c37d934510951c9c3cdaec080677dac2984
2023-10-18 07:23:09 +02:00
Translation updater bot 00c6770ab9 Localisation updates from https://translatewiki.net.
Change-Id: If1ae636643c834c64fd39ef5fb0642c76f955b41
2023-10-09 08:56:35 +02:00
jenkins-bot df28c29433 Merge "tests: Remove pointless "Hash handling" test that leaves black overlay" 2023-10-06 18:18:18 +00:00
jenkins-bot 17c14d4c50 Merge "tests: Prevent native "Back" navigation in mmv.test.js" 2023-10-06 18:17:43 +00:00
Timo Tijhof 44b15a2c2c tests: Remove pointless "Hash handling" test that leaves black overlay
This test was leaving behind the black overlay, obscuring the test
results interface. Upon closer inspection, it appears not one part
of this test is doing anything that actually works.

* Assertion 1: `viewer.isOpen === false`
  This is the initial and default state. Not essential for the test,
  but so far so good.

* Prep for Assertion 2 & 3:

  We call loadImageByTitle. One might think that this will set isOpen
  to true, but, this isn't asserted. If one did, the test would fail,
  because loadImageByTitle returns early from its first branch
  in `!this.thumbs.length` and is thus a no-op, and adds nothing to
  the test.

  We set `location.hash = 'Foo'`.

* Assertion 2: `location.hash === '#Foo'`
  Assertion 3: `viewer.isOpen === false`

  Assertion 2 is meaningless because handling of hash changes appears
  to be asynchronous. Perhaps not always, but at least the indirection
  used in this codebase makes it async. Hence, the fact that it is
  correctly normalised to '#Foo' is meaningless as the popstate
  and hashchange event handler haven't been processed yet. If they
  were, it would still be meaningless since viewer.isOpen was never
  true in the first place and MMV's event handlers for popstate/hashchange
  are guarded by `isOpen`.

* Prep for Assertion 4: location.hash = Bar
* Assertion 4: `location.hash === '#Bar'`

  Idem.

* Prep for Assertion 5: Replace the viewer.loadImageByTitle function
  with a function that performs a nested assertion.

  This function is never called and its assertion never reached.
  This is a textbook example why assertions should never be
  nested. If you rewrite this in following with the advice from
  <https://api.qunitjs.com/assert/verifySteps/>, we find that
  the array is in fact empty by the end of the test() function.

  ```js
  var seen = [];
  viewer.loadImageByTitle = function ( title ) {
    // assert.strictEqual( … );
    seen.push( title.getPrefixedText() );
  };
  location.hash = …;
  location.hash = …;
  location.hash = …;
  location.hash = …;
  assert.deepEqual( seen, [ 'File:' + imageSrc' } );
  // Actual: []
  ```

== Misc notes ==

The test ends with "#/media/File:Foo bar.jpg" set on location.hash,
and the black overlay covering the page. It seems that the hashchange
are async, and that the first in a given event loop tick "wins", with
later ones being ignored. Observing this with debugger/breakpoints is
hard given that each pause results in the effect not being observable.
console.log(location.href) at the end of the test shows hash='#',
but placing a debugger at the end of the test results in the hash
being "#/media/…" instead.

Exprienced in Firefox 117 on macOS.

Change-Id: Ib37bec1b3e67fcab1da89d23381a3adbb6312827
2023-10-06 03:03:58 +00:00
Timo Tijhof 1260d98c78 tests: Prevent native "Back" navigation in mmv.test.js
This makes the test report inaccessible in the browser. I'm adding
it at the module level given that nearly all test cases in this
file trigger it:

* "Progress"
* "Progress when switching images"
* "New image loaded while another one is loading"
* "Events are not trapped after the viewer is closed"
* "document.title"

```
-   QUnit.module( 'mmv', QUnit.newMwEnvironment() );
+   QUnit.module( 'mmv', QUnit.newMwEnvironment( {
+       beforeEach: function () {
+           this.sandbox.stub( require( 'mediawiki.router' ), 'back', function () {
+               console.log( QUnit.config.current.testName );
+               console.trace();
+           } );
+       }
+   } ) );
```

Change-Id: I0cb7ed6c76d5547bcef9c183c9305b6fd08ec9eb
2023-10-06 03:03:48 +00:00
Timo Tijhof 1a25711033 mmv.lightboxinterface: remove 'isFullscreened' data
This was used internally by `jquery.fullscreen` but now that we
have all the logic inside this file, we don't need to store this
information two places with a copy in `this.$main.data()`. We can
use this.isFullscreen directly as they are always the same.

Change-Id: Ie15729a038bc9c1f6278c0b068c0706620d95e93
2023-10-06 03:03:00 +00:00
jenkins-bot 01652054b3 Merge "Remove unused core JavaScript modules that ship with MediaWiki core" 2023-10-05 23:58:00 +00:00
Hannah Okwelum c9eed0a3b5 Remove unused core JavaScript modules that ship with MediaWiki core
Bug: T335723
Change-Id: I89e389b532cd80af488255ebe88e403a10ae3a38
2023-10-05 16:53:45 -07:00
jenkins-bot e804f87b89 Merge "Add mw-no-invert class to MMV overlay" 2023-10-05 14:38:49 +00:00
Translation updater bot 728a7de9b4 Localisation updates from https://translatewiki.net.
Change-Id: Ie7663f7d5f47536f45767c069c9171803e238d1b
2023-10-04 09:08:48 +02:00
Translation updater bot 855fba12c4 Localisation updates from https://translatewiki.net.
Change-Id: I96aaecb438bcdcd8e00afb2bdf6b55b3342f395a
2023-10-03 09:32:59 +02:00
Translation updater bot cbeb4e1f35 Localisation updates from https://translatewiki.net.
Change-Id: Ia2fdb58ecb62d1af616c88658e9144179f59400b
2023-10-02 10:57:50 +02:00
Simon Legner 6ee3f05104 Use Codex styles for buttons in mmv.ui.download.pane
Bug: T340258
Change-Id: I30a7ab4a6732fd87a68c67593d322be2347b2ff8
2023-09-28 10:02:57 -07:00
Umherirrender fb1de7786c Improve special page handling in onBeforePageDisplay
Avoid creating of Title object to get the "fixed special name" (which is
the localized name) and compare that against the local name of the
current page, just use the SpecialPageFactory to get the canonical name
(which is the english internal name, not the english visible name) and
compare against the list of canonical allowed pages (adjust the existing
list to the canonical names, that are "old" names in different cases)

Change-Id: Ia6f6574bf6e65c75f8977ff016feda6ecdca3776
2023-09-23 00:03:01 +02:00
Ed Sanders 2212255fe2 Add mw-no-invert class to MMV overlay
Bug: T345281
Change-Id: I2f2659809ef8e4fc2e1c752d8fd0eb3533c3cb78
2023-09-12 14:02:36 +01:00
Translation updater bot ed07de63f7 Localisation updates from https://translatewiki.net.
Change-Id: I2288d2314809b44d97e52ff1beb63dab6e6587e9
2023-09-11 09:04:24 +02:00
Translation updater bot 9bb5f5d628 Localisation updates from https://translatewiki.net.
Change-Id: I40eb5c5e37598074258834bbc7753a8d8b71a7c7
2023-09-07 11:12:07 +02:00
Translation updater bot 7bf796e93d Localisation updates from https://translatewiki.net.
Change-Id: Ie572ce9adc7da7fe57e0459f0d1fa4e67e397ee3
2023-09-06 08:42:42 +02:00
Translation updater bot cc189fc45a Localisation updates from https://translatewiki.net.
Change-Id: Ifcc7f4a02529356a400f52b3c857af6556c9f4f9
2023-08-28 09:30:30 +02:00
jenkins-bot ee93b4875b Merge "build: Update MediaWiki requirement to 1.41" 2023-08-24 03:33:46 +00:00