Skip to content

Commit a44f6ef

Browse files
committed
Add localization
1 parent 13b8f12 commit a44f6ef

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/components/modebar/cloud_confirm.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
var d3 = require('@plotly/d3');
44

5+
var Lib = require('../../lib');
6+
var _ = Lib._;
7+
58
/**
69
* Show a styled confirmation dialog before sharing a chart with Plotly Cloud.
710
*
@@ -28,11 +31,11 @@ module.exports = function confirmCloudDialog(gd, serverUrl, onConfirm) {
2831

2932
dialog.append('div')
3033
.classed('plotly-cloud-dialog-title', true)
31-
.text('Share with Plotly Cloud');
34+
.text(_(gd, 'Share with Plotly Cloud'));
3235

3336
dialog.append('div')
3437
.classed('plotly-cloud-dialog-message', true)
35-
.text('Your chart data will be sent to ' + serverUrl + '.');
38+
.text(_(gd, 'Your chart data will be sent to') + ' ' + serverUrl + '.');
3639

3740
var buttons = dialog.append('div')
3841
.classed('plotly-cloud-dialog-buttons', true);
@@ -55,13 +58,13 @@ module.exports = function confirmCloudDialog(gd, serverUrl, onConfirm) {
5558
buttons.append('button')
5659
.classed('plotly-cloud-dialog-btn', true)
5760
.classed('plotly-cloud-dialog-btn--cancel', true)
58-
.text('Cancel')
61+
.text(_(gd, 'Cancel'))
5962
.on('click', close);
6063

6164
buttons.append('button')
6265
.classed('plotly-cloud-dialog-btn', true)
6366
.classed('plotly-cloud-dialog-btn--confirm', true)
64-
.text('Share')
67+
.text(_(gd, 'Share'))
6568
.on('click', function() {
6669
close();
6770
onConfirm();

0 commit comments

Comments
 (0)