diff --git a/extension.json b/extension.json index 584fdc8..6616ca2 100644 --- a/extension.json +++ b/extension.json @@ -1,6 +1,9 @@ { "name": "Editcount", - "author": "Ævar Arnfjörð Bjarmason", + "author": [ + "Ævar Arnfjörð Bjarmason", + "[[mw:User:Evelyn Marie|Evelyn Marie]]" + ], "url": "https://www.mediawiki.org/wiki/Extension:Editcount", "descriptionmsg": "editcount-desc", "license-name": "GPL-2.0-or-later", diff --git a/i18n/en.json b/i18n/en.json index d05a6a9..26f08ab 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -1,12 +1,17 @@ { "@metadata": { "authors": [ - "Rob Church" + "Rob Church", + "Evelyn Marie" ] }, "editcount": "Edit count", - "editcount-desc": "Displays [[Special:Editcount|edit count]] of a user", + "editcount-desc": "Displays a given user's [[Special:Editcount|edit count]]", + "editcount-before": "This tool allows you to view a given user's edit count across all namespaces.", "editcount_username": "User:", "editcount_submit": "Submit", + "editcount_namespace": "Namespace", + "editcount_edits": "Edits", + "editcount_percentage": "Percentage", "editcount_total": "Total" } diff --git a/i18n/qqq.json b/i18n/qqq.json index f4e64a2..cd26f15 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -12,7 +12,11 @@ }, "editcount": "{{doc-special|Editcount}}", "editcount-desc": "{{desc|name=EditCountNeue|url=https://www.mediawiki.org/wiki/Extension:EditCountNeue}}", + "editcount-before": "This tool allows you to view a given user's edit count across all namespaces.", "editcount_username": "{{Identical|User}}", "editcount_submit": "{{Identical|Submit}}", + "editcount_namespace": "{{Identical|Namespace}}", + "editcount_edits": "{{Identical|Edits}}", + "editcount_percentage": "{{Identical|Percentage}}", "editcount_total": "{{Identical|Total}}" } diff --git a/src/Editcount.php b/src/Editcount.php index a952f10..0a50af6 100644 --- a/src/Editcount.php +++ b/src/Editcount.php @@ -17,6 +17,7 @@ class Editcount extends IncludableSpecialPage { list( $username, $namespace ) = $this->extractParameters( $target ); $this->getOutput()->enableOOUI(); + $this->getOutput()->addWikiMsg( 'editcount-before' ); $user = User::newFromName( $username ); $username = $user ? $user->getName() : ''; diff --git a/src/EditcountHTML.php b/src/EditcountHTML.php index 2967bd9..aceb664 100644 --- a/src/EditcountHTML.php +++ b/src/EditcountHTML.php @@ -64,14 +64,16 @@ class EditcountHTML extends Editcount { $lang = $this->getLanguage(); $total = $this->msg( 'editcount_total' )->escaped(); + $namespace = $this->msg( 'editcount_namespace' )->escaped(); + $edits = $this->msg( 'editcount_edits' )->escaped(); + $percentage = $this->msg( 'editcount_percentage' )->escaped(); $ftotal = $lang->formatNum( $this->total ); - $percent = wfPercent( $this->total ? 100 : 0 ); - // @fixme don't use inline styles - $ret = "
$total | -$ftotal | -$percent | +$namespace | +$edits | +$percentage |
---|---|---|---|---|---|
$total | +$ftotal + | $percent + |