@@ -47,31 +47,31 @@ var modeBarButtons = module.exports = {};
47
47
48
48
modeBarButtons . toImage = {
49
49
name : 'toImage' ,
50
- title : 'Download plot as a png' ,
50
+ title : require ( '../../core' ) . uiTexts . toImageButton ,
51
51
icon : Icons . camera ,
52
52
click : function ( gd ) {
53
53
var format = 'png' ;
54
54
55
- Lib . notifier ( 'Taking snapshot - this may take a few seconds' , 'long' ) ;
55
+ Lib . notifier ( require ( '../../core' ) . uiTexts . pngSnapshotTip , 'long' ) ;
56
56
57
57
if ( Lib . isIE ( ) ) {
58
- Lib . notifier ( 'IE only supports svg. Changing format to svg.' , 'long' ) ;
58
+ Lib . notifier ( require ( '../../core' ) . uiTexts . svgSnapshotTip , 'long' ) ;
59
59
format = 'svg' ;
60
60
}
61
61
62
62
downloadImage ( gd , { 'format' : format } )
63
63
. then ( function ( filename ) {
64
- Lib . notifier ( 'Snapshot succeeded - ' + filename , 'long' ) ;
64
+ Lib . notifier ( require ( '../../core' ) . uiTexts . snapshotSuccessTip + filename , 'long' ) ;
65
65
} )
66
66
. catch ( function ( ) {
67
- Lib . notifier ( 'Sorry there was a problem downloading your snapshot!' , 'long' ) ;
67
+ Lib . notifier ( require ( '../../core' ) . uiTexts . snapshotErrorTip , 'long' ) ;
68
68
} ) ;
69
69
}
70
70
} ;
71
71
72
72
modeBarButtons . sendDataToCloud = {
73
73
name : 'sendDataToCloud' ,
74
- title : 'Save and edit plot in cloud' ,
74
+ title : require ( '../../core' ) . uiTexts . sendDataToCloudButton ,
75
75
icon : Icons . disk ,
76
76
click : function ( gd ) {
77
77
Plots . sendDataToCloud ( gd ) ;
@@ -80,7 +80,7 @@ modeBarButtons.sendDataToCloud = {
80
80
81
81
modeBarButtons . zoom2d = {
82
82
name : 'zoom2d' ,
83
- title : 'Zoom' ,
83
+ title : require ( '../../core' ) . uiTexts . zoomButton ,
84
84
attr : 'dragmode' ,
85
85
val : 'zoom' ,
86
86
icon : Icons . zoombox ,
@@ -89,7 +89,7 @@ modeBarButtons.zoom2d = {
89
89
90
90
modeBarButtons . pan2d = {
91
91
name : 'pan2d' ,
92
- title : 'Pan' ,
92
+ title : require ( '../../core' ) . uiTexts . panButton ,
93
93
attr : 'dragmode' ,
94
94
val : 'pan' ,
95
95
icon : Icons . pan ,
@@ -98,7 +98,7 @@ modeBarButtons.pan2d = {
98
98
99
99
modeBarButtons . select2d = {
100
100
name : 'select2d' ,
101
- title : 'Box Select' ,
101
+ title : require ( '../../core' ) . uiTexts . boxSelectButton ,
102
102
attr : 'dragmode' ,
103
103
val : 'select' ,
104
104
icon : Icons . selectbox ,
@@ -107,7 +107,7 @@ modeBarButtons.select2d = {
107
107
108
108
modeBarButtons . lasso2d = {
109
109
name : 'lasso2d' ,
110
- title : 'Lasso Select' ,
110
+ title : require ( '../../core' ) . uiTexts . lassoSelectButton ,
111
111
attr : 'dragmode' ,
112
112
val : 'lasso' ,
113
113
icon : Icons . lasso ,
@@ -116,7 +116,7 @@ modeBarButtons.lasso2d = {
116
116
117
117
modeBarButtons . zoomIn2d = {
118
118
name : 'zoomIn2d' ,
119
- title : 'Zoom in' ,
119
+ title : require ( '../../core' ) . uiTexts . zoomInButton ,
120
120
attr : 'zoom' ,
121
121
val : 'in' ,
122
122
icon : Icons . zoom_plus ,
@@ -125,7 +125,7 @@ modeBarButtons.zoomIn2d = {
125
125
126
126
modeBarButtons . zoomOut2d = {
127
127
name : 'zoomOut2d' ,
128
- title : 'Zoom out' ,
128
+ title : require ( '../../core' ) . uiTexts . zoomOutButton ,
129
129
attr : 'zoom' ,
130
130
val : 'out' ,
131
131
icon : Icons . zoom_minus ,
@@ -134,7 +134,7 @@ modeBarButtons.zoomOut2d = {
134
134
135
135
modeBarButtons . autoScale2d = {
136
136
name : 'autoScale2d' ,
137
- title : 'Autoscale' ,
137
+ title : require ( '../../core' ) . uiTexts . autoscaleButton ,
138
138
attr : 'zoom' ,
139
139
val : 'auto' ,
140
140
icon : Icons . autoscale ,
@@ -143,7 +143,7 @@ modeBarButtons.autoScale2d = {
143
143
144
144
modeBarButtons . resetScale2d = {
145
145
name : 'resetScale2d' ,
146
- title : 'Reset axes' ,
146
+ title : require ( '../../core' ) . uiTexts . resetAxesButton ,
147
147
attr : 'zoom' ,
148
148
val : 'reset' ,
149
149
icon : Icons . home ,
@@ -152,7 +152,7 @@ modeBarButtons.resetScale2d = {
152
152
153
153
modeBarButtons . hoverClosestCartesian = {
154
154
name : 'hoverClosestCartesian' ,
155
- title : 'Show closest data on hover' ,
155
+ title : require ( '../../core' ) . uiTexts . closestDataOnHoverButton ,
156
156
attr : 'hovermode' ,
157
157
val : 'closest' ,
158
158
icon : Icons . tooltip_basic ,
@@ -162,7 +162,7 @@ modeBarButtons.hoverClosestCartesian = {
162
162
163
163
modeBarButtons . hoverCompareCartesian = {
164
164
name : 'hoverCompareCartesian' ,
165
- title : 'Compare data on hover' ,
165
+ title : require ( '../../core' ) . uiTexts . compareDataOnHoverButton ,
166
166
attr : 'hovermode' ,
167
167
val : function ( gd ) {
168
168
return gd . _fullLayout . _isHoriz ? 'y' : 'x' ;
@@ -256,7 +256,7 @@ function handleCartesian(gd, ev) {
256
256
257
257
modeBarButtons . zoom3d = {
258
258
name : 'zoom3d' ,
259
- title : 'Zoom' ,
259
+ title : require ( '../../core' ) . uiTexts . zoomButton ,
260
260
attr : 'scene.dragmode' ,
261
261
val : 'zoom' ,
262
262
icon : Icons . zoombox ,
@@ -265,7 +265,7 @@ modeBarButtons.zoom3d = {
265
265
266
266
modeBarButtons . pan3d = {
267
267
name : 'pan3d' ,
268
- title : 'Pan' ,
268
+ title : require ( '../../core' ) . uiTexts . panButton ,
269
269
attr : 'scene.dragmode' ,
270
270
val : 'pan' ,
271
271
icon : Icons . pan ,
@@ -274,7 +274,7 @@ modeBarButtons.pan3d = {
274
274
275
275
modeBarButtons . orbitRotation = {
276
276
name : 'orbitRotation' ,
277
- title : 'orbital rotation' ,
277
+ title : require ( '../../core' ) . uiTexts . orbitalRotationButton ,
278
278
attr : 'scene.dragmode' ,
279
279
val : 'orbit' ,
280
280
icon : Icons [ '3d_rotate' ] ,
@@ -283,7 +283,7 @@ modeBarButtons.orbitRotation = {
283
283
284
284
modeBarButtons . tableRotation = {
285
285
name : 'tableRotation' ,
286
- title : 'turntable rotation' ,
286
+ title : require ( '../../core' ) . uiTexts . turntableRotationButton ,
287
287
attr : 'scene.dragmode' ,
288
288
val : 'turntable' ,
289
289
icon : Icons [ 'z-axis' ] ,
@@ -309,15 +309,15 @@ function handleDrag3d(gd, ev) {
309
309
310
310
modeBarButtons . resetCameraDefault3d = {
311
311
name : 'resetCameraDefault3d' ,
312
- title : 'Reset camera to default' ,
312
+ title : require ( '../../core' ) . uiTexts . resetCameraButton ,
313
313
attr : 'resetDefault' ,
314
314
icon : Icons . home ,
315
315
click : handleCamera3d
316
316
} ;
317
317
318
318
modeBarButtons . resetCameraLastSave3d = {
319
319
name : 'resetCameraLastSave3d' ,
320
- title : 'Reset camera to last save' ,
320
+ title : require ( '../../core' ) . uiTexts . resetSavedCameraButton ,
321
321
attr : 'resetLastSave' ,
322
322
icon : Icons . movie ,
323
323
click : handleCamera3d
@@ -348,7 +348,7 @@ function handleCamera3d(gd, ev) {
348
348
349
349
modeBarButtons . hoverClosest3d = {
350
350
name : 'hoverClosest3d' ,
351
- title : 'Toggle show closest data on hover' ,
351
+ title : require ( '../../core' ) . uiTexts . closestDataOnHoverButton ,
352
352
attr : 'hovermode' ,
353
353
val : null ,
354
354
toggle : true ,
@@ -409,7 +409,7 @@ function handleHover3d(gd, ev) {
409
409
410
410
modeBarButtons . zoomInGeo = {
411
411
name : 'zoomInGeo' ,
412
- title : 'Zoom in' ,
412
+ title : require ( '../../core' ) . uiTexts . zoomInButton ,
413
413
attr : 'zoom' ,
414
414
val : 'in' ,
415
415
icon : Icons . zoom_plus ,
@@ -418,7 +418,7 @@ modeBarButtons.zoomInGeo = {
418
418
419
419
modeBarButtons . zoomOutGeo = {
420
420
name : 'zoomOutGeo' ,
421
- title : 'Zoom out' ,
421
+ title : require ( '../../core' ) . uiTexts . zoomOutButton ,
422
422
attr : 'zoom' ,
423
423
val : 'out' ,
424
424
icon : Icons . zoom_minus ,
@@ -427,7 +427,7 @@ modeBarButtons.zoomOutGeo = {
427
427
428
428
modeBarButtons . resetGeo = {
429
429
name : 'resetGeo' ,
430
- title : 'Reset' ,
430
+ title : require ( '../../core' ) . uiTexts . resetGeoButton ,
431
431
attr : 'reset' ,
432
432
val : null ,
433
433
icon : Icons . autoscale ,
@@ -436,7 +436,7 @@ modeBarButtons.resetGeo = {
436
436
437
437
modeBarButtons . hoverClosestGeo = {
438
438
name : 'hoverClosestGeo' ,
439
- title : 'Toggle show closest data on hover' ,
439
+ title : require ( '../../core' ) . uiTexts . closestDataOnHoverButton ,
440
440
attr : 'hovermode' ,
441
441
val : null ,
442
442
toggle : true ,
@@ -469,7 +469,7 @@ function handleGeo(gd, ev) {
469
469
470
470
modeBarButtons . hoverClosestGl2d = {
471
471
name : 'hoverClosestGl2d' ,
472
- title : 'Toggle show closest data on hover' ,
472
+ title : require ( '../../core' ) . uiTexts . closestDataOnHoverButton ,
473
473
attr : 'hovermode' ,
474
474
val : null ,
475
475
toggle : true ,
@@ -480,7 +480,7 @@ modeBarButtons.hoverClosestGl2d = {
480
480
481
481
modeBarButtons . hoverClosestPie = {
482
482
name : 'hoverClosestPie' ,
483
- title : 'Toggle show closest data on hover' ,
483
+ title : require ( '../../core' ) . uiTexts . closestDataOnHoverButton ,
484
484
attr : 'hovermode' ,
485
485
val : 'closest' ,
486
486
icon : Icons . tooltip_basic ,
@@ -506,7 +506,7 @@ function toggleHover(gd) {
506
506
507
507
modeBarButtons . toggleHover = {
508
508
name : 'toggleHover' ,
509
- title : 'Toggle show closest data on hover' ,
509
+ title : require ( '../../core' ) . uiTexts . closestDataOnHoverButton ,
510
510
attr : 'hovermode' ,
511
511
val : null ,
512
512
toggle : true ,
@@ -524,7 +524,7 @@ modeBarButtons.toggleHover = {
524
524
525
525
modeBarButtons . resetViews = {
526
526
name : 'resetViews' ,
527
- title : 'Reset views' ,
527
+ title : require ( '../../core' ) . uiTexts . resetViewsButton ,
528
528
icon : Icons . home ,
529
529
click : function ( gd , ev ) {
530
530
var button = ev . currentTarget ;
@@ -543,7 +543,7 @@ modeBarButtons.resetViews = {
543
543
544
544
modeBarButtons . toggleSpikelines = {
545
545
name : 'toggleSpikelines' ,
546
- title : 'Toggle Spike Lines' ,
546
+ title : require ( '../../core' ) . uiTexts . spikeLinesButton ,
547
547
icon : Icons . spikeline ,
548
548
attr : '_cartesianSpikesEnabled' ,
549
549
val : 'on' ,
@@ -578,7 +578,7 @@ function setSpikelineVisibility(gd) {
578
578
579
579
modeBarButtons . resetViewMapbox = {
580
580
name : 'resetViewMapbox' ,
581
- title : 'Reset view' ,
581
+ title : require ( '../../core' ) . uiTexts . resetViewButton ,
582
582
attr : 'reset' ,
583
583
icon : Icons . home ,
584
584
click : function ( gd ) {
0 commit comments