commit | 5868e55e1e446ccced05a7db77edef554622ce66 | [log] [tgz] |
---|---|---|
author | Translation updater bot <[email protected]> | Wed Aug 28 09:39:44 2024 +0200 |
committer | Translation updater bot <[email protected]> | Wed Aug 28 09:39:44 2024 +0200 |
tree | e8aa6b3379e076b1f558a97448d5c495bdc26818 | |
parent | 6d643cd85a6d7099583a0516c897e9ba1f748415 [diff] |
Localisation updates from https://translatewiki.net. Change-Id: I173bd268f405f2d3d6d870968b1ad78422581ce5
See https://www.mediawiki.org/wiki/Extension:Popups for more information about what it does.
Popups uses an asset bundler so when developing for the extension you'll need to run a script to assemble the frontend assets.
You can find the frontend source files in src/
, the compiled sources in resources/dist/
, and other frontend assets managed by resource loader in resources/*
.
After an npm install
:
npm start
Will run the bundler in watch mode, re-assembling the files on file change. Additionally, this builds debug-friendly assets and enables Redux DevTools debugging.npm run build
Will compile the assets just once, ready for deployment. You must run this step before sending the patch or CI will fail (so that sources and built assets are in sync).npm test
To run the linting tools and the tests.tests/qunit/
tests/node-qunit/
, which you can run with npm run test:unit
nodemon
to watch sources and auto run linting and tests.npm install -g nodemon
nodemon -w src/ --exec "grunt lint:all && npm run test:unit"
npm run coverage
coverage/
folderDevelopers are likely to work with local MediaWiki instances that do not have content to test with. To reduce this pain, you can create a single page with a list of links that point to an existing and external wiki by using the following config flag:
$wgPopupsGateway = 'restbaseHTML'; $wgPopupsRestGatewayEndpoint = 'https://en.wikipedia.org/api/rest_v1/page/summary/';
Popups works with a local copy of the Mobile Content Service too:
$wgPopupsGateway = 'restbaseHTML'; $wgPopupsRestGatewayEndpoint = 'http://localhost:6927/en.wikipedia.org/v1/page/summary/';
$($0).trigger('mouseenter')
.npm start
enables Redux DevTools functionality. In production builds, this same functionality can be enabled by setting a debug=true
query. E.g., https://en.wikipedia.org/wiki/Popup?debug=true
.| tap-mocha-reporter dot
.The root of the repository contains a .storybook directory. This folder contains a separate NPM project using the Storybook.js UI framework. This framework provides an environment that showcases all possible permutations of popups, without the state-management constraints of having only one popup per page.
This framework requires Node 8 (because of the spread ...
operator) and is therefore separated from the main package.json until CI upgrades from Node 6. NVM can be used to manage multiple Node versions to run the Storybook app (cd .storybook && nvm use
). See the .storybook/README.md for details.
Execute npm -s run doc
.
<ref>
, the terms are used synonymously.