Remove i18n parameters
authorGabriel Birke <gabriel.birke@wikimedia.de>
Fri, 22 Mar 2019 11:10:45 +0000 (12:10 +0100)
committerGabriel Birke <gabriel.birke@wikimedia.de>
Fri, 22 Mar 2019 11:18:38 +0000 (11:18 +0000)
Since the confirmation message can no longer show the edit count, remove
the data attribute that contains it.

Also make the selector for the confirmation more specific.

This is a followup for change 498096

Bug: T218354
Change-Id: I08dd75d3b161d7869357e486b25693dde635eb14

includes/Linker.php
resources/src/mediawiki.rollback.confirmation.js

index 7dc6541..5e07f1e 100644 (file)
@@ -1884,8 +1884,7 @@ class Linker {
 
                $attrs = [
                        'data-mw' => 'interface',
-                       'title' => $context->msg( 'tooltip-rollback' )->text(),
-                       'data-rollback-count' => (int)$editCount
+                       'title' => $context->msg( 'tooltip-rollback' )->text()
                ];
 
                $options = [ 'known', 'noclasses' ];
index 7e27d7e..5be49f0 100644 (file)
 
        $( '#mw-content-text' ).confirmable( {
                i18n: {
-                       confirm: mw.msg( 'rollback-confirmation-confirm', $( this ).data( 'rollback-count' ) ),
+                       confirm: mw.msg( 'rollback-confirmation-confirm' ),
                        yes: mw.msg( 'rollback-confirmation-yes' ),
                        no: mw.msg( 'rollback-confirmation-no' )
                },
-               delegate: '.mw-rollback-link a',
+               delegate: '.mw-rollback-link a[data-mw="interface"]',
                handler: function ( e ) {
                        e.preventDefault();
                        postRollback( $( this ).attr( 'href' ) );