Compare commits

...
Sign in to create a new pull request.

113 commits

Author SHA1 Message Date
0d0
384fdfa2bf Patch ContributionScores for newer tables 2025-01-23 20:21:52 +01:00
libraryupgrader
7f40072416 build: Updating mediawiki/mediawiki-codesniffer to 45.0.0
Change-Id: Ia8f9b33e935bf4f6f2ede29eeabf9acb10c15cb9
2024-11-02 05:55:26 +00:00
libraryupgrader
e00a3b1c57 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 43.0.0 → 44.0.0

npm:
* eslint-config-wikimedia: 0.27.0 → 0.28.2
* braces: 3.0.2 → 3.0.3
  * https://github.com/advisories/GHSA-grv7-fg5c-xmjg
* micromatch: 4.0.5 → 4.0.8
  * https://github.com/advisories/GHSA-952p-6rrq-rcjv

Change-Id: I039053dadabb9bc16cdf7c40cd523745d3e4116f
2024-09-29 02:48:39 +00:00
Umherirrender
95976e0082 Merge "build: Updating grunt-banana-checker to 0.13.0" 2024-09-28 22:24:05 +00:00
ZoruaFox
00af3f2598 Fix wfGetDB deprecated on 1.39 and later versions.
The global function wfGetDB() has been deprecated since 1.39,
use LoadBalancer::getConnection() instead of old function.

Bug: T369145
Change-Id: Ided5ed8d1e54428541f067c75fbe7fdfeefc460f
2024-07-03 22:17:33 +00:00
libraryupgrader
2b415b36b5 build: Updating grunt-banana-checker to 0.13.0
Change-Id: Ibbdc718ea757b24ed4585f5f6e8a77bbb4f5f24f
2024-05-18 05:11:57 +00:00
libraryupgrader
1cf9ae8247 build: Updating dependencies
composer:
* mediawiki/minus-x: 1.1.1 → 1.1.3

npm:
* grunt-banana-checker: 0.11.1 → 0.12.0

Change-Id: I7c6aa5e4e1c0c2c7c6410a0745febb443eceebe7
2024-05-10 03:07:37 +00:00
libraryupgrader
548a1f177c build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 41.0.0 → 43.0.0
* php-parallel-lint/php-parallel-lint: 1.3.2 → 1.4.0

npm:
* eslint-config-wikimedia: 0.25.0 → 0.27.0
* grunt-banana-checker: 0.10.0 → 0.11.1
* grunt-eslint: 24.0.1 → 24.3.0

Change-Id: Iee9ef20b4984ad7459d77cc77c59394667954370
2024-04-22 02:10:29 +00:00
Umherirrender
645c945994 Merge "Fix "Cannot access non-public property Parser::$mStripState"" 2023-09-03 18:06:37 +00:00
Luca Mauri
4212d24b49 Fix "Cannot access non-public property Parser::$mStripState"
Discussed under https://www.mediawiki.org/wiki/Topic:Xc6c9apmxydt7817

Bug: T333675
Change-Id: Ifd38878edfd6481de85efd716e4f954cd1e449bb
2023-09-03 18:04:04 +00:00
libraryupgrader
7d145662fa build: Updating npm dependencies
* eslint-config-wikimedia: 0.24.0 → 0.25.0
* grunt-eslint: 24.0.0 → 24.0.1

Change-Id: I3a7cc1836a78f282f900b3405a9e7215803d6e38
2023-05-04 01:44:08 +00:00
libraryupgrader
7cc5575eaa build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 40.0.1 → 41.0.0

npm:
* eslint-config-wikimedia: 0.22.1 → 0.24.0
* grunt: 1.5.3 → 1.6.1

Change-Id: Ic11909141e1d3be2b5100878ff7bcec5acdf48e9
2023-03-15 04:15:54 +00:00
libraryupgrader
945f54a773 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 39.0.0 → 40.0.1

npm:
* grunt-banana-checker: 0.9.0 → 0.10.0
* minimatch: 3.0.4 → 3.0.8
  * https://github.com/advisories/GHSA-f8q6-p94x-37v3

Change-Id: I55d1c7498aea0581127daa4c09cf44f846f34f7e
2022-12-30 01:11:43 +00:00
Vedmaka
d4dae78b27 Make $wgContribScoreCacheTTL affect caching of embedded Special:ContributionScores page
Change-Id: I526362c422f611e3f8882be5575618f530b868b2
2022-12-11 10:43:17 +00:00
libraryupgrader
e307850555 build: Updating grunt to 1.5.3
Change-Id: I0fe9a27b6b821d9960553f487cd9bcf30ebd7a5b
2022-05-26 09:21:33 +00:00
libraryupgrader
790e23f9bb build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 38.0.0 → 39.0.0
* 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-eslint: 23.0.0 → 24.0.0

Change-Id: I426c1f103cbfce83d09ceefc71eb87c3691818eb
2022-05-21 02:08:18 +00:00
libraryupgrader
7fa71f5e78 build: Updating grunt to 1.5.2
Change-Id: I58cfa3b96a1c508aef987523df9bb2985dc0c6c0
2022-04-27 09:04:20 +00:00
libraryupgrader
6666f47f3b build: Updating npm dependencies
* eslint-config-wikimedia: 0.21.0 → 0.22.1
* async: 3.2.0 → 3.2.3
  * https://github.com/advisories/GHSA-fwr7-v2mv-hh25

Change-Id: I10969887274d014e0273eda8828ec1c6b7b3f9af
2022-04-15 01:45:18 +00:00
libraryupgrader
46ebf43828 build: Updating npm dependencies
* eslint-config-wikimedia: 0.20.0 → 0.21.0
* grunt: 1.4.0 → 1.4.1

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

Change-Id: I2bccb381a68affd8a8fe33f6b3948c75e72d1be5
2022-02-06 08:43:55 +00:00
Umherirrender
c68abe1641 Replace deprecated IDatabase::fetchObject
Bug: T286694
Change-Id: I78ae801c9fec3de0495f355b90edaac703faa169
2022-02-04 23:16:47 +01:00
Umherirrender
f9aa4a74b3 Remove PHP entry point
Change-Id: I1d6b3a1f2078b0e2db844d1334dcafc3794c9f74
2021-12-04 16:22:55 +01:00
libraryupgrader
d4132dab01 build: Updating mediawiki/mediawiki-codesniffer to 38.0.0
Change-Id: I71c9a24b73892aae722bda6a50ecfe9a735a377c
2021-10-24 01:34:43 +00:00
jenkins-bot
228317e7c6 Merge "Use MainWANObjectCache to improve performance" 2021-10-13 12:51:46 +00:00
Translation updater bot
c1d095e381 Localisation updates from https://translatewiki.net.
Change-Id: I8ab537624f7ddbd1af32a8acd3c4781686b23663
2021-10-07 09:02:42 +02:00
jenkins-bot
120ae2bac0 Use MainWANObjectCache to improve performance
Bug: T278030
Change-Id: I7e8487ff9b2e7c9038bd058aa11cd844450b165a
2021-10-06 04:50:00 +00:00
jenkins-bot
fb464fbd13 Merge "Adds configuration directive to filter specified usernames from the contribution scores tables." 2021-10-05 14:38:02 +00:00
libraryupgrader
6a8d6116e1 build: Updating dependencies
composer:
* php-parallel-lint/php-parallel-lint: 1.3.0 → 1.3.1

npm:
* ansi-regex: 5.0.0 → 5.0.1
  * https://npmjs.com/advisories/5197 (CVE-2021-3807)

Additional changes:
* composer.json: Updated phpcs command in composer test (T280592).
* composer.json: Added phpcs command to scripts (T280592).

Change-Id: Id67c2545f7d06ca94a8ca68c3196534cfaf1addc
2021-10-04 15:47:44 +00:00
Chris Rishel
35ea80cb36 Adds configuration directive to filter specified usernames from the contribution scores tables.
Bug: T292266
Change-Id: I641fbd3d8b088132cba4f142ee99a8837a02afb3
2021-10-04 08:17:14 +00:00
jenkins-bot
b7bf249857 Merge "Introduce a config, to use the rough number of edits in user table" 2021-09-28 08:43:42 +00:00
libraryupgrader
0a533b36f5 build: Updating path-parse to 1.0.7
* https://npmjs.com/advisories/1773 (CVE-2021-23343)

Change-Id: I6470d91980875027c16f172ca7d8bc4806c30c7b
2021-08-11 16:34:14 +00:00
Translation updater bot
5be2c8ed72 Localisation updates from https://translatewiki.net.
Change-Id: I10e4d8f6ee64b19de0da79a06e9e432cab34ab58
2021-07-26 08:12:02 +02:00
libraryupgrader
71ace6a83c build: Updating mediawiki/mediawiki-codesniffer to 37.0.0
Change-Id: I6c7f39e6c29ddee30e5f5885e92564f212068431
2021-07-22 15:28:36 +00:00
Func
6024bfd83b Introduce a config, to use the rough number of edits in user table
Bug: T278030
Change-Id: Ibd6d0380cc091e4720fb038bd8c663a6ebb4a6ea
2021-07-01 08:34:58 +00:00
jenkins-bot
5ade4bf529 Merge "Minor cleanups on ContributionScores extension" 2021-06-22 07:48:23 +00:00
Translation updater bot
81fe64aea5 Localisation updates from https://translatewiki.net.
Change-Id: I930be97a774bd7933400a25625db751bcad862fc
2021-05-27 12:05:05 +02:00
libraryupgrader
32d5ef59fa build: Updating browserslist to 4.16.6
* https://npmjs.com/advisories/1747 (CVE-2021-23364)

Change-Id: I6e74e9f54e2d24910830797007e035d39b96f58d
2021-05-25 09:43:35 +00:00
Func
b0e2a7c59a Minor cleanups on ContributionScores extension
Change-Id: If35b44623ce27fa80c44f6bd18ceffdf9d9811b9
2021-05-15 14:31:22 +00:00
jenkins-bot
89e7ebc584 Merge "Use User->isRegistered(), not deprecated isLoggedIn()" 2021-05-11 14:08:12 +00:00
libraryupgrader
908d2f68a2 build: Updating grunt to 1.4.0
Change-Id: Ic8eb79e109e0d82ff0e335cb55176fefe2183c0b
2021-05-09 10:24:41 +00:00
libraryupgrader
95800b51f3 build: Updating lodash to 4.17.21
* https://npmjs.com/advisories/1673 (CVE-2021-23337)

Change-Id: I5aafa6c6e11e2e47f1e3fe6ab089aa8416711632
2021-05-07 18:43:26 +00:00
ZabeMath
bb3429ecff Use User->isRegistered(), not deprecated isLoggedIn()
Bug: T270450
Change-Id: I1018c6a76af5685026d956f5c010b5537cf3011e
2021-05-06 17:57:17 +02:00
libraryupgrader
e5d96719d8 build: Updating composer dependencies
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
* php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0

Change-Id: I99b71bd05c86f67e2af45f8b055c956b9515c831
2021-05-04 02:52:03 +00:00
Translation updater bot
fcb9c19544 Localisation updates from https://translatewiki.net.
Change-Id: Ib231bfa7ce8c0d1d639e38bf2eec872031eb518a
2021-05-03 08:36:37 +02:00
jenkins-bot
20f33b07f3 Merge "Query for array of join with ActorMigration::getJoin() to improve performance" 2021-04-21 11:48:18 +00:00
libraryupgrader
309914b267 build: Updating eslint-config-wikimedia to 0.20.0
Change-Id: Iaa507a243cfe7bde4987bd77239a9391faf9e76d
2021-04-16 07:15:21 +00:00
Func
571a707b3b Query for array of join with ActorMigration::getJoin() to improve performance
There is no need for comment text, RevisionStore::getQueryInfo() is overkill, and will cause more time in database query.

Bug: T278030
Change-Id: I9c062cd66677aa7d473a3283f29b0e39c5b4ea02
2021-04-02 15:40:27 +00:00
Translation updater bot
20b9a568e2 Localisation updates from https://translatewiki.net.
Change-Id: I80772b10562895d7f7f1b8ae0ad76df8585f53ab
2021-04-01 08:37:06 +02:00
Func
4dc3f4fc3e Update ContributionScores for expiring user groups
Bug: T160020
Change-Id: I66c9108133d2bdd5dc29336a525480764c95f5c2
2021-03-14 03:32:57 +00:00
libraryupgrader
6fac0091ec build: Updating eslint-config-wikimedia to 0.19.0
Additional changes:
* eslint: Renamed `wikimedia/client` profile to `client-es5` (T277085).

Change-Id: Ia3589bc2b6f071b3bbb41a11efb11f1456a521ca
2021-03-13 08:51:18 +00:00
libraryupgrader
0c3861304e build: Updating eslint-config-wikimedia to 0.18.2
Change-Id: I1d38f31a482edce1a357d36a6ab1479282402c80
2021-03-06 11:23:51 +00:00
Func
9f53a1eba9 Set descriptionmsg in extension.json correctly
Change-Id: Ie4eb287a6fc7f9461aab1267b44c6240fd23a28f
2021-02-19 15:01:39 +00:00
Translation updater bot
2dc00fa1ae Localisation updates from https://translatewiki.net.
Change-Id: I54a8b2e66f8ccfeb0029ba16f3148d07fad852c4
2021-02-16 08:29:47 +01:00
zoranzoki21
ca10b2089e Add alias for Serbian language
Change-Id: I13aeed4f0ff277238fe1fbd9164d850bbf4247d1
2021-02-06 15:02:53 +00:00
zoranzoki21
fdcc307d8e extension.json: Bump version number
Change-Id: Ie3963a209b494c3a9e82d39cd76ce399fb181685
2021-02-06 15:53:22 +01:00
zoranzoki21
9d46bcf5c7 Fix few PHPCS excludes
Change-Id: I999ff9d6ffbc727d74221a62080895af21495772
2021-02-06 15:52:52 +01:00
func
b8a91c6731 Convert ContributionScores to use extension registration
Bug: T174046
Change-Id: I293050ddc01699420b7dad884b51f5241e46137f
2021-02-06 11:53:15 +08:00
libraryupgrader
e51c7662d1 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 34.0.0 → 35.0.0
* mediawiki/minus-x: 1.1.0 → 1.1.1

npm:
* eslint-config-wikimedia: 0.17.0 → 0.18.1

Additional changes:
* Removing manual extensions for eslint.

Change-Id: I986ee614ae25668d33c1aa3c5cb790352fb24c89
2021-01-29 07:46:25 +00:00
Translation updater bot
18e42f349b Localisation updates from https://translatewiki.net.
Change-Id: I956883f08b25f3c7dfe80048da032f690c4f0377
2020-12-15 08:35:32 +01:00
libraryupgrader
ddd94477cf build: Updating ini to 1.3.8
* https://npmjs.com/advisories/1589

Change-Id: Ia0b4818083308050beb40b354d3e33ad0bb65db7
2020-12-13 00:07:38 +00:00
Translation updater bot
95f9a48ac4 Localisation updates from https://translatewiki.net.
Change-Id: Ibabecd30ad0076609b25c2614cdd6125e6cf6ced
2020-12-07 08:44:05 +01:00
libraryupgrader
5aefac796c build: Updating mediawiki/mediawiki-codesniffer to 34.0.0
Change-Id: I0364be0450fc92a35f3623626bde7697a28b4e7c
2020-12-06 05:02:37 +00:00
Translation updater bot
4f60431795 Localisation updates from https://translatewiki.net.
Change-Id: I4d13bf09a01197c17748f7d14c906507f756690d
2020-11-26 08:27:45 +01:00
Translation updater bot
b11635777b Localisation updates from https://translatewiki.net.
Change-Id: I9b8672b1268df7d805fa1fe7a241146860a41920
2020-11-11 08:35:29 +01:00
libraryupgrader
f42092ec06 build: Updating mediawiki/mediawiki-codesniffer to 33.0.0
Change-Id: Id2c3212e2edfcdede0e1033a490905d6c361e1b4
2020-11-03 15:49:32 +00:00
libraryupgrader
a131b2a47b build: Updating mediawiki/mediawiki-codesniffer to 32.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Usage.ExtendClassUsage.FunctionConfigUsage

Additional changes:
* Dropped .php5 and .inc files from .phpcs.xml (T200956).
* Added the `wikimedia/mediawiki` profile in .eslintrc.json (T262222).
* Removed global `mw`, included via `wikimedia/mediawiki` profile (T262222).
* Dropped the emtpy global definition in .eslintrc.json.

Change-Id: I9a87a358cb5336c9d18261985209c1f845337160
2020-10-29 09:17:32 +00:00
Translation updater bot
6e2d039150 Localisation updates from https://translatewiki.net.
Change-Id: Ie53409ab2fa33061eaac2cf4cbd79b619536cce9
2020-09-14 09:13:45 +02:00
libraryupgrader
b04514e353 build: Updating npm dependencies
* eslint-config-wikimedia: 0.16.2 → 0.17.0
* grunt: 1.2.1 → 1.3.0

Change-Id: I2d78f6a806ee8c6aa94fbc89acbc863c4ee23898
2020-09-05 11:59:09 +00:00
Translation updater bot
de739003d4 Localisation updates from https://translatewiki.net.
Change-Id: Id4a38aede91bd646e162c359d7af61defabfa181
2020-08-05 08:22:19 +02:00
Translation updater bot
ea143f6b66 Localisation updates from https://translatewiki.net.
Change-Id: Ia7c25a6b6eb41cab772f5699c75f212a5c972040
2020-07-27 08:37:06 +02:00
Translation updater bot
70cc5ee193 Localisation updates from https://translatewiki.net.
Change-Id: I8d8fdb23f485b4ae669084aa7b8944fb49862698
2020-07-24 08:26:32 +02:00
Translation updater bot
234c4f6622 Localisation updates from https://translatewiki.net.
Change-Id: I961864c32baff11ea4b48df546a5f6cddc3aef32
2020-07-21 09:11:04 +02:00
libraryupgrader
2b3ff2324d build: Updating grunt to 1.2.1
Change-Id: Ie5a886a5fea63f73d443b3a53ec8c184e56d8c22
2020-07-18 04:04:11 +00:00
libraryupgrader
4817b0112c build: Updating npm dependencies
* eslint-config-wikimedia: 0.15.3 → 0.16.2
* grunt-eslint: 22.0.0 → 23.0.0

Change-Id: I5a46ab233ea39978e523b4706bffa347e347f8ab
2020-07-16 20:53:15 +00:00
libraryupgrader
371c9a0a44 build: Updating lodash to 4.17.19
* https://npmjs.com/advisories/1523
* CVE-2019-10744

Change-Id: Ie099903dd56420be8e3577170505d7543628ca30
2020-07-09 05:44:07 +00:00
Translation updater bot
b4321e9f90 Localisation updates from https://translatewiki.net.
Change-Id: Ia32aa408e9bb9527e8f13f37b155a96b8d002841
2020-07-03 08:32:36 +02:00
Translation updater bot
2af4934cbd Localisation updates from https://translatewiki.net.
Change-Id: I10d6b4c7d309209507ac6a8f6914dd79e3b80650
2020-06-15 08:39:09 +02:00
libraryupgrader
f260a7ad76 build: Updating mediawiki/minus-x to 1.1.0
Change-Id: I7476fe4a65fc2f85efddfa78190589a4acf25d75
2020-06-08 08:01:34 +00:00
Translation updater bot
73ed304e2c Localisation updates from https://translatewiki.net.
Change-Id: If1dc777441bf2b86214b5e4603c4a1ae8b9b877a
2020-06-08 08:49:46 +02:00
Translation updater bot
e9f8e17919 Localisation updates from https://translatewiki.net.
Change-Id: I942d224f992e60b1adbd392a0c6940b7df8311fc
2020-06-05 08:52:49 +02:00
libraryupgrader
3de3b235c6 build: Updating composer dependencies
* php-parallel-lint/php-console-highlighter: 0.4.0 → 0.5.0
* php-parallel-lint/php-parallel-lint: 1.0.0 → 1.2.0

Additional changes:
* Replaced "jakub-onderka" packages with "php-parallel-lint".

Change-Id: I71d07dd403f3863f89287856a5e8ba9b0d7df1c6
2020-05-31 02:01:03 +00:00
libraryupgrader
82ae323231 build: Updating mediawiki/mediawiki-codesniffer to 31.0.0
The following sniffs now pass and were enabled:
* MediaWiki.Usage.DbrQueryUsage.DbrQueryFound

Additional changes:
* Replaced "jakub-onderka" packages with "php-parallel-lint".

Change-Id: Id8e722a709da5eb7e00a57725b88d927e9fbafd9
2020-05-29 11:41:57 +00:00
Translation updater bot
3ceddd3f31 Localisation updates from https://translatewiki.net.
Change-Id: I35fd27eb97a5762784481c67b47e2f165b7a79f8
2020-05-26 08:35:33 +02:00
MusikAnimal
82788a63ed Fix query to group by user_name
Bug: T211037
Follow-Up: Ia395f904d12d96e0d8bf0c1b2a5f638639b3ab12
Change-Id: I4a7c769d9457fc0d845ad8c45f4378018a59addb
2020-05-10 20:52:07 -04:00
jenkins-bot
d5dca87239 Merge "Add support for actor" 2020-05-10 02:58:58 +00:00
Paladox
192f38dc4c Add support for actor
Bug: T211037
Change-Id: Ia395f904d12d96e0d8bf0c1b2a5f638639b3ab12
2020-05-10 02:50:56 +00:00
Translation updater bot
02766fdc0c Localisation updates from https://translatewiki.net.
Change-Id: Id0215d32d0ea1914817e27f30b92980327d4e79a
2020-05-01 10:00:31 +02:00
libraryupgrader
896045f848 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 29.0.0 → 30.0.0

npm:
* eslint-config-wikimedia: 0.15.0 → 0.15.3

Change-Id: I11b5a863f5f25f1545d56ce2e4d74882200abcff
2020-04-22 07:46:52 +00:00
Translation updater bot
f7f3af5657 Localisation updates from https://translatewiki.net.
Change-Id: I8a4d915c5e4249089ed6ecb1b07e9ae29d605585
2020-04-22 08:55:55 +02:00
Translation updater bot
e81fb24586 Localisation updates from https://translatewiki.net.
Change-Id: I3255f003ef0c6fb5ff8557e53b80361d80fa04f7
2020-04-20 08:41:03 +02:00
libraryupgrader
3bb49646fe build: Updating grunt-banana-checker to 0.9.0
Change-Id: Ic60a49157e7012ada6f5b5dee2237576ceb26611
2020-04-19 02:46:55 +00:00
Translation updater bot
cba65cdeb6 Localisation updates from https://translatewiki.net.
Change-Id: I158eff917d98cf7910163c04f28efa13d7aba566
2020-04-14 08:23:23 +02:00
Translation updater bot
e70a6bb4d0 Localisation updates from https://translatewiki.net.
Change-Id: I4bf65c7e84f6041f8bc6210f93c3b1b3e9478043
2020-04-13 09:00:00 +02:00
Translation updater bot
2668446cd7 Localisation updates from https://translatewiki.net.
Change-Id: I45544d528885c478c91f733e3484e50284823d89
2020-04-07 08:38:34 +02:00
Translation updater bot
27e579e3c3 Localisation updates from https://translatewiki.net.
Change-Id: I7a6709a0ae4b6e2456dec8be14b411f732bc3882
2020-03-24 08:48:52 +01:00
libraryupgrader
e745e56085 build: Updating mkdirp to 0.5.3
* https://npmjs.com/advisories/1179

Change-Id: I81e43d99e2f5566a59696e691fade4f8d1ec3f3d
2020-03-20 21:42:31 +00:00
libraryupgrader
a3c92f6e07 build: Updating minimist to 1.2.5
* https://npmjs.com/advisories/1179

Change-Id: Ie606d5964101b59a174d3889c8e46f7c32c6207f
2020-03-18 05:34:03 +00:00
libraryupgrader
81dd4ee4a6 build: Updating acorn to 7.1.1
* https://npmjs.com/advisories/1488

Change-Id: Iea15f28f4414bb77c40e59776b999968e0211ac2
2020-03-08 21:14:41 +00:00
Translation updater bot
b317d2566e Localisation updates from https://translatewiki.net.
Change-Id: I5d2ce79f206e055d521760c21e800e16cdeceb0d
2020-03-02 09:09:29 +01:00
Translation updater bot
0ca704c7d1 Localisation updates from https://translatewiki.net.
Change-Id: I0f0eaaffa8a8d6c81c82b289244f18c04061cc0a
2020-02-27 08:36:22 +01:00
Translation updater bot
e4a9083d8f Localisation updates from https://translatewiki.net.
Change-Id: Id0dcf95a5861a47ce2e568c2fec5a5ef701b1f16
2020-02-19 08:23:29 +01:00
Umherirrender
3b8629ad9b build: Replace jscs, jshint and jsonlint by eslint
Bug: T210365
Change-Id: I184e594a3be8010c9c6561b2b66e5596905a40fe
2020-02-03 20:49:46 +01:00
libraryupgrader
30eace5dec build: Updating mediawiki/minus-x to 1.0.0
Change-Id: I74f720c20437ed25853cf880e154e5c0ff6716d2
2020-01-29 02:55:02 +00:00
libraryupgrader
c73ace56c4 build: Updating jakub-onderka/php-console-highlighter to 0.4.0
Change-Id: Id029644bd837fd4d39d0523c5df62589ad64d871
2020-01-28 07:53:28 +00:00
Translation updater bot
3837153bab Localisation updates from https://translatewiki.net.
Change-Id: I6f317e4edc3e8c218ed3fb9eac772d7aef465720
2020-01-21 08:15:58 +01:00
Translation updater bot
9d10a949e5 Localisation updates from https://translatewiki.net.
Change-Id: Ib9668f0f65461a70bfc7195b869a4be641be3a79
2020-01-20 08:48:48 +01:00
libraryupgrader
6cdaa361c1 build: Updating mediawiki/mediawiki-codesniffer to 29.0.0
Additional changes:
* Also sorted "composer fix" command to run phpcbf last.

Change-Id: Ie549c7c984457f6ff85315cfec2e3739558f6017
2020-01-14 04:36:07 +00:00
Translation updater bot
8d97dcf311 Localisation updates from https://translatewiki.net.
Change-Id: I068326f1c9743a97495eff5b31857ac6c22cf5a7
2019-12-22 17:40:23 +01:00
libraryupgrader
3491a9442a build: Updating dependencies
composer:
* mediawiki/minus-x: 0.3.1 → 0.3.2

npm:
* grunt-banana-checker: 0.4.0 → 0.8.1

Change-Id: Ia1365bbd40f98972c968ffb4652bf5452630c31e
2019-12-16 03:26:53 +00:00
C. Scott Ananian
bc2d5f0861 Replace use of Parser::disableCache(), deprecated in MW 1.28
The replacement `$parser->getOutput()->updateCacheExpiry(0)` has been
in place since MW 1.16.3.

See I6419754de6cbc01af07b6c0eafb8396bd720a58d in core.

Change-Id: I7d31d79da71009648782b2a746ddfeb0992c96b5
2019-11-04 15:14:56 -05:00
Translation updater bot
0fefd2e406 Localisation updates from https://translatewiki.net.
Change-Id: I805c91a0d76a57ab3fa099dcda654f18fa47adc8
2019-11-04 09:29:57 +01:00
Translation updater bot
a9e0eb0470 Localisation updates from https://translatewiki.net.
Change-Id: Iaad33322f62c5cb84b7c64bb33c8a0f1c263c080
2019-10-24 10:42:59 +02:00
Translation updater bot
49dc2d232e Localisation updates from https://translatewiki.net.
Change-Id: Id4b319b33c630f3a2db1b963d80bbd9c38070d32
2019-10-23 09:52:42 +02:00
libraryupgrader
7272a4fe24 build: Updating mediawiki/mediawiki-codesniffer to 28.0.0
Change-Id: I9c6b97d85e566a616ac6a5d5a2bcc462e1d1565e
2019-10-21 02:26:34 +00:00
62 changed files with 6433 additions and 2538 deletions

8
.eslintrc.json Normal file
View file

@ -0,0 +1,8 @@
{
"root": true,
"extends": [
"wikimedia/client-es5",
"wikimedia/jquery",
"wikimedia/mediawiki"
]
}

1
.gitignore vendored
View file

@ -5,3 +5,4 @@
node_modules/
/composer.lock
/vendor/
/.eslintcache

View file

@ -1,2 +0,0 @@
node_modules
vendor

View file

@ -1,13 +1,12 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.Usage.DbrQueryUsage.DbrQueryFound" />
<exclude name="MediaWiki.Usage.ExtendClassUsage.FunctionConfigUsage" />
<exclude name="PSR12.Properties.ConstantVisibility.NotFound" />
<exclude name="Squiz.Scope.MethodScope.Missing" />
</rule>
<file>.</file>
<arg name="extensions" value="php,php5,inc" />
<arg name="extensions" value="php" />
<arg name="encoding" value="UTF-8" />
</ruleset>

View file

@ -233,6 +233,16 @@ $specialPageAliases['sk'] = [
'ContributionScores' => [ 'SkórePríspevkov' ],
];
/** Serbian Cyrillic (српски (ћирилица)) */
$specialPageAliases['sr-ec'] = [
'ContributionScores' => [ 'ОценеДоприноса' ],
];
/** Serbian Latin (srpski (latinica)) */
$specialPageAliases['sr-el'] = [
'ContributionScores' => [ 'OceneDoprinosa' ],
];
/** Swedish (svenska) */
$specialPageAliases['sv'] = [
'ContributionScores' => [ 'Bidragspoäng' ],

View file

@ -1,93 +0,0 @@
<?php
/** \file
* \brief Contains setup code for the Contribution Scores Extension.
*/
# Not a valid entry point, skip unless MEDIAWIKI is defined
if ( !defined( 'MEDIAWIKI' ) ) {
echo 'Contribution Scores extension';
exit( 1 );
}
$wgExtensionCredits['specialpage'][] = [
'path' => __FILE__,
'name' => 'Contribution Scores',
'url' => 'https://www.mediawiki.org/wiki/Extension:Contribution_Scores',
'author' => 'Tim Laqua',
'descriptionmsg' => 'contributionscores-desc',
'version' => '1.25.0'
];
define( 'CONTRIBUTIONSCORES_MAXINCLUDELIMIT', 50 );
$wgContribScoreReports = null;
// These settings can be overridden in LocalSettings.php.
// Set to true to exclude bots from the reporting.
$wgContribScoreIgnoreBlockedUsers = false;
// Set to true to exclude blocked users from the reporting.
$wgContribScoreIgnoreBots = false;
// Set to true to use real user names when available. Only for MediaWiki 1.19 and later.
$wgContribScoresUseRealName = false;
// Set to true to disable cache for parser function and inclusion of table.
$wgContribScoreDisableCache = false;
$wgAutoloadClasses['ContributionScores'] = __DIR__ . '/ContributionScores_body.php';
$wgSpecialPages['ContributionScores'] = 'ContributionScores';
$wgMessagesDirs['ContributionScores'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['ContributionScoresAlias'] = __DIR__ . '/ContributionScores.alias.php';
$wgExtensionMessagesFiles['ContributionScoresMagic'] =
__DIR__ . '/ContributionScores.i18n.magic.php';
$wgHooks['ParserFirstCallInit'][] = 'efContributionScores_Setup';
function efContributionScores_Setup( &$parser ) {
$parser->setFunctionHook( 'cscore', 'efContributionScores_Render' );
return true;
}
function efContributionScores_Render( &$parser, $usertext, $metric = 'score' ) {
global $wgContribScoreDisableCache;
if ( $wgContribScoreDisableCache ) {
$parser->disableCache();
}
$user = User::newFromName( $usertext );
$dbr = wfGetDB( DB_REPLICA );
if ( $user instanceof User && $user->isLoggedIn() ) {
global $wgLang;
if ( $metric == 'score' ) {
$res = $dbr->select( 'revision',
'COUNT(DISTINCT rev_page)+SQRT(COUNT(rev_id)-COUNT(DISTINCT rev_page))*2 AS wiki_rank',
[ 'rev_user' => $user->getID() ] );
$row = $dbr->fetchObject( $res );
$output = $wgLang->formatNum( round( $row->wiki_rank, 0 ) );
} elseif ( $metric == 'changes' ) {
$res = $dbr->select( 'revision',
'COUNT(rev_id) AS rev_count',
[ 'rev_user' => $user->getID() ] );
$row = $dbr->fetchObject( $res );
$output = $wgLang->formatNum( $row->rev_count );
} elseif ( $metric == 'pages' ) {
$res = $dbr->select( 'revision',
'COUNT(DISTINCT rev_page) AS page_count',
[ 'rev_user' => $user->getID() ] );
$row = $dbr->fetchObject( $res );
$output = $wgLang->formatNum( $row->page_count );
} else {
$output = wfMessage( 'contributionscores-invalidmetric' )->text();
}
} else {
$output = wfMessage( 'contributionscores-invalidusername' )->text();
}
return $parser->insertStripItem( $output, $parser->mStripState );
}

View file

@ -1,275 +0,0 @@
<?php
/** \file
* \brief Contains code for the ContributionScores Class (extends SpecialPage).
*/
/// Special page class for the Contribution Scores extension
/**
* Special page that generates a list of wiki contributors based
* on edit diversity (unique pages edited) and edit volume (total
* number of edits.
*
* @ingroup Extensions
* @author Tim Laqua <t.laqua@gmail.com>
*/
class ContributionScores extends IncludableSpecialPage {
public function __construct() {
parent::__construct( 'ContributionScores' );
}
/// Generates a "Contribution Scores" table for a given LIMIT and date range
/**
* Function generates Contribution Scores tables in HTML format (not wikiText)
*
* @param int $days Days in the past to run report for
* @param int $limit Maximum number of users to return (default 50)
* @param string|null $title The title of the table
* @param array $options array of options (default none; nosort/notools)
* @return string Html Table representing the requested Contribution Scores.
*/
function genContributionScoreTable( $days, $limit, $title = null, $options = 'none' ) {
global $wgContribScoreIgnoreBots, $wgContribScoreIgnoreBlockedUsers, $wgContribScoresUseRealName;
$opts = explode( ',', strtolower( $options ) );
$dbr = wfGetDB( DB_REPLICA );
$userTable = $dbr->tableName( 'user' );
$userGroupTable = $dbr->tableName( 'user_groups' );
$revTable = $dbr->tableName( 'revision' );
$ipBlocksTable = $dbr->tableName( 'ipblocks' );
$sqlWhere = "";
$nextPrefix = "WHERE";
if ( $days > 0 ) {
$date = time() - ( 60 * 60 * 24 * $days );
$dateString = $dbr->timestamp( $date );
$sqlWhere .= " {$nextPrefix} rev_timestamp > '$dateString'";
$nextPrefix = "AND";
}
if ( $wgContribScoreIgnoreBlockedUsers ) {
$sqlWhere .= " {$nextPrefix} rev_user NOT IN " .
"(SELECT ipb_user FROM {$ipBlocksTable} WHERE ipb_user <> 0)";
$nextPrefix = "AND";
}
if ( $wgContribScoreIgnoreBots ) {
$sqlWhere .= " {$nextPrefix} rev_user NOT IN " .
"(SELECT ug_user FROM {$userGroupTable} WHERE ug_group='bot')";
}
$sqlMostPages = "SELECT rev_user,
COUNT(DISTINCT rev_page) AS page_count,
COUNT(rev_id) AS rev_count
FROM {$revTable}
{$sqlWhere}
GROUP BY rev_user
ORDER BY page_count DESC
LIMIT {$limit}";
$sqlMostRevs = "SELECT rev_user,
COUNT(DISTINCT rev_page) AS page_count,
COUNT(rev_id) AS rev_count
FROM {$revTable}
{$sqlWhere}
GROUP BY rev_user
ORDER BY rev_count DESC
LIMIT {$limit}";
$sql = "SELECT user_id, " .
"user_name, " .
"user_real_name, " .
"page_count, " .
"rev_count, " .
"page_count+SQRT(rev_count-page_count)*2 AS wiki_rank " .
"FROM $userTable u JOIN (($sqlMostPages) UNION ($sqlMostRevs)) s ON (user_id=rev_user) " .
"ORDER BY wiki_rank DESC " .
"LIMIT $limit";
$res = $dbr->query( $sql );
$sortable = in_array( 'nosort', $opts ) ? '' : ' sortable';
$output = "<table class=\"wikitable contributionscores plainlinks{$sortable}\" >\n" .
"<tr class='header'>\n" .
Html::element( 'th', [], $this->msg( 'contributionscores-rank' )->text() ) .
Html::element( 'th', [], $this->msg( 'contributionscores-score' )->text() ) .
Html::element( 'th', [], $this->msg( 'contributionscores-pages' )->text() ) .
Html::element( 'th', [], $this->msg( 'contributionscores-changes' )->text() ) .
Html::element( 'th', [], $this->msg( 'contributionscores-username' )->text() );
$altrow = '';
$user_rank = 1;
$lang = $this->getLanguage();
foreach ( $res as $row ) {
// Use real name if option used and real name present.
if ( $wgContribScoresUseRealName && $row->user_real_name !== '' ) {
$userLink = Linker::userLink(
$row->user_id,
$row->user_name,
$row->user_real_name
);
} else {
$userLink = Linker::userLink(
$row->user_id,
$row->user_name
);
}
$output .= Html::closeElement( 'tr' );
$output .= "<tr class='{$altrow}'>\n" .
"<td class='content' style='padding-right:10px;text-align:right;'>" .
$lang->formatNum( round( $user_rank, 0 ) ) .
"\n</td><td class='content' style='padding-right:10px;text-align:right;'>" .
$lang->formatNum( round( $row->wiki_rank, 0 ) ) .
"\n</td><td class='content' style='padding-right:10px;text-align:right;'>" .
$lang->formatNum( $row->page_count ) .
"\n</td><td class='content' style='padding-right:10px;text-align:right;'>" .
$lang->formatNum( $row->rev_count ) .
"\n</td><td class='content'>" .
$userLink;
# Option to not display user tools
if ( !in_array( 'notools', $opts ) ) {
$output .= Linker::userToolLinks( $row->user_id, $row->user_name );
}
$output .= Html::closeElement( 'td' ) . "\n";
if ( $altrow == '' && empty( $sortable ) ) {
$altrow = 'odd ';
} else {
$altrow = '';
}
$user_rank++;
}
$output .= Html::closeElement( 'tr' );
$output .= Html::closeElement( 'table' );
$dbr->freeResult( $res );
if ( !empty( $title ) ) {
$output = Html::rawElement( 'table',
[
'style' => 'border-spacing: 0; padding: 0',
'class' => 'contributionscores-wrapper',
'lang' => htmlspecialchars( $lang->getCode() ),
'dir' => $lang->getDir()
],
"\n" .
"<tr>\n" .
"<td style='padding: 0px;'>{$title}</td>\n" .
"</tr>\n" .
"<tr>\n" .
"<td style='padding: 0px;'>{$output}</td>\n" .
"</tr>\n"
);
}
return $output;
}
function execute( $par ) {
$this->setHeaders();
if ( $this->including() ) {
$this->showInclude( $par );
} else {
$this->showPage();
}
return true;
}
/**
* Called when being included on a normal wiki page.
* Cache is disabled so it can depend on the user language.
* @param string|null $par A subpage give to the special page
*/
function showInclude( $par ) {
$days = null;
$limit = null;
$options = 'none';
if ( !empty( $par ) ) {
$params = explode( '/', $par );
$limit = intval( $params[0] );
if ( isset( $params[1] ) ) {
$days = intval( $params[1] );
}
if ( isset( $params[2] ) ) {
$options = $params[2];
}
}
if ( empty( $limit ) || $limit < 1 || $limit > CONTRIBUTIONSCORES_MAXINCLUDELIMIT ) {
$limit = 10;
}
if ( is_null( $days ) || $days < 0 ) {
$days = 7;
}
if ( $days > 0 ) {
$reportTitle = $this->msg( 'contributionscores-days' )->numParams( $days )->text();
} else {
$reportTitle = $this->msg( 'contributionscores-allrevisions' )->text();
}
$reportTitle .= ' ' . $this->msg( 'contributionscores-top' )->numParams( $limit )->text();
$title = Xml::element( 'h4',
[ 'class' => 'contributionscores-title' ],
$reportTitle
) . "\n";
$this->getOutput()->addHTML( $this->genContributionScoreTable(
$days,
$limit,
$title,
$options
) );
}
/**
* Show the special page
*/
function showPage() {
global $wgContribScoreReports;
if ( !is_array( $wgContribScoreReports ) ) {
$wgContribScoreReports = [
[ 7, 50 ],
[ 30, 50 ],
[ 0, 50 ]
];
}
$out = $this->getOutput();
$out->addWikiMsg( 'contributionscores-info' );
foreach ( $wgContribScoreReports as $scoreReport ) {
list( $days, $revs ) = $scoreReport;
if ( $days > 0 ) {
$reportTitle = $this->msg( 'contributionscores-days' )->numParams( $days )->text();
} else {
$reportTitle = $this->msg( 'contributionscores-allrevisions' )->text();
}
$reportTitle .= ' ' . $this->msg( 'contributionscores-top' )->numParams( $revs )->text();
$title = Xml::element( 'h2',
[ 'class' => 'contributionscores-title' ],
$reportTitle
) . "\n";
$out->addHTML( $title );
$out->addHTML( $this->genContributionScoreTable( $days, $revs ) );
}
}
protected function getGroupName() {
return 'wiki';
}
}

View file

@ -1,29 +1,26 @@
/*jshint node:true */
/* eslint-env node, es6 */
module.exports = function ( grunt ) {
'use strict';
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-eslint' );
grunt.initConfig( {
jshint: {
all: [
'*.js'
]
},
banana: {
all: 'i18n'
},
jsonlint: {
eslint: {
options: {
cache: true
},
all: [
'**/*.json',
'**/*.{js,json}',
'!node_modules/**',
'!vendor/**'
]
}
} );
grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'test', [ 'eslint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
};

View file

@ -1,19 +1,25 @@
{
"require-dev": {
"jakub-onderka/php-parallel-lint": "1.0.0",
"mediawiki/mediawiki-codesniffer": "26.0.0",
"jakub-onderka/php-console-highlighter": "0.3.2",
"mediawiki/minus-x": "0.3.1"
"mediawiki/mediawiki-codesniffer": "45.0.0",
"mediawiki/minus-x": "1.1.3",
"php-parallel-lint/php-console-highlighter": "1.0.0",
"php-parallel-lint/php-parallel-lint": "1.4.0"
},
"scripts": {
"fix": [
"phpcbf",
"minus-x fix ."
"minus-x fix .",
"phpcbf"
],
"test": [
"parallel-lint . --exclude vendor --exclude node_modules",
"phpcs -p -s",
"@phpcs",
"minus-x check ."
]
],
"phpcs": "phpcs -sp --cache"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}

64
extension.json Normal file
View file

@ -0,0 +1,64 @@
{
"name": "ContributionScores",
"author": "Tim Laqua",
"url": "https://www.mediawiki.org/wiki/Extension:Contribution_Scores",
"descriptionmsg": "contributionscores-desc",
"version": "1.26.1",
"type": "specialpage",
"requires": {
"MediaWiki": ">= 1.34.0"
},
"SpecialPages": {
"ContributionScores": "ContributionScores"
},
"AutoloadClasses": {
"ContributionScores": "src/ContributionScores.php"
},
"Hooks": {
"ParserFirstCallInit": "ContributionScores::onParserFirstCallInit"
},
"MessagesDirs": {
"ContributionScores": [
"i18n"
]
},
"ExtensionMessagesFiles": {
"ContribScoreAlias": "ContributionScores.alias.php",
"ContribScoreMagic": "ContributionScores.i18n.magic.php"
},
"config": {
"ContribScoreReports": {
"value": null,
"description": "Each array defines a report - 7,50 is \"past 7 days \" and \"LIMIT 50 \" - Can be omitted."
},
"ContribScoreIgnoreBlockedUsers": {
"value": false,
"description": "Set to true to exclude blocked users from the reporting."
},
"ContribScoreIgnoreBots": {
"value": false,
"description": "Set to true to exclude bots users from the reporting."
},
"ContribScoreIgnoreUsernames": {
"value": [],
"description": "Array of usernames to exclude from the reporting."
},
"ContribScoresUseRealName": {
"value": false,
"description": "Set to true to use real user names when available."
},
"ContribScoreDisableCache": {
"value": false,
"description": "Set to true to disable cache for parser function and inclusion of table."
},
"ContribScoreUseRoughEditCount": {
"value": false,
"description": "Set to true to use the rough number of edits in user table, for performance issue."
},
"ContribScoreCacheTTL": {
"value": 30,
"description": "Cache the contribution scores data, in minutes."
}
},
"manifest_version": 2
}

View file

@ -1,8 +1,8 @@
{
"@metadata": {
"authors": [
"Mousa",
"Alp Er Tunqa"
"Alp Er Tunqa",
"Mousa"
]
},
"contributionscores": "چالیشماق امتیازلاری",

View file

@ -1,10 +1,10 @@
{
"@metadata": {
"authors": [
"Bellayet",
"Wikitanvir",
"Aftab1995",
"Aftabuzzaman",
"Bellayet",
"Wikitanvir",
"আফতাবুজ্জামান"
]
},

View file

@ -3,7 +3,8 @@
"authors": [
"CERminator",
"KWiki",
"Srdjan m"
"Srdjan m",
"Srđan"
]
},
"contributionscores": "Rezultat doprinosa",

View file

@ -4,7 +4,8 @@
"Byrial",
"Christian List",
"Kaare",
"Peter Alberti"
"Peter Alberti",
"Saederup92"
]
},
"contributionscores": "Bidragspoint",
@ -14,6 +15,7 @@
"contributionscores-days": "Sidste {{PLURAL:$1|dag|$1 dage}}",
"contributionscores-allrevisions": "Gennem tiden",
"contributionscores-score": "Point",
"contributionscores-rank": "Rang",
"contributionscores-pages": "Sider",
"contributionscores-changes": "Ændringer",
"contributionscores-username": "Brugernavn",

View file

@ -8,7 +8,7 @@
]
},
"contributionscores": "Statistik zu Benutzern",
"contributionscores-desc": "Ergänzt eine [[Special:ContributionScores|Spezialseite]] zum Abfragen der Datenbank des Wikis bezüglich der Benutzer mit den meisten Beiträgen",
"contributionscores-desc": "Erweitert das Wiki um eine [[Special:ContributionScores|Spezialseite]] zum Ermitteln der Benutzer mit den meisten Beiträgen",
"contributionscores-info": "In die Bewertung fließen hauptsächlich einmalig bearbeitete Seiten unter Berücksichtigung einer hohen Bearbeitungszahl ein.",
"contributionscores-top": "(Top $1)",
"contributionscores-days": "{{PLURAL:$1|Letzter Tag|Letzte $1 Tage}}",

View file

@ -2,8 +2,8 @@
"@metadata": {
"authors": [
"Erdemaslancan",
"Mirzali",
"Marmase"
"Marmase",
"Mirzali"
]
},
"contributionscores": "Skorê iştıraqan",
@ -11,7 +11,7 @@
"contributionscores-info": "Ebe pawıtışê hecmê tedqiqê berzi ra, puwan raveri pelanê bêemsalanê vurniyayeyan senceno.",
"contributionscores-top": "(Tewr Gırde $1)",
"contributionscores-days": "{{PLURAL:$1|Roca peyêne|$1 Rocê peyêni}}",
"contributionscores-allrevisions": "Çaxan de hemi",
"contributionscores-allrevisions": "Her dem",
"contributionscores-score": "Puwan",
"contributionscores-rank": "Rêze",
"contributionscores-pages": "Peli",

View file

@ -4,8 +4,8 @@
"Consta",
"Crazymadlover",
"Omnipaedista",
"ZaDiak",
"Protnet"
"Protnet",
"ZaDiak"
]
},
"contributionscores": "Βαθμολογίες συνεισφοράς",

View file

@ -15,4 +15,4 @@
"contributionscores-username": "Username",
"contributionscores-invalidusername": "Invalid username",
"contributionscores-invalidmetric": "Invalid metric"
}
}

View file

@ -2,9 +2,9 @@
"@metadata": {
"authors": [
"Michawiki",
"Yekrats",
"Mirin",
"Robin van der Vliet",
"Mirin"
"Yekrats"
]
},
"contributionscores": "Poentaro de Kontribuoj",
@ -18,6 +18,6 @@
"contributionscores-pages": "Paĝoj",
"contributionscores-changes": "Ŝanĝoj",
"contributionscores-username": "Uzantnomo",
"contributionscores-invalidusername": "Nevalida salutnomo",
"contributionscores-invalidusername": "Nevalida uzantnomo",
"contributionscores-invalidmetric": "Nevalida parametro"
}

View file

@ -6,8 +6,8 @@
"Fitoschido",
"Ihojose",
"Imre",
"Sanbec",
"Macofe"
"Macofe",
"Sanbec"
]
},
"contributionscores": "Puntuaciones de contribuciones",

View file

@ -1,8 +0,0 @@
{
"@metadata": {
"authors": [
"Better"
]
},
"contributionscores-days": "Úrtimus $1 dias"
}

View file

@ -1,13 +1,13 @@
{
"@metadata": {
"authors": [
"Alirezaaa",
"Ebraminio",
"Huji",
"Mjbmr",
"Reza1615",
"Tofighi",
"ZxxZxxZ",
"Alirezaaa"
"ZxxZxxZ"
]
},
"contributionscores": "امتیاز مشارکت",

View file

@ -1,12 +1,13 @@
{
"@metadata": {
"authors": [
"01miki10",
"Crt",
"Nike",
"Str4nd",
"Stryn",
"Pxos",
"Pyscowicz"
"Pyscowicz",
"Str4nd",
"Stryn"
]
},
"contributionscores": "Muokkauspisteet",
@ -18,7 +19,7 @@
"contributionscores-rank": "Sija",
"contributionscores-pages": "Sivuja",
"contributionscores-changes": "Muutoksia",
"contributionscores-username": "Käyttäjätunnus",
"contributionscores-invalidusername": "Virheellinen käyttäjätunnus",
"contributionscores-username": "Käyttäjänimi",
"contributionscores-invalidusername": "Virheellinen käyttäjänimi",
"contributionscores-invalidmetric": "Virheellinen muuttuja"
}

8
i18n/fit.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Pyscowicz"
]
},
"contributionscores": "Mookkauspisteet"
}

View file

@ -21,6 +21,6 @@
"contributionscores-pages": "Pages",
"contributionscores-changes": "Changements",
"contributionscores-username": "Nom dutilisateur",
"contributionscores-invalidusername": "Nom dutilisateur invalide",
"contributionscores-invalidusername": "Nom dutilisateur incorrect",
"contributionscores-invalidmetric": "Métrique incorrecte"
}

View file

@ -1,10 +1,10 @@
{
"@metadata": {
"authors": [
"Snakesteuben",
"Robin0van0der0vliet",
"PiefPafPier",
"Robin van der Vliet",
"PiefPafPier"
"Robin0van0der0vliet",
"Snakesteuben"
]
},
"contributionscores-username": "Meidochnamme"

View file

@ -3,8 +3,8 @@
"authors": [
"Ansumang",
"Kaustubh",
"Siddhartha Ghai",
"Sfic"
"Sfic",
"Siddhartha Ghai"
]
},
"contributionscores": "योगदान संख्या",

View file

@ -3,19 +3,21 @@
"authors": [
"Dalibor Bosits",
"Ex13",
"MaGa",
"SpeedyGonsales"
]
},
"contributionscores": "Najbolji suradnici",
"contributionscores-desc": "Šalje upit bazi podataka za najveći [[Special:ContributionScores|broj suradničkih doprinosa]]",
"contributionscores-info": "Rezultat se dobiva kao suma slijedećih stavki:\n*1 bod za svaku stranicu koju ste uređivali\n* (kvadratni) korijen iz (broja ukupnih uređivanja) - (broja stranica koje ste uređivali) * 2\n\nRezultat dobiven na ovaj način daje veću težinu broju uređivanja različitih stranica nego ukupnom broju uređivanja. U osnovi, ovakav rezultat mjeri prvenstveno broj različitih stranica koje ste uređivali, uzimajući u obzir broj uređivanja, jer veći broj uređivanja na nekom članku daje kvalitetniji članak.",
"contributionscores-top": "(Najboljih $1)",
"contributionscores-info": "U prvom planu rezultat mjeri jedinstvene izmijenjene stranice, uzimajući u obzir veliku količinu uređivanja.",
"contributionscores-top": "(najboljih $1)",
"contributionscores-days": "{{PLURAL:$1|Zadnji dan|Zadnjih $1 dana}}",
"contributionscores-allrevisions": "Sva uređivanja",
"contributionscores-allrevisions": "Sve vrijeme",
"contributionscores-score": "Rezultat",
"contributionscores-rank": "Mjesto",
"contributionscores-pages": "Stranica",
"contributionscores-changes": "Uređivanja",
"contributionscores-username": "Ime suradnika",
"contributionscores-username": "Suradničko ime",
"contributionscores-invalidusername": "Nevaljano suradničko ime",
"contributionscores-invalidmetric": "Nevaljana metrika"
}

View file

@ -6,11 +6,12 @@
},
"contributionscores": "Contes de contribution",
"contributionscores-desc": "Calcula li funde de data del wiki por max alt [[Special:ContributionScores|volúmine de contribution de usator]]",
"contributionscores-info": "Contes es calculat quam seque:\n*Un (1) punctu por chascun págine unic redactet\n*Fonte de quadrat de (total de redactiones fat) - (total unique pages) * 2\nContes calculat in ti diversitá de redaction in pesa maniere súper de volúmine de redaction.\nBasicmen, ti conte mesura primarimen págines unic redactet, che consideration por alt volúmine de redaction - suposit esser un págine de alt qualitá.",
"contributionscores-info": "Li calcul primarimen mesura págines unic redactet, considerant li alt volume de redactiones.",
"contributionscores-top": "(Prim $1)",
"contributionscores-days": "Ultim {{PLURAL:$1|die|$1 dies}}",
"contributionscores-allrevisions": "Omni témpor",
"contributionscores-score": "Conte",
"contributionscores-rank": "Classification",
"contributionscores-pages": "Págines",
"contributionscores-changes": "Changes",
"contributionscores-username": "Nómine de usator",

View file

@ -5,5 +5,8 @@
]
},
"contributionscores-days": "Lasta {{PLURAL:$1|dio|$1 dii}}",
"contributionscores-pages": "Pagini"
"contributionscores-score": "Nombro di punti",
"contributionscores-pages": "Pagini",
"contributionscores-changes": "Modifikuri",
"contributionscores-username": "Uzeronomo"
}

View file

@ -1,13 +1,15 @@
{
"@metadata": {
"authors": [
"Diki Ananta",
"Meursault2004",
"NoiX180",
"Pras",
"NoiX180"
"Sumbukompor"
]
},
"contributionscores": "Bijining pasumbang",
"contributionscores-desc": "Nglakokaké polling (angkèt) ing basis data kanggo [[Special:ContributionScores|volume kontribusi panganggo]]",
"contributionscores-desc": "Nglakokaké polling (angkèt) ing basis data kanggo [[Special:ContributionScores|volume kontribusi naraguna]]",
"contributionscores-info": "Skoré diétung kaya mangkéné:\n* Biji siji (1) per kaca unik sing disunting\n* Oyot (bs. Indonesia ''akar'') saka (Gunggungé Suntingan) - (Gunggungé Kaca-KAca Unik) * 2\nSkor sing diétung miturut cara iki bisa nyerminaké divèrsitas suntingan sadhuwuring volume suntingan.\nSacara dhasar, skor iki utamané ngétung kaca-kaca unik sing disunting, karo mélu nimbangaké volume suntingan dhuwur - diasumsèkaké kwalitas kacané luwih dhuwur.",
"contributionscores-top": "(Top $1)",
"contributionscores-days": "{{PLURAL:$1|dina|$1 dina}} pungkasan",
@ -16,7 +18,7 @@
"contributionscores-rank": "Rangking",
"contributionscores-pages": "Kaca",
"contributionscores-changes": "Owah-owahan",
"contributionscores-username": "Jeneng panganggo",
"contributionscores-invalidusername": "Jeneng panganggo ora sah",
"contributionscores-username": "Jeneng naraguna",
"contributionscores-invalidusername": "Jeneng naraguna ora sah",
"contributionscores-invalidmetric": "Metrik ora sah"
}

View file

@ -1,5 +1,7 @@
{
"@metadata": [],
"@metadata": {
"authors": []
},
"contributionscores": "Üles berw esepteri",
"contributionscores-info": "Esepter kelesi deý sanaladı:\n*1 upaý ärbir tüzetilgen biregeý bet üşin\n*Mınanıñ şarşı tübiri (Barlıq İstelingen Tüzetwler) (Barlıq Biregeý Better) * 2\nOsı täsilmen sanalğan esepter tüzetw awqımındağı öñdew ärkelkiliginiñ salmağın ölşeýdi. Negizinde, bul esep aldımen tüzetilgen birkelki betterdi ölşeýdi, joğarğı öñdew awqımımen birge — joğarı sapalı bet jağdaýımen eseptep.",
"contributionscores-top": "(Joğarğı $1)",

View file

@ -3,9 +3,9 @@
"authors": [
"Hym411",
"Priviet",
"Revi",
"Shirayuki",
"아라",
"Revi"
"아라"
]
},
"contributionscores": "기여 점수",

View file

@ -1,10 +1,12 @@
{
"@metadata": {
"authors": [
"Balyozxane",
"George Animal"
]
},
"contributionscores-allrevisions": "Hemû dem",
"contributionscores-pages": "Rûpel",
"contributionscores-changes": "Guhartin",
"contributionscores-username": "Navê bikarhêner"
}

View file

@ -6,7 +6,7 @@
]
},
"contributionscores": "Bewäertung vun den Ännerungen",
"contributionscores-desc": "Ufro un d'Wiki-Datebank no den héichste [[Special:ContributionScores|Benotzerscoren]]",
"contributionscores-desc": "Ufro un d'Wiki-Datebank no den héchste [[Special:ContributionScores|Benotzerscoren]]",
"contributionscores-info": "D'Bewäertung moosst Zuel vu geännerte Säite a consideréiert d'Zuel vun den Ännerungen.",
"contributionscores-top": "(Top $1)",
"contributionscores-days": "{{PLURAL:$1|Leschten Dag|Lescht $1 Deeg}}",

8
i18n/lij.json Normal file
View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Giromin Cangiaxo"
]
},
"contributionscores": "Pontezzi contributi"
}

View file

@ -6,7 +6,7 @@
},
"contributionscores": "Оцени за придонеси",
"contributionscores-desc": "Презема податоци од викибазата за [[Special:ContributionScores|корисници со највеќе придонеси]]",
"contributionscores-info": "Салдото е мерка што изразува уредувања на засебни страници, со оглед на големиот број на уредувања.",
"contributionscores-info": "Салдото е мерка што изразува уредувања на одделни страници, со оглед на големиот број на уредувања.",
"contributionscores-top": "(Најдобри $1)",
"contributionscores-days": "{{PLURAL:$1|Последниот ден|Последните $1 дена}}",
"contributionscores-allrevisions": "На сите времиња",
@ -16,5 +16,5 @@
"contributionscores-changes": "Измени",
"contributionscores-username": "Корисничко име",
"contributionscores-invalidusername": "Неправилно корисничко име",
"contributionscores-invalidmetric": "Грешна метрика"
"contributionscores-invalidmetric": "Грешно мерило"
}

13
i18n/mni.json Normal file
View file

@ -0,0 +1,13 @@
{
"@metadata": {
"authors": [
"Awangba Mangang"
]
},
"contributionscores-allrevisions": "ꯃꯇꯝ ꯄꯨꯂꯞ",
"contributionscores-rank": "ꯊꯥꯛ",
"contributionscores-pages": "ꯂꯃꯥꯏꯁꯤꯡ",
"contributionscores-changes": "ꯑꯍꯣꯡꯕꯁꯤꯡ",
"contributionscores-username": "ꯁꯤꯖꯤꯟꯅꯔꯤꯕ ꯃꯃꯤꯡ",
"contributionscores-invalidusername": "ꯁꯤꯖꯤꯟꯅꯔꯤꯕ ꯃꯃꯤꯡ ꯌꯥꯎꯗꯦ"
}

View file

@ -1,8 +1,8 @@
{
"@metadata": {
"authors": [
"Ninjastrikers",
"Dr Lotus Black"
"Dr Lotus Black",
"Ninjastrikers"
]
},
"contributionscores": "ပံ့ပို့မှု ရမှတ်များ",

View file

@ -1,9 +1,10 @@
{
"@metadata": {
"authors": [
"Akapochtli",
"Fluence"
]
},
"contributionscores-changes": "Tlapatlaliztli",
"contributionscores-username": "Tlatequitiltilīltōcāitl"
"contributionscores-username": "Tequitiuhcatocaitll"
}

View file

@ -1,10 +1,10 @@
{
"@metadata": {
"authors": [
"Nghtwlkr",
"Helland",
"Danmichaelo",
"Jon Harald Søby"
"Helland",
"Jon Harald Søby",
"Nghtwlkr"
]
},
"contributionscores": "Bidragspoeng",

View file

@ -1,8 +1,17 @@
{
"@metadata": {
"authors": [
"RajeshPandey"
"RajeshPandey",
"पर्वत सुबेदी"
]
},
"contributionscores-username": "प्रयोगकर्ता नाम"
"contributionscores": "योगदान प्राप्ताङ्कहरू",
"contributionscores-days": "अन्तिम {{PLURAL:$1|दिन|$1 दिनहरू}}",
"contributionscores-allrevisions": "सबै समय",
"contributionscores-score": "प्राप्ताङ्क",
"contributionscores-rank": "क्रम",
"contributionscores-pages": "पृष्ठहरू",
"contributionscores-changes": "परिवर्तनहरू",
"contributionscores-username": "प्रयोगकर्ता नाम",
"contributionscores-invalidusername": "अबैध प्रयोगकर्ता नाम"
}

View file

@ -5,10 +5,10 @@
"Derbeth",
"Equadus",
"McMonster",
"Sp5uhe",
"Wpedzich",
"Rail",
"Railfail536",
"Rail"
"Sp5uhe",
"Wpedzich"
]
},
"contributionscores": "Punkty za edycje",

View file

@ -1,9 +1,11 @@
{
"@metadata": {
"authors": [
"Abbas dhothar",
"BukhariSaeed"
]
},
"contributionscores-days": "پچھلے{{PLURAL:$1|دن|$1 دناں}}",
"contributionscores-changes": "تبدیلیاں",
"contributionscores-username": "ورتن آلے دا ناں"
}

View file

@ -2,8 +2,8 @@
"@metadata": {
"authors": [
"Ahmed-Najib-Biabani-Ibrahimkhel",
"Baloch Khan",
"Amjad Khan"
"Amjad Khan",
"Baloch Khan"
]
},
"contributionscores-days": "وروستۍ {{PLURAL:$1|ورځ|$1 ورځې}}",

View file

@ -1,13 +1,13 @@
{
"@metadata": {
"authors": [
"!Silent",
"Brunoy Anastasiya Seryozhenko",
"Crazymadlover",
"Eduardo.mps",
"Giro720",
"Luckas",
"HenriqueCrang",
"!Silent",
"Luckas",
"Opraco"
]
},

View file

@ -1,11 +1,11 @@
{
"@metadata": {
"authors": [
"Fúlvio",
"Hamilton Abreu",
"Malafaya",
"Waldir",
"Vitorvicentevalente",
"Fúlvio",
"Waldir",
"Waldyrious"
]
},

View file

@ -4,11 +4,11 @@
"Jon Harald Søby",
"JtFuruhata",
"Kalan",
"Liuxinyu970226",
"Mormegil",
"Purodha",
"Raymond",
"Shirayuki",
"Liuxinyu970226",
"Tacsipacsi"
]
},

View file

@ -2,12 +2,12 @@
"@metadata": {
"authors": [
"Ahonc",
"Kaganer",
"Kalan",
"Lockal",
"Okras",
"Ole Yves",
"Александр Сигачёв",
"Kaganer"
"Александр Сигачёв"
]
},
"contributionscores": "Оценка вклада",

View file

@ -2,16 +2,19 @@
"@metadata": {
"authors": [
"Helix84",
"Teslaton"
"Luky001",
"Teslaton",
"Yardom78"
]
},
"contributionscores": "Skóre príspevkov",
"contributionscores-desc": "Zisťuje naväčší [[Special:ContributionScores|objem používateľských príspevkov]] z databázy wiki",
"contributionscores-info": "Skóre sa počíta nasledovne:\n*1 bod za každú jedinečnú stránku, ktorú používateľ upravoval\n*Odmocnina z (celkom úprav) - (celkom jedinečných stránok) * 2\nSkóre vypočítané týmto spôsobom vážia diverzitu úprav viac ako objem úprav. V podstate toto skóre meria najmä počet upravovaných jedinečných stránok s prihliadnutím na vysoký objem úprav; čo sa pokladá za stránku vyššej kvality.",
"contributionscores-desc": "Získava údaje z databázy wiki o [[Special:ContributionScores|množstve používateľských príspevkov]]",
"contributionscores-info": "Skóre primárne meria jedinečné editované stránky s ohľadom na veľké množstvo úprav.",
"contributionscores-top": "(Najlepších $1)",
"contributionscores-days": "{{PLURAL:$1|Posledný $1 deň|Posledné $1 dni|Posledných $1 dní}}",
"contributionscores-allrevisions": "Celá história",
"contributionscores-allrevisions": "Celkom",
"contributionscores-score": "Skóre",
"contributionscores-rank": "Poradie",
"contributionscores-pages": "Stránky",
"contributionscores-changes": "Zmeny",
"contributionscores-username": "Používateľské meno",

View file

@ -1,12 +1,13 @@
{
"@metadata": {
"authors": [
"Acamicamacaraca",
"Kizule",
"Milicevic01",
"Rancher",
"Sasa Stefanovic",
"Михајло Анђелковић",
"Zoranzoki21",
"Acamicamacaraca"
"Михајло Анђелковић"
]
},
"contributionscores": "Оцене доприноса",

View file

@ -1,18 +1,22 @@
{
"@metadata": {
"authors": [
"Woraponboonkerd",
"Ans"
"Aefgh39622",
"Ans",
"Woraponboonkerd"
]
},
"contributionscores": "คะแนนการแก้ไข",
"contributionscores-desc": "จัดอันดับฐานข้อมูลของวิกิสำหรับ[[Special:ContributionScores|ผู้ใ้ช้ที่มีจำนวนการแก้ไขสูงสุด]]",
"contributionscores-info": "วิธีการคิดคะแนนเป็นดังต่อไปนี้:\n* หนึ่ง (1) คะแนนต่อจำนวนหน้าที่เข้าร่วมแก้ไข (ชื่อของหน้าไม่ซ้ำกัน)\n* รากที่สองของจำนวนการแก้ไขทั้งหมด - จำนวนหน้าทั้งหมดที่ร่วมแก้ไข * 2\nคะแนนจะถูกคิดโดยให้น้ำหนักของการแก้ไขที่หลากหลายมากกว่าจำนวนการแก้ไข\nโดยทั่วไป คะแนนนี้ชี้วัดถึงจำนวนหน้าต่างๆ ที่เข้าร่วมแก้ไข โดยคำนึงถึงจำนวนการแก้ไขทั้งหมดด้วย จึงคาดการณ์ได้ว่าจะทำให้มีหน้าที่มีคุณภาพสูงขึ้น",
"contributionscores-info": "คะแนนคิดจากจำนวนหน้าที่เข้าร่วมแก้ไข พร้อมพิจารณาปริมาณการแก้ไขเป็นหลัก",
"contributionscores-top": "($1 อันดับแรก)",
"contributionscores-days": "$1 {{PLURAL:$1|วัน|วัน}} ที่แล้ว",
"contributionscores-allrevisions": "ตลอดเวลา",
"contributionscores-score": "คะแนน",
"contributionscores-rank": "การจัดอันดับ",
"contributionscores-pages": "จำนวนหน้า",
"contributionscores-changes": "การเปลี่ยนแปลง",
"contributionscores-username": "ชื่อผู้ใช้",
"contributionscores-invalidusername": "ชื่อผู้ใช้ไม่ถูกต้อง"
"contributionscores-invalidusername": "ชื่อผู้ใช้ไม่ถูกต้อง",
"contributionscores-invalidmetric": "เกณฑ์ชี้วัดไม่ถูกต้อง"
}

10
i18n/ti.json Normal file
View file

@ -0,0 +1,10 @@
{
"@metadata": {
"authors": [
"Joanmp17"
]
},
"contributionscores-pages": "ገጻት",
"contributionscores-changes": "ለውጥታት",
"contributionscores-username": "ስም ተጠቃሚ"
}

View file

@ -1,12 +1,12 @@
{
"@metadata": {
"authors": [
"Hedda",
"Joseph",
"Karduelis",
"Mach",
"Suelnur",
"Vito Genovese",
"Hedda"
"Vito Genovese"
]
},
"contributionscores": "Katkı puanları",

View file

@ -1,6 +1,7 @@
{
"@metadata": {
"authors": [
"Ерней",
"Ильнар"
]
},
@ -10,10 +11,10 @@
"contributionscores-top": "(Иң әйбәт $1)",
"contributionscores-days": "Соңгы {{PLURAL:$1|$1 көн өчен}}",
"contributionscores-allrevisions": "Бөтен вакыт өчен",
"contributionscores-score": илге",
"contributionscores-score": әя",
"contributionscores-rank": "Ранг",
"contributionscores-pages": "Битләр саны",
"contributionscores-changes": "Үзгәртүләр",
"contributionscores-pages": "Битләр",
"contributionscores-changes": "Төзәтмәләр",
"contributionscores-username": "Кулланучы исеме",
"contributionscores-invalidusername": "Кулланучының исеме дөрес түгел",
"contributionscores-invalidmetric": "Ялгыш билгеләү"

View file

@ -1,17 +1,18 @@
{
"@metadata": {
"authors": [
"Candalua"
"Candalua",
"Fierodelveneto"
]
},
"contributionscores": "Puntegi contributi",
"contributionscores": "Ponteji contribusion",
"contributionscores-desc": "Intèroga el database de la wiki par el pi grando [[Special:ContributionScores|volume de contributi utente]]",
"contributionscores-info": "I punti i vien calcolà come segue:\n*Un (1) punto par ogni diversa pagina modificà\n*Raìsa quadrata de (Tute le modifiche fate) - (Total de le pagine modificà) * 2\nFasendo i conti in sta maniera pesa piassè la diversità de le modifiche rispeto al nùmaro dei contributi.\nIn sostansa, sto puntegio el tien conto sopratuto de le diverse pagine modificà, tegnendo in considerazion anca un alto volume de modifiche - che fa pensar a na pi alta qualità de la pagina modificà.",
"contributionscores-top": "(Ultimi $1)",
"contributionscores-days": "{{PLURAL:$1|Ultimo zòrno|Ultimi $1 zòrni}}",
"contributionscores-allrevisions": "Tute le revision",
"contributionscores-score": "Puntegio",
"contributionscores-pages": "Pagine",
"contributionscores-pages": "Pàjine",
"contributionscores-changes": "Canbiamenti",
"contributionscores-username": "Nome utente",
"contributionscores-invalidusername": "Nome utente mia valido",

View file

@ -2,6 +2,7 @@
"@metadata": {
"authors": [
"Minh Nguyen",
"Phjtieudoc",
"Vinhtantran"
]
},
@ -13,7 +14,7 @@
"contributionscores-allrevisions": "Từ trước đến nay",
"contributionscores-score": "Điểm số",
"contributionscores-pages": "Trang",
"contributionscores-changes": "Các thay đổi",
"contributionscores-changes": "Thay đổi",
"contributionscores-username": "Tên người dùng",
"contributionscores-invalidusername": "Tên người dùng không hợp lệ",
"contributionscores-invalidmetric": "Chuẩn đo không hợp lệ"

View file

@ -1,7 +1,9 @@
{
"@metadata": {
"authors": [
"Moon0319",
"PhiLiP",
"Roy17",
"Shinjiman",
"Shirayuki",
"Yueman"
@ -12,7 +14,7 @@
"contributionscores-info": "呢個分數係會依主要嘅唯一編輯過嘅頁,同埋考慮高編輯量。",
"contributionscores-top": "(最高$1名)",
"contributionscores-days": "最近$1日",
"contributionscores-allrevisions": "全部時間",
"contributionscores-allrevisions": "有史以來",
"contributionscores-score": "分數",
"contributionscores-rank": "等級",
"contributionscores-pages": "版",

View file

@ -1,15 +1,15 @@
{
"@metadata": {
"authors": [
"Cwlin0416",
"Kly",
"LNDDYL",
"Liuxinyu970226",
"Mark85296341",
"PhiLiP",
"Shinjiman",
"Shirayuki",
"Simon Shek",
"Cwlin0416",
"Liuxinyu970226",
"LNDDYL",
"Kly"
"Simon Shek"
]
},
"contributionscores": "貢獻分數",

7752
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,13 @@
{
"name": "ContributionScores",
"private": true,
"scripts": {
"test": "grunt test"
},
"devDependencies": {
"grunt": "1.0.4",
"grunt-banana-checker": "0.4.0",
"grunt-contrib-jshint": "0.11.3",
"grunt-jscs": "2.5.0",
"grunt-jsonlint": "1.0.7"
"eslint-config-wikimedia": "0.28.2",
"grunt": "1.6.1",
"grunt-banana-checker": "0.13.0",
"grunt-eslint": "24.3.0"
}
}

436
src/ContributionScores.php Normal file
View file

@ -0,0 +1,436 @@
<?php
/** \file
* \brief Contains code for the ContributionScores Class (extends SpecialPage).
*/
use MediaWiki\MediaWikiServices;
/// Special page class for the Contribution Scores extension
/**
* Special page that generates a list of wiki contributors based
* on edit diversity (unique pages edited) and edit volume (total
* number of edits.
*
* @ingroup Extensions
* @author Tim Laqua <t.laqua@gmail.com>
*/
class ContributionScores extends IncludableSpecialPage {
const CONTRIBUTIONSCORES_MAXINCLUDELIMIT = 50;
public function __construct() {
parent::__construct( 'ContributionScores' );
}
public static function onParserFirstCallInit( Parser $parser ) {
$parser->setFunctionHook( 'cscore', [ self::class, 'efContributionScoresRender' ] );
}
public static function efContributionScoresRender( $parser, $usertext, $metric = 'score' ) {
global $wgContribScoreDisableCache, $wgContribScoreUseRoughEditCount;
if ( $wgContribScoreDisableCache ) {
$parser->getOutput()->updateCacheExpiry( 0 );
}
$user = User::newFromName( $usertext );
$loadBalancer = MediaWikiServices::getInstance()->getDBLoadBalancer();
$dbr = $loadBalancer->getConnection( DB_REPLICA );
if ( $user instanceof User && $user->isRegistered() ) {
global $wgLang;
$revVar = $wgContribScoreUseRoughEditCount ? 'user_editcount' : 'COUNT(rev_id)';
$revWhere = ActorMigration::newMigration()->getWhere( $dbr, 'rev_user', $user );
if ( $metric == 'score' ) {
$row = $dbr->selectRow(
[ 'revision' ] + $revWhere['tables'],
[ 'wiki_rank' => "COUNT(DISTINCT rev_page)+SQRT($revVar-COUNT(DISTINCT rev_page))*2" ],
$revWhere['conds'],
__METHOD__,
[],
$revWhere['joins']
);
$output = $wgLang->formatNum( round( $row->wiki_rank, 0 ) );
} elseif ( $metric == 'changes' ) {
$row = $dbr->selectRow(
[ 'revision' ] + $revWhere['tables'],
[ 'rev_count' => $revVar ],
$revWhere['conds'],
__METHOD__,
[],
$revWhere['joins']
);
$output = $wgLang->formatNum( $row->rev_count );
} elseif ( $metric == 'pages' ) {
$row = $dbr->selectRow(
[ 'revision' ] + $revWhere['tables'],
[ 'page_count' => 'COUNT(DISTINCT rev_page)' ],
$revWhere['conds'],
__METHOD__,
[],
$revWhere['joins']
);
$output = $wgLang->formatNum( $row->page_count );
} else {
$output = wfMessage( 'contributionscores-invalidmetric' )->text();
}
} else {
$output = wfMessage( 'contributionscores-invalidusername' )->text();
}
return $parser->insertStripItem( $output, $parser->getStripState() );
}
/**
* Function fetch Contribution Scores data from database
*
* @param int $days Days in the past to run report for
* @param int $limit Maximum number of users to return (default 50)
* @return array Data including the requested Contribution Scores.
*/
public static function getContributionScoreData( $days, $limit ) {
global $wgContribScoreIgnoreBots, $wgContribScoreIgnoreBlockedUsers, $wgContribScoreIgnoreUsernames,
$wgContribScoreUseRoughEditCount;
$loadBalancer = MediaWikiServices::getInstance()->getDBLoadBalancer();
$dbr = $loadBalancer->getConnection( DB_REPLICA );
$revQuery = ActorMigration::newMigration()->getJoin( 'rev_user' );
$revQuery['tables'] = array_merge( [ 'revision' ], $revQuery['tables'] );
$revUser = $revQuery['fields']['rev_user'];
$revUsername = $revQuery['fields']['rev_user_text'];
$sqlWhere = [];
if ( $days > 0 ) {
$date = time() - ( 60 * 60 * 24 * $days );
$sqlWhere[] = 'rev_timestamp > ' . $dbr->addQuotes( $dbr->timestamp( $date ) );
}
$sqlVars = [
'rev_user' => $revUser,
'page_count' => 'COUNT(DISTINCT rev_page)'
];
if ( $wgContribScoreUseRoughEditCount ) {
$revQuery['tables'][] = 'user';
$revQuery['joins']['user'] = [ 'LEFT JOIN', [ "$revUser != 0", "user_id = $revUser" ] ];
$sqlVars['rev_count'] = 'user_editcount';
} else {
$sqlVars['rev_count'] = 'COUNT(rev_id)';
}
if ( $wgContribScoreIgnoreBlockedUsers ) {
$sqlWhere[] = "{$revUser} NOT IN " .
$dbr->buildSelectSubquery( [
'block',
'block_target'
],
'bt_user',
'bt_user <> 0',
__METHOD__,
[],
[
'block_target' => [ 'JOIN', [
'bl_target=bt_id'
] ]
]
);
}
if ( $wgContribScoreIgnoreBots ) {
$sqlWhere[] = "{$revUser} NOT IN " .
$dbr->buildSelectSubquery( 'user_groups', 'ug_user', [
'ug_group' => 'bot',
'ug_expiry IS NULL OR ug_expiry >= ' . $dbr->addQuotes( $dbr->timestamp() )
], __METHOD__ );
}
if ( count( $wgContribScoreIgnoreUsernames ) ) {
$listIgnoredUsernames = $dbr->makeList( $wgContribScoreIgnoreUsernames );
$sqlWhere[] = "{$revUsername} NOT IN ($listIgnoredUsernames)";
}
if ( $dbr->unionSupportsOrderAndLimit() ) {
$order = [
'GROUP BY' => 'rev_user',
'ORDER BY' => 'page_count DESC',
'LIMIT' => $limit
];
} else {
$order = [ 'GROUP BY' => 'rev_user' ];
}
$sqlMostPages = $dbr->selectSQLText(
$revQuery['tables'],
$sqlVars,
$sqlWhere,
__METHOD__,
$order,
$revQuery['joins']
);
if ( $dbr->unionSupportsOrderAndLimit() ) {
$order['ORDER BY'] = 'rev_count DESC';
}
$sqlMostRevs = $dbr->selectSQLText(
$revQuery['tables'],
$sqlVars,
$sqlWhere,
__METHOD__,
$order,
$revQuery['joins']
);
$sqlMostPagesOrRevs = $dbr->unionQueries( [ $sqlMostPages, $sqlMostRevs ], false );
$res = $dbr->select(
[
'u' => 'user',
's' => new Wikimedia\Rdbms\Subquery( $sqlMostPagesOrRevs ),
],
[
'user_id',
'user_name',
'user_real_name',
'page_count',
'rev_count',
'wiki_rank' => 'page_count+SQRT(rev_count-page_count)*2',
],
[],
__METHOD__,
[
'ORDER BY' => 'wiki_rank DESC',
'LIMIT' => $limit,
],
[
's' => [
'JOIN',
'user_id=rev_user'
]
]
);
$ret = iterator_to_array( $res );
return $ret;
}
/// Generates a "Contribution Scores" table for a given LIMIT and date range
/**
* Function generates Contribution Scores tables in HTML format (not wikiText)
*
* @param int $days Days in the past to run report for
* @param int $limit Maximum number of users to return (default 50)
* @param string|null $title The title of the table
* @param array $options array of options (default none; nosort/notools)
* @return string Html Table representing the requested Contribution Scores.
*/
function genContributionScoreTable( $days, $limit, $title = null, $options = 'none' ) {
global $wgContribScoresUseRealName, $wgContribScoreCacheTTL;
$opts = explode( ',', strtolower( $options ) );
$sortable = in_array( 'nosort', $opts ) ? '' : ' sortable';
$output = "<table class=\"wikitable contributionscores plainlinks{$sortable}\" >\n" .
"<tr class='header'>\n" .
Html::element( 'th', [], $this->msg( 'contributionscores-rank' )->text() ) .
Html::element( 'th', [], $this->msg( 'contributionscores-score' )->text() ) .
Html::element( 'th', [], $this->msg( 'contributionscores-pages' )->text() ) .
Html::element( 'th', [], $this->msg( 'contributionscores-changes' )->text() ) .
Html::element( 'th', [], $this->msg( 'contributionscores-username' )->text() );
$cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
$data = $cache->getWithSetCallback(
$cache->makeKey( 'contributionscores', 'data-' . (string)$days ),
$wgContribScoreCacheTTL * 60,
function () use ( $days ) {
// Use max limit, as limit doesn't matter with performance.
// Avoid purge multiple times since limit on transclusion can be vary.
return self::getContributionScoreData( $days, self::CONTRIBUTIONSCORES_MAXINCLUDELIMIT );
} );
$lang = $this->getLanguage();
$altrow = '';
$user_rank = 1;
foreach ( $data as $row ) {
if ( $user_rank > $limit ) {
break;
}
// Use real name if option used and real name present.
if ( $wgContribScoresUseRealName && $row->user_real_name !== '' ) {
$userLink = Linker::userLink(
$row->user_id,
$row->user_name,
$row->user_real_name
);
} else {
$userLink = Linker::userLink(
$row->user_id,
$row->user_name
);
}
$output .= Html::closeElement( 'tr' );
$output .= "<tr class='{$altrow}'>\n" .
"<td class='content' style='padding-right:10px;text-align:right;'>" .
$lang->formatNum( $user_rank ) .
"\n</td><td class='content' style='padding-right:10px;text-align:right;'>" .
$lang->formatNum( round( $row->wiki_rank, 0 ) ) .
"\n</td><td class='content' style='padding-right:10px;text-align:right;'>" .
$lang->formatNum( $row->page_count ) .
"\n</td><td class='content' style='padding-right:10px;text-align:right;'>" .
$lang->formatNum( $row->rev_count ) .
"\n</td><td class='content'>" .
$userLink;
# Option to not display user tools
if ( !in_array( 'notools', $opts ) ) {
$output .= Linker::userToolLinks( $row->user_id, $row->user_name );
}
$output .= Html::closeElement( 'td' ) . "\n";
if ( $altrow == '' && empty( $sortable ) ) {
$altrow = 'odd ';
} else {
$altrow = '';
}
$user_rank++;
}
$output .= Html::closeElement( 'tr' );
$output .= Html::closeElement( 'table' );
// Transcluded on a normal wiki page.
if ( !empty( $title ) ) {
$output = Html::rawElement( 'table',
[
'style' => 'border-spacing: 0; padding: 0',
'class' => 'contributionscores-wrapper',
'lang' => htmlspecialchars( $lang->getCode() ),
'dir' => $lang->getDir()
],
"\n" .
"<tr>\n" .
"<td style='padding: 0px;'>{$title}</td>\n" .
"</tr>\n" .
"<tr>\n" .
"<td style='padding: 0px;'>{$output}</td>\n" .
"</tr>\n"
);
}
return $output;
}
function execute( $par ) {
$this->setHeaders();
if ( $this->including() ) {
$this->showInclude( $par );
} else {
$this->showPage();
}
return true;
}
/**
* Called when being included on a normal wiki page.
* Cache is disabled so it can depend on the user language.
* @param string|null $par A subpage give to the special page
*/
function showInclude( $par ) {
$days = null;
$limit = null;
$options = 'none';
if ( !empty( $par ) ) {
$params = explode( '/', $par );
$limit = intval( $params[0] );
if ( isset( $params[1] ) ) {
$days = intval( $params[1] );
}
if ( isset( $params[2] ) ) {
$options = $params[2];
}
}
if ( empty( $limit ) || $limit < 1 || $limit > self::CONTRIBUTIONSCORES_MAXINCLUDELIMIT ) {
$limit = 10;
}
if ( $days === null || $days < 0 ) {
$days = 7;
}
if ( $days > 0 ) {
$reportTitle = $this->msg( 'contributionscores-days' )->numParams( $days )->text();
} else {
$reportTitle = $this->msg( 'contributionscores-allrevisions' )->text();
}
$reportTitle .= ' ' . $this->msg( 'contributionscores-top' )->numParams( $limit )->text();
$title = Xml::element( 'h4',
[ 'class' => 'contributionscores-title' ],
$reportTitle
) . "\n";
$this->getOutput()->addHTML( $this->genContributionScoreTable(
$days,
$limit,
$title,
$options
) );
}
/**
* Show the special page
*/
function showPage() {
global $wgContribScoreReports;
if ( !is_array( $wgContribScoreReports ) ) {
$wgContribScoreReports = [
[ 7, 50 ],
[ 30, 50 ],
[ 0, 50 ]
];
}
$out = $this->getOutput();
$out->addWikiMsg( 'contributionscores-info' );
foreach ( $wgContribScoreReports as $scoreReport ) {
[ $days, $revs ] = $scoreReport;
if ( $days > 0 ) {
$reportTitle = $this->msg( 'contributionscores-days' )->numParams( $days )->text();
} else {
$reportTitle = $this->msg( 'contributionscores-allrevisions' )->text();
}
$reportTitle .= ' ' . $this->msg( 'contributionscores-top' )->numParams( $revs )->text();
$title = Xml::element( 'h2',
[ 'class' => 'contributionscores-title' ],
$reportTitle
) . "\n";
$out->addHTML( $title );
$out->addHTML( $this->genContributionScoreTable( $days, $revs ) );
}
}
public function maxIncludeCacheTime() {
global $wgContribScoreDisableCache, $wgContribScoreCacheTTL;
return $wgContribScoreDisableCache ? 0 : $wgContribScoreCacheTTL;
}
/**
* @inheritDoc
*/
protected function getGroupName() {
return 'wiki';
}
}