Rillke has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/156065

Change subject: Fix label text in RTL demo listing containing parentheses
......................................................................

Fix label text in RTL demo listing containing parentheses

http://i.imgur.com/LtSf9ga.png

Parentheses are "neutral" and as the last paren. is not considered
belonging to the English text, it is assumed to be right-to-left
(like the surrounding paragraph).

Since it doesn't look like the demos will ever be localized, it is
safe to tell the browser that the whole label is left-to-right text.

Change-Id: I2f0a6190921c5e4b556b463b92b32fd3b36eebcb
---
M demos/dialogs.js
M demos/widgets.js
2 files changed, 41 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/65/156065/1

diff --git a/demos/dialogs.js b/demos/dialogs.js
index f1a66a7..901c105 100644
--- a/demos/dialogs.js
+++ b/demos/dialogs.js
@@ -326,7 +326,7 @@
                openButton = new OO.ui.ButtonWidget( {
                        framed: false,
                        icon: 'window',
-                       label: config[i].name
+                       label: $( '<span dir="ltr"></span>' ).text( 
config[i].name )
                } );
                openButton.on(
                        'click', OO.ui.bind( openDialog, this, name, 
config[i].data )
diff --git a/demos/widgets.js b/demos/widgets.js
index 8dbd57c..eac37a1 100644
--- a/demos/widgets.js
+++ b/demos/widgets.js
@@ -8,7 +8,7 @@
                                        title: 'Picture icon'
                                } ),
                                {
-                                       label: 'IconWidget (normal)',
+                                       label: 'IconWidget (normal)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -19,7 +19,7 @@
                                        disabled: true
                                } ),
                                {
-                                       label: 'IconWidget (disabled)',
+                                       label: 'IconWidget (disabled)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -29,7 +29,7 @@
                                        title: 'Required icon'
                                } ),
                                {
-                                       label: 'IndicatorWidget (normal)',
+                                       label: 'IndicatorWidget (normal)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -40,14 +40,14 @@
                                        disabled: true
                                } ),
                                {
-                                       label: 'IndicatorWidget (disabled)',
+                                       label: 'IndicatorWidget 
(disabled)\u200E',
                                        align: 'top'
                                }
                        ),
                        new OO.ui.FieldLayout(
                                new OO.ui.ButtonWidget( { label: 'Normal' } ),
                                {
-                                       label: 'ButtonWidget (normal)',
+                                       label: 'ButtonWidget (normal)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -57,7 +57,7 @@
                                        flags: [ 'primary' ]
                                } ),
                                {
-                                       label: 'ButtonWidget (primary)',
+                                       label: 'ButtonWidget (primary)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -67,7 +67,7 @@
                                        flags: [ 'constructive' ]
                                } ),
                                {
-                                       label: 'ButtonWidget (constructive)',
+                                       label: 'ButtonWidget 
(constructive)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -77,7 +77,7 @@
                                        flags: [ 'destructive' ]
                                } ),
                                {
-                                       label: 'ButtonWidget (destructive)',
+                                       label: 'ButtonWidget 
(destructive)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -87,7 +87,7 @@
                                        disabled: true
                                } ),
                                {
-                                       label: 'ButtonWidget (disabled)',
+                                       label: 'ButtonWidget (disabled)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -98,7 +98,7 @@
                                        disabled: true
                                } ),
                                {
-                                       label: 'ButtonWidget (constructive, 
disabled)',
+                                       label: 'ButtonWidget (constructive, 
disabled)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -108,7 +108,7 @@
                                        icon: 'picture'
                                } ),
                                {
-                                       label: 'ButtonWidget (iconed)',
+                                       label: 'ButtonWidget (iconed)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -118,7 +118,7 @@
                                        indicator: 'down'
                                } ),
                                {
-                                       label: 'ButtonWidget (indicated)',
+                                       label: 'ButtonWidget (indicated)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -129,7 +129,7 @@
                                        title: 'Icon only'
                                } ),
                                {
-                                       label: 'ButtonWidget (icon only)',
+                                       label: 'ButtonWidget (icon only)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -140,7 +140,7 @@
                                        label: 'Labeled'
                                } ),
                                {
-                                       label: 'ButtonWidget (frameless)',
+                                       label: 'ButtonWidget (frameless)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -152,7 +152,7 @@
                                        label: 'Primary'
                                } ),
                                {
-                                       label: 'ButtonWidget (frameless, 
primary)',
+                                       label: 'ButtonWidget (frameless, 
primary)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -164,7 +164,7 @@
                                        label: 'Destructive'
                                } ),
                                {
-                                       label: 'ButtonWidget (frameless, 
destructive)',
+                                       label: 'ButtonWidget (frameless, 
destructive)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -176,7 +176,7 @@
                                        label: 'Constructive'
                                } ),
                                {
-                                       label: 'ButtonWidget (frameless, 
constructive)',
+                                       label: 'ButtonWidget (frameless, 
constructive)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -188,7 +188,7 @@
                                        disabled: true
                                } ),
                                {
-                                       label: 'ButtonWidget (frameless, 
disabled)',
+                                       label: 'ButtonWidget (frameless, 
disabled)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -201,7 +201,7 @@
                                        disabled: true
                                } ),
                                {
-                                       label: 'ButtonWidget (frameless, 
constructive, disabled)',
+                                       label: 'ButtonWidget (frameless, 
constructive, disabled)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -218,7 +218,7 @@
                                        }
                                } ),
                                {
-                                       label: 'PopupButtonWidget (frameless, 
with popup head)',
+                                       label: 'PopupButtonWidget (frameless, 
with popup head)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -233,7 +233,7 @@
                                        }
                                } ),
                                {
-                                       label: 'PopupButtonWidget (framed, no 
popup head)',
+                                       label: 'PopupButtonWidget (framed, no 
popup head)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -304,7 +304,7 @@
                                        ]
                                } ),
                                {
-                                       label: 'ButtonSelectWidget (disabled)',
+                                       label: 'ButtonSelectWidget 
(disabled)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -328,7 +328,7 @@
                                        ]
                                } ),
                                {
-                                       label: 'ButtonSelectWidget (disabled 
items)',
+                                       label: 'ButtonSelectWidget (disabled 
items)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -342,14 +342,14 @@
                        new OO.ui.FieldLayout(
                                new OO.ui.ToggleButtonWidget( { label: 
'Toggle', value: true } ),
                                {
-                                       label: 'ToggleButtonWidget (initially 
active)',
+                                       label: 'ToggleButtonWidget (initially 
active)\u200E',
                                        align: 'top'
                                }
                        ),
                        new OO.ui.FieldLayout(
                                new OO.ui.ToggleButtonWidget( { icon: 'next' } 
),
                                {
-                                       label: 'ToggleButtonWidget (icon only)',
+                                       label: 'ToggleButtonWidget (icon 
only)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -363,14 +363,14 @@
                        new OO.ui.FieldLayout(
                                new OO.ui.ToggleSwitchWidget( { disabled: true 
} ),
                                {
-                                       label: 'ToggleSwitchWidget (disabled)',
+                                       label: 'ToggleSwitchWidget 
(disabled)\u200E',
                                        align: 'top'
                                }
                        ),
                        new OO.ui.FieldLayout(
                                new OO.ui.ToggleSwitchWidget( { disabled: true, 
value: true } ),
                                {
-                                       label: 'ToggleSwitchWidget (disabled, 
checked)',
+                                       label: 'ToggleSwitchWidget (disabled, 
checked)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -390,7 +390,7 @@
                                } ),
                                {
                                        align: 'inline',
-                                       label: 'CheckboxInputWidget (disabled)'
+                                       label: 'CheckboxInputWidget 
(disabled)\u200E'
                                }
                        ),
                        new OO.ui.FieldLayout(
@@ -448,7 +448,7 @@
                                        }
                                } ),
                                {
-                                       label: 'InlineMenuWidget (disabled 
options)',
+                                       label: 'InlineMenuWidget (disabled 
options)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -474,7 +474,7 @@
                                        }
                                } ),
                                {
-                                       label: 'InlineMenuWidget (disabled)',
+                                       label: 'InlineMenuWidget 
(disabled)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -509,42 +509,42 @@
                                        }
                                } ),
                                {
-                                       label: 'ComboBoxWidget (disabled)',
+                                       label: 'ComboBoxWidget 
(disabled)\u200E',
                                        align: 'top'
                                }
                        ),
                        new OO.ui.FieldLayout(
                                new OO.ui.ComboBoxWidget(),
                                {
-                                       label: 'ComboBoxWidget (empty)',
+                                       label: 'ComboBoxWidget (empty)\u200E',
                                        align: 'top'
                                }
                        ),
                        new OO.ui.FieldLayout(
                                new OO.ui.TextInputWidget( { value: 'Text 
input' } ),
                                {
-                                       label: 'TextInputWidget',
+                                       label: 'TextInputWidget\u200E',
                                        align: 'top'
                                }
                        ),
                        new OO.ui.FieldLayout(
                                new OO.ui.TextInputWidget( { icon: 'search' } ),
                                {
-                                       label: 'TextInputWidget (icon)',
+                                       label: 'TextInputWidget (icon)\u200E',
                                        align: 'top'
                                }
                        ),
                        new OO.ui.FieldLayout(
                                new OO.ui.TextInputWidget( { indicator: 
'required' } ),
                                {
-                                       label: 'TextInputWidget (indicator)',
+                                       label: 'TextInputWidget 
(indicator)\u200E',
                                        align: 'top'
                                }
                        ),
                        new OO.ui.FieldLayout(
                                new OO.ui.TextInputWidget( { placeholder: 
'Placeholder' } ),
                                {
-                                       label: 'TextInputWidget (placeholder)',
+                                       label: 'TextInputWidget 
(placeholder)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -554,7 +554,7 @@
                                        readOnly: true
                                } ),
                                {
-                                       label: 'TextInputWidget (readonly)',
+                                       label: 'TextInputWidget 
(readonly)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -564,7 +564,7 @@
                                        disabled: true
                                } ),
                                {
-                                       label: 'TextInputWidget (disabled)',
+                                       label: 'TextInputWidget 
(disabled)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -574,7 +574,7 @@
                                        value: 'Multiline'
                                } ),
                                {
-                                       label: 'TextInputWidget (multiline)',
+                                       label: 'TextInputWidget 
(multiline)\u200E',
                                        align: 'top'
                                }
                        ),
@@ -585,7 +585,7 @@
                                        value: 'Autosize'
                                } ),
                                {
-                                       label: 'TextInputWidget (autosize)',
+                                       label: 'TextInputWidget 
(autosize)\u200E',
                                        align: 'top'
                                }
                        )

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f0a6190921c5e4b556b463b92b32fd3b36eebcb
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Rillke <ril...@wikipedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to