From 0707fd500f677ac5ac6e338d6fc7c1ee72ca6296 Mon Sep 17 00:00:00 2001 From: Gabriel Birke Date: Fri, 22 Mar 2019 12:10:45 +0100 Subject: [PATCH] Remove i18n parameters 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 | 3 +-- resources/src/mediawiki.rollback.confirmation.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/includes/Linker.php b/includes/Linker.php index 7dc6541c5f..5e07f1e1de 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -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' ]; diff --git a/resources/src/mediawiki.rollback.confirmation.js b/resources/src/mediawiki.rollback.confirmation.js index 7e27d7e581..5be49f04be 100644 --- a/resources/src/mediawiki.rollback.confirmation.js +++ b/resources/src/mediawiki.rollback.confirmation.js @@ -13,11 +13,11 @@ $( '#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' ) ); -- 2.20.1