Nikerabbit has submitted this change and it was merged. Change subject: Add PLURAL support to push-tab-*-override ......................................................................
Add PLURAL support to push-tab-*-override <https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Push-tab-files-override/en> <https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Push-tab-template-override/en> Change-Id: Iafda0f83621b21fa8eceb4aa0fe49dd120c6fa7e --- M Push.i18n.php M Push.php M includes/ext.push.tab.js 3 files changed, 15 insertions(+), 7 deletions(-) Approvals: Nikerabbit: Verified; Looks good to me, approved diff --git a/Push.i18n.php b/Push.i18n.php index 5a64b56..2294ce4 100644 --- a/Push.i18n.php +++ b/Push.i18n.php @@ -79,8 +79,8 @@ 'push-tab-err-filepush' => 'File push failed: $1', 'push-tab-embedded-files' => 'Embedded files:', 'push-tab-no-embedded-files' => '(No files are embedded in this page.)', - 'push-tab-files-override' => 'These files already exist: $1', - 'push-tab-template-override' => 'These templates already exist: $1', + 'push-tab-files-override' => '{{PLURAL:$2|This file already exists|These files already exist}}: $1', + 'push-tab-template-override' => '{{PLURAL:$2|This template already exists|These templates already exist}}: $1', 'push-tab-err-uploaddisabled' => 'Uploads are not enabled. Make sure $wgEnableUploads and $wgAllowCopyUploads are set to true in LocalSettings.php of the target wiki.', // Special page @@ -188,9 +188,11 @@ 'push-tab-embedded-files' => 'This message is about a transfer of several data in one go. Image files can be a part of the transfer. {{Identical|Embedded file}}', 'push-tab-files-override' => 'JavaScript message, no PLURAL available. Parameters: -* $1 - list of files (1 or more)', +* $1 - list of files (1 or more) +* $2 - count of them', 'push-tab-template-override' => 'JavaScript message, no PLURAL available. Parameters: -* $1 - list of templates (1 or more)', +* $1 - list of templates (1 or more) +* $2 - count of them', 'push-tab-err-uploaddisabled' => '{{doc-important|Do not translate "<code>$wgEnableUploads</code>", "<code>$wgAllowCopyUploads</code>" and "<code>LocalSettings.php</code>".}} Used as <code>$1</code> in {{msg-mw|Push-tab-err-filepush}}.', 'special-push' => '{{doc-special|Push}}', diff --git a/Push.php b/Push.php index 17bc28d..f88afcb 100644 --- a/Push.php +++ b/Push.php @@ -106,7 +106,7 @@ $wgResourceModules['ext.push.tab'] = $moduleTemplate + array( 'scripts' => 'includes/ext.push.tab.js', - 'dependencies' => array(), + 'dependencies' => array( 'mediawiki.jqueryMsg' ), 'messages' => $egPushJSMessages ); diff --git a/includes/ext.push.tab.js b/includes/ext.push.tab.js index 0f0419e..48df269 100644 --- a/includes/ext.push.tab.js +++ b/includes/ext.push.tab.js @@ -219,7 +219,10 @@ if ( overideTemplates.length > 0 ) { $( '#targettemplateconflicts' + targetId ) - .text( mw.msg( 'push-tab-template-override', overideTemplates.join( ', ' ) ) ) + .text( mw.msg( 'push-tab-template-override', + overideTemplates.join( ', ' ), + overideTemplates.length + ) ) .fadeIn( 'slow' ); } else { @@ -242,7 +245,10 @@ if ( overideFiles.length > 0 ) { $( '#targetfileconflicts' + targetId ) - .text( mw.msg( 'push-tab-files-override', overideFiles.join( ', ' ) ) ) + .text( mw.msg( 'push-tab-files-override', + overideFiles.join( ', ' ), + overideFiles.length + ) ) .fadeIn( 'slow' ); } else { -- To view, visit https://gerrit.wikimedia.org/r/78356 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iafda0f83621b21fa8eceb4aa0fe49dd120c6fa7e Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Push Gerrit-Branch: master Gerrit-Owner: Nemo bis <[email protected]> Gerrit-Reviewer: Jeroen De Dauw <[email protected]> Gerrit-Reviewer: Nemo bis <[email protected]> Gerrit-Reviewer: Nikerabbit <[email protected]> Gerrit-Reviewer: Siebrand <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
