jenkins-bot has submitted this change and it was merged.

Change subject: jquery.confirmable: Add a space between buttons
......................................................................


jquery.confirmable: Add a space between buttons

It should have always been there, my bad. Problems with lack of the
space:

* Languages with ligatures may decide to join the last letters of
  "Yes" with first letters of "No", producing a mess. (This was
  reported with a proposed solution as I0e6fcd83, I opted for doing
  this fix instead.)
* The "Yes" and "No" may be read together by screen readers, as
  "Yesno" (although I didn't test this), and similarly misinterpreted
  by other tools.
* The interface looks silly when copy-pasted.

Change-Id: I65c771fc22e105bf5978e6e4ee5068200f294b9e
---
M resources/Resources.php
M resources/src/jquery/jquery.confirmable.js
M resources/src/jquery/jquery.confirmable.mediawiki.js
3 files changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Calak: Looks good to me, but someone else must approve
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/Resources.php b/resources/Resources.php
index a52b1ff..10cfbbb 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -200,6 +200,7 @@
                        'confirmable-confirm',
                        'confirmable-yes',
                        'confirmable-no',
+                       'word-separator',
                ),
                'styles' => 'resources/src/jquery/jquery.confirmable.css',
                'dependencies' => 'mediawiki.jqueryMsg',
diff --git a/resources/src/jquery/jquery.confirmable.js 
b/resources/src/jquery/jquery.confirmable.js
index 4b80d95..339e65a 100644
--- a/resources/src/jquery/jquery.confirmable.js
+++ b/resources/src/jquery/jquery.confirmable.js
@@ -36,6 +36,7 @@
         * @param {Function} [options.handler] Callback to fire when the action 
is confirmed (user clicks
         *     the 'Yes' button).
         * @param {string} [options.i18n] Text to use for interface elements.
+        * @param {string} [options.i18n.space] Word separator to place between 
the three text messages.
         * @param {string} [options.i18n.confirm] Text to use for the 
confirmation question.
         * @param {string} [options.i18n.yes] Text to use for the 'Yes' button.
         * @param {string} [options.i18n.no] Text to use for the 'No' button.
@@ -126,7 +127,7 @@
 
                                $interface = $( '<span>' )
                                        .addClass( 
'jquery-confirmable-interface' )
-                                       .append( $text, $buttonYes, $buttonNo );
+                                       .append( $text, options.i18n.space, 
$buttonYes, options.i18n.space, $buttonNo );
                                $interface = options.wrapperCallback( 
$interface );
 
                                // Render offscreen to measure real width
@@ -160,6 +161,7 @@
                buttonCallback: identity,
                handler: null,
                i18n: {
+                       space: ' ',
                        confirm: 'Are you sure?',
                        yes: 'Yes',
                        no: 'No'
diff --git a/resources/src/jquery/jquery.confirmable.mediawiki.js 
b/resources/src/jquery/jquery.confirmable.mediawiki.js
index 7ac04f4..d4a106e 100644
--- a/resources/src/jquery/jquery.confirmable.mediawiki.js
+++ b/resources/src/jquery/jquery.confirmable.mediawiki.js
@@ -6,6 +6,7 @@
 
 ( function ( mw, $ ) {
        $.fn.confirmable.defaultOptions.i18n = {
+               space: mw.message( 'word-separator' ).text(),
                confirm: mw.message( 'confirmable-confirm', mw.user ).text(),
                yes: mw.message( 'confirmable-yes' ).text(),
                no: mw.message( 'confirmable-no' ).text()

-- 
To view, visit https://gerrit.wikimedia.org/r/160067
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I65c771fc22e105bf5978e6e4ee5068200f294b9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Calak <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: TheDJ <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to