Compare commits

...

40 Commits

Author SHA1 Message Date
Translation updater bot
ef9a18dbb3 Localisation updates from https://translatewiki.net.
Change-Id: Iacadde82bae2708279a679616369ffb39a4591b4
2017-04-24 22:37:44 +02:00
Translation updater bot
2e50eb98f2 Localisation updates from https://translatewiki.net.
Change-Id: I4f1fccc1defcc8387c63e5864dbf6f6ee238c943
2017-03-26 22:25:12 +02:00
Translation updater bot
624fd9ceb3 Localisation updates from https://translatewiki.net.
Change-Id: I8b14ddaa288d58ef831972f4960c19a65ed95d8c
2017-03-21 22:30:53 +01:00
Translation updater bot
f4e07cd2d1 Localisation updates from https://translatewiki.net.
Change-Id: Iacc0f2f224cdb874d4b3f629096518214109081c
2017-03-17 22:26:27 +01:00
Translation updater bot
ef040d9bb9 Localisation updates from https://translatewiki.net.
Change-Id: I10959542132abc56062ad4be70d165a7b2d6b1fc
2017-02-12 22:18:24 +01:00
Translation updater bot
55c537d3b5 Localisation updates from https://translatewiki.net.
Change-Id: I787dd0b2c04ba4856dc3ceb4031824a4d4df7bd1
2017-02-07 22:41:53 +01:00
Translation updater bot
43cdd9c995 Localisation updates from https://translatewiki.net.
Change-Id: I989d7c4a75f28aac96bc56ede08ef60debb4f8a5
2017-01-27 14:34:21 +01:00
Translation updater bot
bda50ee63e Localisation updates from https://translatewiki.net.
Change-Id: Idb9abb33fc24c4d2c5e1e915abeca9c196b6c9a8
2017-01-16 14:24:20 +01:00
Translation updater bot
f96c7296ee Localisation updates from https://translatewiki.net.
Change-Id: I27f788882091c371a92ff85a7283d5b0ec24ae4b
2016-12-12 22:23:27 +01:00
Aftab
5d9db4f295 ContributionScores.alias.php translations for bengali.
Bug: T151927
Change-Id: Ia68b24daf80a86e1be493141bafb2ac1a86267e3
2016-11-29 21:06:08 +00:00
Amire80
5d956844d0 Add Russian special page aliases for Ukrainian for backwards compatibility
Bug: T39314
Change-Id: I97b09cf066889e87a7c6674b33a88ba17b40938d
2016-11-24 19:30:05 +02:00
Translation updater bot
bd7ada4a6a Localisation updates from https://translatewiki.net.
Change-Id: I3f45cb0a577bd11b41daf1029b4ad33155ee44fd
2016-11-23 22:35:06 +01:00
Translation updater bot
9e0ab4d3d9 Localisation updates from https://translatewiki.net.
Change-Id: I9f319b048ca5af511afc80086858a2d2e46ecbb4
2016-11-20 22:14:35 +01:00
Chad Horohoe
703f4f3a4f Whoops, track not trace
Change-Id: If723cb93f692f9ee063d395562c7a202f2dc8542
2016-10-24 17:02:21 -07:00
Chad Horohoe
d088656a2d Swapping defaultbranch for trace
The former is a maintenance nightmare when branching.

Bug:T146293
Change-Id: I9c05e09954739646e5c0b52dacb661aff9fcdedf
2016-10-24 16:37:19 -07:00
Translation updater bot
b1299f8bd2 Localisation updates from https://translatewiki.net.
Change-Id: I3c2edb5e72757828c16f7d1581619216edc8a692
2016-09-04 22:27:59 +02:00
Translation updater bot
6d5dab5383 Localisation updates from https://translatewiki.net.
Change-Id: Iaf3f3fd62057f3879202db210918ba119d2576ca
2016-08-11 23:52:29 +02:00
Translation updater bot
a8244c9811 Localisation updates from https://translatewiki.net.
Change-Id: I214ab2cfbd829dbb50b6be7556f3e898a9eafc34
2016-06-03 23:17:41 +02:00
Kunal Mehta
f17afc4434 build: Updating mediawiki/mediawiki-codesniffer to 0.7.2
Change-Id: I9b04150964095bc0b63eb77c276074f61adada09
2016-05-27 18:19:16 -07:00
addshore
9b9d57a8a6 composer.json mediawiki/mediawiki-codesniffer to 0.7.1
Change-Id: Idee948aee2d458314dae8bedf3ad2a0f9a6533ea
2016-05-08 19:19:26 +01:00
Translation updater bot
ff99752901 Localisation updates from https://translatewiki.net.
Change-Id: I6dcef66ec03b8ef01cefcb0335cbea3445e398f7
2016-04-17 22:15:20 +02:00
Translation updater bot
aefb07ef4b Localisation updates from https://translatewiki.net.
Change-Id: Ia3ac1debca024875e1abfe326a04f1d7395e37df
2016-04-03 23:18:42 +02:00
Translation updater bot
6da0d445a7 Localisation updates from https://translatewiki.net.
Change-Id: I992813bd475b3bf52f140aa8ef9b1aca18abdd1c
2016-03-27 21:12:32 +02:00
addshore
7fdbc8e9cc Add README
Change-Id: I06861dc2c59ab16a7075a183bf31a89b5c6c0aa8
2016-03-22 11:08:34 +00:00
Siebrand Mazeland
66cf8c80f0 Updates for CodeSniffer and other tests
Change-Id: Ief70f6b82ed9c10d658eaeb980b0a4e780de9ac2
2016-02-27 21:12:58 +01:00
Translation updater bot
627050be10 Localisation updates from https://translatewiki.net.
Change-Id: I14848929868696c909eb7590ac59c61757570dd3
2016-02-07 22:14:52 +01:00
Translation updater bot
78f9e4eb57 Localisation updates from https://translatewiki.net.
Change-Id: Ic21ad699ed5789ae97b4ee454d1ee13c9dc46361
2016-01-21 21:54:34 +01:00
Kunal Mehta
40acd85a7b build: Updating development dependencies
* jakub-onderka/php-parallel-lint: 0.9 → 0.9.2

Change-Id: I627e92a94cb4a2da2b6460a6f491949dbe380bd9
2016-01-05 10:33:34 -08:00
Kunal Mehta
0ff4291766 build: Updating development dependencies
* mediawiki/mediawiki-codesniffer: 0.5.0 → 0.5.1

Change-Id: I203e3f4c48991857bccc8837d965e366c347e4e1
2016-01-03 18:47:05 -08:00
Translation updater bot
b10d6f6018 Localisation updates from https://translatewiki.net.
Change-Id: I2db08e65c529ade60dc8ae42051088e515bf939f
2015-12-30 21:41:06 +01:00
Kunal Mehta
5589be458c build: Updating development dependencies
* grunt-jsonlint: 1.0.4 → 1.0.7

Change-Id: I829ed48f459967adbf0519b7b8056e8da89d21bc
2015-12-29 11:22:12 -08:00
Translation updater bot
230dd8ddb8 Localisation updates from https://translatewiki.net.
Change-Id: I6ec5c4908f19f39b3ec3e9386ff5edc1b398b777
2015-12-10 22:53:02 +01:00
Translation updater bot
488e0fc623 Localisation updates from https://translatewiki.net.
Change-Id: Iba88b662355c75f960e6c53b8261e289ab741ad3
2015-11-28 21:43:58 +01:00
Kunal Mehta
5a335d1876 build: Updating development dependencies
* mediawiki/mediawiki-codesniffer: 0.4.0 → 0.5.0

Change-Id: If22d901893010b905b154b57803bdf553662eeb5
2015-11-06 13:09:11 +00:00
Umherirrender
56f21a2611 Fix phpcs error
Found by tests:
https://integration.wikimedia.org/ci/job/php-composer-test/19332/console

Change-Id: I05dee486e93b9dbf2bc117fb6a48cc00a08c102d
2015-11-05 21:13:16 +01:00
Translation updater bot
a5ef8a5409 Localisation updates from https://translatewiki.net.
Change-Id: I0faaff06f22d674b5707a6762146b66f85532e83
2015-10-23 21:43:20 +02:00
Translation updater bot
0010a6f08b Localisation updates from https://translatewiki.net.
Change-Id: I990af213b9358df71d01aa82203869c8128ab4e6
2015-10-15 09:40:24 +02:00
Kunal Mehta
740e0fa273 build: Updating development dependencies
* grunt-banana-checker: 0.2.2 → 0.4.0

Change-Id: I6053357f8805cc35ff54a07f244079231feab5b2
2015-10-11 11:42:13 -04:00
Siebrand Mazeland
e4cb919476 Add tests
Fix all issues so tests pass.

Change-Id: I8a059c26d16944d4ddfb56959617fb73887e7b6a
2015-10-03 16:37:02 +01:00
Translation updater bot
8f657f7205 Localisation updates from https://translatewiki.net.
Change-Id: I6ad55e6c8aebc2a1122fcb20df464034c7b46367
2015-09-22 22:23:46 +02:00
35 changed files with 267 additions and 147 deletions

4
.gitignore vendored
View File

@@ -1,5 +1,7 @@
.svn
*~
*.kate-swp
.*.swp
.idea
node_modules/
/composer.lock
/vendor/

View File

@@ -2,5 +2,5 @@
host=gerrit.wikimedia.org
port=29418
project=mediawiki/extensions/ContributionScores
defaultbranch=master
track=1
defaultrebase=0

1
.jshintignore Normal file
View File

@@ -0,0 +1 @@
node_modules

View File

@@ -54,6 +54,11 @@ $specialPageAliases['bjn'] = array(
'ContributionScores' => array( 'Skor_sumbangan' ),
);
/** Bengali (বাংলা) */
$specialPageAliases['bn'] = array(
'ContributionScores' => array( 'অবদানের_স্কোর' ),
);
/** Breton (brezhoneg) */
$specialPageAliases['br'] = array(
'ContributionScores' => array( 'Skor_Degasadennoù' ),
@@ -251,7 +256,7 @@ $specialPageAliases['tr'] = array(
/** Ukrainian (українська) */
$specialPageAliases['uk'] = array(
'ContributionScores' => array( 'Очки_внеску' ),
'ContributionScores' => array( 'Очки_внеску', 'Очки_вклада' ),
);
/** Simplified Chinese (中文(简体)‎) */
@@ -262,4 +267,4 @@ $specialPageAliases['zh-hans'] = array(
/** Traditional Chinese (中文(繁體)‎) */
$specialPageAliases['zh-hant'] = array(
'ContributionScores' => array( '貢獻分數' ),
);
);

View File

@@ -3,9 +3,9 @@
* Magic words for extension.
*/
$magicWords = array();
$magicWords = [];
/** English (English) */
$magicWords['en'] = array(
'cscore' => array( 0, 'cscore' ),
);
$magicWords['en'] = [
'cscore' => [ 0, 'cscore' ],
];

View File

@@ -1,35 +0,0 @@
<?php
/**
* This is a backwards-compatibility shim, generated by:
* https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
*
* Beginning with MediaWiki 1.23, translation strings are stored in json files,
* and the EXTENSION.i18n.php file only exists to provide compatibility with
* older releases of MediaWiki. For more information about this migration, see:
* https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
*
* This shim maintains compatibility back to MediaWiki 1.17.
*/
$messages = array();
if ( !function_exists( 'wfJsonI18nShim9e08550f702d6269' ) ) {
function wfJsonI18nShim9e08550f702d6269( $cache, $code, &$cachedData ) {
$codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] );
foreach ( $codeSequence as $csCode ) {
$fileName = dirname( __FILE__ ) . "/i18n/$csCode.json";
if ( is_readable( $fileName ) ) {
$data = FormatJson::decode( file_get_contents( $fileName ), true );
foreach ( array_keys( $data ) as $key ) {
if ( $key === '' || $key[0] === '@' ) {
unset( $data[$key] );
}
}
$cachedData['messages'] = array_merge( $data, $cachedData['messages'] );
}
$cachedData['deps'][] = new FileDependency( $fileName );
}
return true;
}
$GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShim9e08550f702d6269';
}

View File

@@ -1,46 +1,53 @@
<?php
/** \file
* \brief Contains setup code for the Contribution Scores Extension.
*/
* \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";
echo 'Contribution Scores extension';
exit( 1 );
}
$wgExtensionCredits['specialpage'][] = array(
$wgExtensionCredits['specialpage'][] = [
'path' => __FILE__,
'name' => 'Contribution Scores',
'url' => 'https://www.mediawiki.org/wiki/Extension:Contribution_Scores',
'author' => 'Tim Laqua',
'descriptionmsg' => 'contributionscores-desc',
'version' => '1.17.0'
);
$dir = dirname( __FILE__ ) . '/';
'version' => '1.25.0'
];
define( 'CONTRIBUTIONSCORES_MAXINCLUDELIMIT', 50 );
$wgContribScoreReports = null;
// These settings can be overridden in LocalSettings.php.
$wgContribScoreIgnoreBlockedUsers = false; // Set to true to exclude bots from the reporting.
$wgContribScoreIgnoreBots = false; // Set to true to exclude blocked users from the reporting.
$wgContribScoresUseRealName = false; // Set to true to use real user names when available. Only for MediaWiki 1.19 and later.
$wgContribScoreDisableCache = false; // Set to true to disable cache for parser function and inclusion of table.
$wgAutoloadClasses['ContributionScores'] = $dir . 'ContributionScores_body.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['ContributionScores'] = $dir . 'ContributionScores.i18n.php';
$wgExtensionMessagesFiles['ContributionScoresAlias'] = $dir . 'ContributionScores.alias.php';
$wgExtensionMessagesFiles['ContributionScoresMagic'] = $dir . 'ContributionScores.i18n.magic.php';
$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;
}
@@ -59,21 +66,20 @@ function efContributionScores_Render( &$parser, $usertext, $metric = 'score' ) {
if ( $metric == 'score' ) {
$res = $dbr->select( 'revision',
'COUNT(DISTINCT rev_page)+SQRT(COUNT(rev_id)-COUNT(DISTINCT rev_page))*2 AS wiki_rank',
array( 'rev_user' => $user->getID() ) );
'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',
array( 'rev_user' => $user->getID() ) );
'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',
array( 'rev_user' => $user->getID() ) );
'COUNT(DISTINCT rev_page) AS page_count',
[ 'rev_user' => $user->getID() ] );
$row = $dbr->fetchObject( $res );
$output = $wgLang->formatNum( $row->page_count );
} else {

View File

@@ -1,7 +1,7 @@
<?php
/** \file
* \brief Contains code for the ContributionScores Class (extends SpecialPage).
*/
* \brief Contains code for the ContributionScores Class (extends SpecialPage).
*/
/// Special page class for the Contribution Scores extension
/**
@@ -50,12 +50,14 @@ class ContributionScores extends IncludableSpecialPage {
}
if ( $wgContribScoreIgnoreBlockedUsers ) {
$sqlWhere .= " {$nextPrefix} rev_user NOT IN (SELECT ipb_user FROM {$ipBlocksTable} WHERE ipb_user <> 0)";
$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')";
$sqlWhere .= " {$nextPrefix} rev_user NOT IN " .
"(SELECT ug_user FROM {$userGroupTable} WHERE ug_group='bot')";
}
$sqlMostPages = "SELECT rev_user,
@@ -67,7 +69,7 @@ class ContributionScores extends IncludableSpecialPage {
ORDER BY page_count DESC
LIMIT {$limit}";
$sqlMostRevs = "SELECT rev_user,
$sqlMostRevs = "SELECT rev_user,
COUNT(DISTINCT rev_page) AS page_count,
COUNT(rev_id) AS rev_count
FROM {$revTable}
@@ -92,11 +94,11 @@ class ContributionScores extends IncludableSpecialPage {
$output = "<table class=\"wikitable contributionscores plainlinks{$sortable}\" >\n" .
"<tr class='header'>\n" .
Html::element( 'th', array(), $this->msg( 'contributionscores-rank' )->text() ) .
Html::element( 'th', array(), $this->msg( 'contributionscores-score' )->text() ) .
Html::element( 'th', array(), $this->msg( 'contributionscores-pages' )->text() ) .
Html::element( 'th', array(), $this->msg( 'contributionscores-changes' )->text() ) .
Html::element( 'th', array(), $this->msg( 'contributionscores-username' )->text() );
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;
@@ -118,11 +120,16 @@ class ContributionScores extends IncludableSpecialPage {
}
$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'>" .
$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
@@ -145,22 +152,23 @@ class ContributionScores extends IncludableSpecialPage {
$dbr->freeResult( $res );
if ( !empty( $title ) )
if ( !empty( $title ) ) {
$output = Html::rawElement( 'table',
array(
[
'style' => 'border-spacing: 0; padding: 0',
'class' => 'contributionscores-wrapper',
'lang' => htmlspecialchars( $lang->getCode()),
'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"
"<tr>\n" .
"<td style='padding: 0px;'>{$title}</td>\n" .
"</tr>\n" .
"<tr>\n" .
"<td style='padding: 0px;'>{$output}</td>\n" .
"</tr>\n"
);
}
return $output;
}
@@ -213,9 +221,17 @@ class ContributionScores extends IncludableSpecialPage {
} else {
$reportTitle = $this->msg( 'contributionscores-allrevisions' )->text();
}
$reportTitle .= " " . $this->msg( 'contributionscores-top' )->numParams( $limit )->text();
$title = Xml::element( 'h4', array( 'class' => 'contributionscores-title' ), $reportTitle ) . "\n";
$this->getOutput()->addHTML( $this->genContributionScoreTable( $days, $limit, $title, $options ) );
$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
) );
}
/**
@@ -225,11 +241,11 @@ class ContributionScores extends IncludableSpecialPage {
global $wgContribScoreReports;
if ( !is_array( $wgContribScoreReports ) ) {
$wgContribScoreReports = array(
array( 7, 50 ),
array( 30, 50 ),
array( 0, 50 )
);
$wgContribScoreReports = [
[ 7, 50 ],
[ 30, 50 ],
[ 0, 50 ]
];
}
$out = $this->getOutput();
@@ -242,8 +258,11 @@ class ContributionScores extends IncludableSpecialPage {
} else {
$reportTitle = $this->msg( 'contributionscores-allrevisions' )->text();
}
$reportTitle .= " " . $this->msg( 'contributionscores-top' )->numParams( $revs )->text();
$title = Xml::element( 'h2', array( 'class' => 'contributionscores-title' ), $reportTitle ) . "\n";
$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 ) );
}

28
Gruntfile.js Normal file
View File

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

2
README Normal file
View File

@@ -0,0 +1,2 @@
The Contribution Scores extension polls the wiki database to locate contributors with the highest contribution volume.
The extension is intended to add a fun metric for contributors to see how much they are helping out.

13
composer.json Normal file
View File

@@ -0,0 +1,13 @@
{
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"mediawiki/mediawiki-codesniffer": "0.7.2"
},
"scripts": {
"fix": "phpcbf",
"test": [
"parallel-lint . --exclude vendor",
"phpcs -p -s"
]
}
}

9
i18n/atj.json Normal file
View File

@@ -0,0 +1,9 @@
{
"@metadata": {
"authors": [
"Benoit Rochon"
]
},
"contributionscores-pages": "Masinahikana",
"contributionscores-username": "Icinikasowin"
}

View File

@@ -1,7 +1,8 @@
{
"@metadata": {
"authors": [
"Mousa"
"Mousa",
"Alp Er Tunqa"
]
},
"contributionscores": "چالیشماق امتیازلاری",
@@ -11,7 +12,7 @@
"contributionscores-days": "سون {{PLURAL:$1|گون|$1 گون}}",
"contributionscores-allrevisions": "بوتون زامانلار",
"contributionscores-score": "امتیاز",
"contributionscores-pages": حیفه‌لر",
"contributionscores-pages": "صفحه‌لر",
"contributionscores-changes": "دَییشمه‌لر",
"contributionscores-username": "آد",
"contributionscores-invalidusername": "گئچرسیز ایستیفاده‌چی آدی",

View File

@@ -2,16 +2,18 @@
"@metadata": {
"authors": [
"Assele",
"Haqmar"
"Haqmar",
"Sagan"
]
},
"contributionscores": "Индергән өлөштәрҙе баһалау",
"contributionscores-desc": "Мәғлүмәттәр базаһынан [[Special:ContributionScores|иң ҙур өлөш индергән ҡатнашыусыларҙы]] билдәләй",
"contributionscores-info": "Баһа түбәндәге өлөштәрҙе ҡушыу аша иҫәпләнә:\n* 1 мәрәй — һәр айырым битте мөхәррирләү өсөн;\n* 2 * ( (дөйөм үҙгәртеүҙәр һаны) - (барыһы төрлө биттәр) ) айырмаһының тамыры.\nБаһаны иҫәпләгән ваҡытта, шулай итеп, дөйөм үҙгәртеүҙәр һанына ҡарағында үҙгәртеүҙәрҙең төрлөлөгө ҙурыраҡ йоғонто яһай.",
"contributionscores-top": "(Тәүге $1)",
"contributionscores-days": "Һуңғы {{PLURAL:$1|1=көн|$1 көн}}",
"contributionscores-days": "{{PLURAL:$1|1=Һуңғы көн}}",
"contributionscores-allrevisions": "Бөтәһе",
"contributionscores-score": "Баһа",
"contributionscores-rank": "Ранг",
"contributionscores-pages": "Биттәр",
"contributionscores-changes": "Үҙгәртеүҙәр",
"contributionscores-username": "Ҡатнашыусы исеме",

View File

@@ -1,13 +1,14 @@
{
"@metadata": {
"authors": [
"DCLXVI"
"DCLXVI",
"StanProg"
]
},
"contributionscores": "Потребителска класация",
"contributionscores-top": "(Най-добрите $1)",
"contributionscores-days": "{{PLURAL:$1|Последния ден|Последните $1 дни}}",
"contributionscores-allrevisions": "Всички редакции",
"contributionscores-allrevisions": "За всички времена",
"contributionscores-score": "Точки",
"contributionscores-pages": "Страници",
"contributionscores-changes": "Редакции",

8
i18n/bgn.json Normal file
View File

@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Ibrahim khashrowdi"
]
},
"contributionscores-username": "کار زوروکین نام"
}

View File

@@ -3,7 +3,8 @@
"authors": [
"Bellayet",
"Wikitanvir",
"Aftab1995"
"Aftab1995",
"Aftabuzzaman"
]
},
"contributionscores": "অনুদানের স্কোর",

View File

@@ -8,7 +8,7 @@
},
"contributionscores": "Skor an degasadennoù",
"contributionscores-desc": "Furchal a ra er bank roadennoù evit kavout [[Special:ContributionScores|kementadoù brasañ a zegasadennoù an implijerien]]",
"contributionscores-info": "Setu penaos e vez jedet ar poenterezh :\n*Ur (1) poent evit pep pajenn kemmet\n*Gwrizienn garrez (an niver hollek a gemmoù graet) - (niver a bajennoù disheñvel) * 2\nLakaat a ra ar formulenn-se al liesseurted war wel kentoc'h eget ar c'hementad.\nE berr gomzoù e talvez da jediñ an niver a bajennoù disheñvel kemmet en ur sellet a-dostoc'h ouzh ar c'hementadoù bras a gemmoù a seller outo evel pajennoù zo gwelloc'h an danvez anezho.",
"contributionscores-info": "Da gentañ-penn e vuzul ar poenterezh an unpajennoù bet kemmet, en ur gemer e kont ar c'hementadoù kemmoù brasañ.",
"contributionscores-top": "(An $1 uhelañ)",
"contributionscores-days": "E-kerzh an {{PLURAL:$1|devezh|$1 devezh}} diwezhañ",
"contributionscores-allrevisions": "A-viskoazh",

8
i18n/csb.json Normal file
View File

@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Kirsan"
]
},
"contributionscores-username": "Pòzwa brëkòwnika"
}

View File

@@ -8,11 +8,11 @@
"Protnet"
]
},
"contributionscores": "Αποτελέσματα Συνεισφοράς",
"contributionscores-desc": "Εξετάζει την βάση δεδομένων βίκι για τον σημαντικότερο [[Special:ContributionScores|όγκο συνεισφορών χρήστη]]",
"contributionscores-info": "Το σκορ μετρά κυρίως επεξεργασίες μοναδικών σελίδων, λαμβάνοντας υπ' όψιν και τον υψηλό όγκο επεξεργασίας.",
"contributionscores": "Βαθμολογίες συνεισφοράς",
"contributionscores-desc": "Εξετάζει την βάση δεδομένων του wiki για τον υψηλότερο [[Special:ContributionScores|όγκο συνεισφορών χρήστη]]",
"contributionscores-info": "Η βαθμολογία μετρά πρωτίστως μοναδικές σελίδες που έχουν τύχει επεξεργασίας, λαμβάνοντας υπ' όψιν και τον υψηλό όγκο επεξεργασίας.",
"contributionscores-top": "(Πρώτοι $1)",
"contributionscores-days": "Τελευταίες {{PLURAL:$1|ημέρα|$1 ημέρες}}",
"contributionscores-days": "{{PLURAL:$1|Τελευταία ημέρα|Τελευταίες $1 ημέρες}}",
"contributionscores-allrevisions": "Όλων των εποχών",
"contributionscores-score": "Βαθμολογία",
"contributionscores-rank": "Κατάταξη",

View File

@@ -1,18 +1,18 @@
{
"@metadata": {
"authors": []
},
"contributionscores": "Contribution scores",
"contributionscores-desc": "Polls the wiki database for highest [[Special:ContributionScores|user contribution volume]]",
"contributionscores-info": "The score primarily measures unique pages edited, with consideration for high edit volume.",
"contributionscores-top": "(Top $1)",
"contributionscores-days": "Last {{PLURAL:$1|day|$1 days}}",
"contributionscores-allrevisions": "All time",
"contributionscores-score": "Score",
"contributionscores-rank": "Rank",
"contributionscores-pages": "Pages",
"contributionscores-changes": "Changes",
"contributionscores-username": "Username",
"contributionscores-invalidusername": "Invalid username",
"contributionscores-invalidmetric": "Invalid metric"
"@metadata": {
"authors": []
},
"contributionscores": "Contribution scores",
"contributionscores-desc": "Polls the wiki database for highest [[Special:ContributionScores|user contribution volume]]",
"contributionscores-info": "The score primarily measures unique pages edited, with consideration for high edit volume.",
"contributionscores-top": "(Top $1)",
"contributionscores-days": "Last {{PLURAL:$1|day|$1 days}}",
"contributionscores-allrevisions": "All time",
"contributionscores-score": "Score",
"contributionscores-rank": "Rank",
"contributionscores-pages": "Pages",
"contributionscores-changes": "Changes",
"contributionscores-username": "Username",
"contributionscores-invalidusername": "Invalid username",
"contributionscores-invalidmetric": "Invalid metric"
}

View File

@@ -2,7 +2,8 @@
"@metadata": {
"authors": [
"Michawiki",
"Yekrats"
"Yekrats",
"Robin van der Vliet"
]
},
"contributionscores": "Poentaro de Kontribuoj",
@@ -14,7 +15,7 @@
"contributionscores-score": "Poentaro",
"contributionscores-pages": "Paĝoj",
"contributionscores-changes": "Ŝanĝoj",
"contributionscores-username": "Salutnomo",
"contributionscores-username": "Uzantnomo",
"contributionscores-invalidusername": "Nevalida salutnomo",
"contributionscores-invalidmetric": "Nevalida parametro"
}

View File

@@ -12,7 +12,7 @@
},
"contributionscores": "Pointage des contributions",
"contributionscores-desc": "Scrute la base de données wiki pour les plus importants [[Special:ContributionScores|volumes de contribution des utilisateurs]]",
"contributionscores-info": "Le score mesure en priorité les pages uniques modifiées, en prenant en compte les gros volumes de modification.",
"contributionscores-info": "Le pointage mesure en priorité les pages uniques modifiées, en prenant en compte les gros volumes de modification.",
"contributionscores-top": "(Les $1 plus élevés)",
"contributionscores-days": "Dans {{PLURAL:$1|le dernier jour|les derniers $1 jours}}",
"contributionscores-allrevisions": "Tout le temps",

View File

@@ -2,17 +2,19 @@
"@metadata": {
"authors": [
"Meursault2004",
"Pras"
"Pras",
"NoiX180"
]
},
"contributionscores": "Skor Kontribusi",
"contributionscores": "Skor sumbangan",
"contributionscores-desc": "Nglakokaké polling (angkèt) ing basis data kanggo [[Special:ContributionScores|volume kontribusi panganggo]]",
"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",
"contributionscores-allrevisions": "Kabèh Révisi",
"contributionscores-allrevisions": "Sasuwéné wektu",
"contributionscores-score": "Skor",
"contributionscores-pages": "Kaca-kaca",
"contributionscores-rank": "Rangking",
"contributionscores-pages": "Kaca",
"contributionscores-changes": "Owah-owahan",
"contributionscores-username": "Jeneng panganggo",
"contributionscores-invalidusername": "Jeneng panganggo ora sah",

8
i18n/lki.json Normal file
View File

@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Lakzon"
]
},
"contributionscores-pages": "وةڵگةل"
}

View File

@@ -5,8 +5,11 @@
"Hugo.arg"
]
},
"contributionscores-top": "(Top $1)",
"contributionscores-days": "{{PLURAL:$1|Paskutinė diena|Paskutinės $1 dienos}}",
"contributionscores-allrevisions": "Viso laiko",
"contributionscores-score": "Rezultatas",
"contributionscores-rank": "Rangas",
"contributionscores-pages": "Puslapiai",
"contributionscores-changes": "Pakeitimai",
"contributionscores-username": "Naudotojo vardas",

View File

@@ -9,11 +9,12 @@
},
"contributionscores": "योगदान संख्या",
"contributionscores-desc": "[[Special:ContributionScores|सदस्य योगदान संख्येनुसार]] विकि डाटाबेस दर्शवितो",
"contributionscores-info": "गुण खालीलप्रमाणे मोजले जातील:\n*प्रत्येक स्वतंत्र पानासाठी १ गुण\n*(एकूण संपादने) - (एकूण स्वतंत्र पाने) * 2 चे वर्गमूळ\nअशा प्रकारे मोजलेले गुण हे संपादन विविधतेला संपादन संख्येपेक्षा जास्त महत्व देतात. मुख्यत्वे, हे गुण जास्त संपादन संख्या मोजून स्वतंत्र पानांची संपादने काढतात.",
"contributionscores-info": "गुण देतांना, प्राथमिकरित्या, अनन्य पानांचे संपादनासह,उच्च संपादन-आवाका लक्षात घेतल्या जातो.",
"contributionscores-top": "(गुणानुक्रमे पहिले $1)",
"contributionscores-days": "{{PLURAL:$1|शेवटचा दिवस|शेवटचे $1 दिवस}}",
"contributionscores-allrevisions": "सर्व आवर्तने",
"contributionscores-allrevisions": "सर्ववेळची",
"contributionscores-score": "गुण",
"contributionscores-rank": "गुणानुक्रम",
"contributionscores-pages": "पाने",
"contributionscores-changes": "बदल",
"contributionscores-username": "सदस्यनाव",

8
i18n/my.json Normal file
View File

@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Ninjastrikers"
]
},
"contributionscores-pages": "စာမျက်နှာများ"
}

View File

@@ -5,7 +5,7 @@
]
},
"contributionscores": "Puntatge de las contribucions",
"contributionscores-desc": "Espia la banca de donadas wiki pels [[Special:ContributionScores|utilizaires contribuissent mai]]",
"contributionscores-desc": "Espia la basa de donadas wiki pels [[Special:ContributionScores|utilizaires que contribuisson mai]]",
"contributionscores-info": "La marca mesura en prioritat las paginas unicas modificadas, en prenent en compte los gròsses volums de modificacion.",
"contributionscores-top": "(Melhor $1)",
"contributionscores-days": "Dins {{PLURAL:$1|lo darrièr jorn|los darrièrs $1 jorns}}",

View File

@@ -5,16 +5,19 @@
"Crazymadlover",
"Eduardo.mps",
"Giro720",
"Luckas"
"Luckas",
"HenriqueCrang",
"!Silent"
]
},
"contributionscores": "Pontuação de contribuições",
"contributionscores-desc": "Inquire a base de dados wiki sobre os mais altos [[Special:ContributionScores|volumes de contribuição dos utilizadores]]",
"contributionscores-info": "As pontuações são calculadas da seguinte forma:\n*1 ponto por cada página única editada\n*Raiz quadrada de (Total de Edições Feitas) - (Total de Páginas Únicas) * 2\nPontuações calculadas desta forma pesam a diversidade de edições relativamente ao volume de edições. Basicamente, esta pontuação mede primariamente páginas únicas editadas, com consideração pelo alto volume de edições - assumindo serem páginas de qualidade mais alta.",
"contributionscores-top": "(Iniciais $1)",
"contributionscores-info": "A pontuação mede, principalmente, as páginas únicas editadas, tendo em consideração o alto volume de edições.",
"contributionscores-top": "(Top $1)",
"contributionscores-days": "Últimos {{PLURAL:$1|día|$1 días}}",
"contributionscores-allrevisions": "Desde sempre",
"contributionscores-score": "Pontuação",
"contributionscores-rank": "Classificação",
"contributionscores-pages": "Páginas",
"contributionscores-changes": "Mudanças",
"contributionscores-username": "Nome de usuário",

View File

@@ -6,7 +6,7 @@
"Sarvaturi"
]
},
"contributionscores": "Punteggiu pî cuntribbuta",
"contributionscores": "Punteggiu pî cuntribbuti",
"contributionscores-desc": "Addumanna â basi di dati dâ wiki circannu lutenti cu [[Special:ContributionScores|vulumi di cuntribbutu]] cchiù granni",
"contributionscores-info": "Stu punteggiu misura principalmenti la quantità di pàggini canciati, tinennu macari cuntu dî vulumi dî canciamenti granni.",
"contributionscores-top": "({{PLURAL:$1|Lu megghiu|Li $1 megghiu}})",

View File

@@ -14,7 +14,7 @@
"contributionscores-score": "Peunteun",
"contributionscores-pages": "Kaca",
"contributionscores-changes": "Parobahan",
"contributionscores-username": "Landihan",
"contributionscores-username": "Sandiasma",
"contributionscores-invalidusername": "Pamaké teu cocog",
"contributionscores-invalidmetric": "matrik teu cocog"
}

View File

@@ -6,11 +6,12 @@
},
"contributionscores": "Кертем билгеләү",
"contributionscores-desc": "Хәтердән [[Special:ContributionScores|иң зур тәрҗемә ясаучы кулланучыларны]] билгели.",
"contributionscores-info": "Билгеләр кую астагы критерийларга туры килү нәтиҗәсендә билгеләнә:\n* 1 Һәрбер аерым бер тәрҗемә өчен билге\n* 2 Гомуми тәрҗемәләр һәм һәрбер аерым бит аермасының тамыр асты\nШуның нәтиҗәсендә сезнең тәрҗемәләрегезгә тагын да зуррак билге куела.",
"contributionscores-info": "Билгеләр кую, беренче чиратта, үзгәртелгән мәкаләләр санына һәм аларның күләменә карап бирелә.",
"contributionscores-top": "(Иң әйбәт $1)",
"contributionscores-days": "{{PLURAL:$1|Соңгы $1 көн өчен}}",
"contributionscores-allrevisions": арлык үзгәртүләр",
"contributionscores-days": "Соңгы {{PLURAL:$1|$1 көн өчен}}",
"contributionscores-allrevisions": өтен вакыт өчен",
"contributionscores-score": "Билге",
"contributionscores-rank": "Ранг",
"contributionscores-pages": "Битләр саны",
"contributionscores-changes": "Үзгәртүләр",
"contributionscores-username": "Кулланучы исеме",

14
package.json Normal file
View File

@@ -0,0 +1,14 @@
{
"private": true,
"scripts": {
"test": "grunt test"
},
"devDependencies": {
"grunt": "0.4.5",
"grunt-cli": "0.1.13",
"grunt-contrib-jshint": "0.11.3",
"grunt-jscs": "2.5.0",
"grunt-jsonlint": "1.0.7",
"grunt-banana-checker": "0.4.0"
}
}

8
phpcs.xml Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki"/>
<file>.</file>
<arg name="extensions" value="php,php5,inc"/>
<arg name="encoding" value="utf8"/>
<exclude-pattern>vendor</exclude-pattern>
</ruleset>