jenkins-bot has submitted this change and it was merged. Change subject: PLURAL support for MediaWiki:Safedelete-cannotdelete ......................................................................
PLURAL support for MediaWiki:Safedelete-cannotdelete See: https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Safedelete-cannotdelete/ksh Change-Id: I5850794ee9039ecb5f8a5be98dac5bf1322b2eef --- M SafeDelete.class.php M i18n/en.json M i18n/qqq.json 3 files changed, 6 insertions(+), 5 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/SafeDelete.class.php b/SafeDelete.class.php index 8c15faf..fd78d2b 100644 --- a/SafeDelete.class.php +++ b/SafeDelete.class.php @@ -74,10 +74,10 @@ } - if ( count( $result ) > 0 ) { - + $count = count( $result ) ; + if ( $count > 0 ) { $this->getOutput()->addHTML( - $this->msg( 'safedelete-cannotdelete', $displaytitle ) ); + $this->msg( 'safedelete-cannotdelete', $displaytitle )->numParams( $count ) ); $this->getOutput()->addHTML( Html::element( 'br' ) ); $this->getOutput()->addHTML( Html::openElement( 'ul' ) ); diff --git a/i18n/en.json b/i18n/en.json index c2a7988..fd3a404 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -9,5 +9,5 @@ "safedelete-title": "Delete \"$1\"", "safedelete-missingpagename": "Page name is missing.", "safedelete-missingnamespaces": "List of Special Delete namespaces is not set.", - "safedelete-cannotdelete": "Page \"$1\" cannot be deleted since there are links or redirects to it from the following pages:" + "safedelete-cannotdelete": "Page \"$1\" cannot be deleted since there are links or redirects to it from the following {{PLURAL:$2|page|pages}}:" } diff --git a/i18n/qqq.json b/i18n/qqq.json index 726b580..7933197 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -4,5 +4,6 @@ "Liuxinyu970226" ] }, - "safedelete-title": "{{Identical|Delete}}" + "safedelete-title": "{{Identical|Delete}}", + "safedelete-cannotdelete": "$1 - a page title, $2 - the number of list items following this message for PLURAL use." } -- To view, visit https://gerrit.wikimedia.org/r/236248 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5850794ee9039ecb5f8a5be98dac5bf1322b2eef Gerrit-PatchSet: 8 Gerrit-Project: mediawiki/extensions/SafeDelete Gerrit-Branch: master Gerrit-Owner: Purodha <[email protected]> Gerrit-Reviewer: Nemo bis <[email protected]> Gerrit-Reviewer: Paladox <[email protected]> Gerrit-Reviewer: Purodha <[email protected]> Gerrit-Reviewer: Siebrand <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
