@@ -20,7 +20,7 @@ The prompt widget can be initialized with or without binding to a certain elemen
20
20
21
21
``` javascript
22
22
$ (' #prompt_init' ).prompt ({
23
- title: ' Prompt title' ,
23
+ title: $ . mage . __ ( ' Prompt title' ) ,
24
24
actions: {
25
25
confirm : function (){}, // callback on 'Ok' button click
26
26
cancel : function (){}, // callback on 'Cancel' button click
@@ -33,12 +33,13 @@ $('#prompt_init').prompt({
33
33
34
34
``` javascript
35
35
require ([
36
+ ' jquery' ,
36
37
' Magento_Ui/js/modal/prompt'
37
- ], function (prompt ) { // Variable that represents the `prompt` function
38
+ ], function ($ , prompt ) { // Variable that represents the `prompt` function
38
39
39
40
prompt ({
40
- title: ' Some title' ,
41
- content: ' Some content' ,
41
+ title: $ . mage . __ ( ' Some title' ) ,
42
+ content: $ . mage . __ ( ' Some content' ) ,
42
43
actions: {
43
44
confirm : function (){},
44
45
cancel : function (){},
@@ -223,9 +224,9 @@ The prompt widget implements the following events:
223
224
' use strict' ;
224
225
225
226
$ (' .prompt-modal-content' ).prompt ({
226
- title: ' Prompt Title' ,
227
+ title: $ . mage . __ ( ' Prompt Title' ) ,
227
228
modalClass: ' prompt' ,
228
- value: ' Value by default' ,
229
+ value: $ . mage . __ ( ' Value by default' ) ,
229
230
validation: true ,
230
231
promptField: ' [data-role="promptField"]' ,
231
232
validationRules: [' required-entry' ],
@@ -269,10 +270,10 @@ The prompt widget implements the following events:
269
270
' use strict' ;
270
271
271
272
prompt ({
272
- title: ' Prompt Title' ,
273
- content: $ ( ' .prompt-modal-content' ),
273
+ title: $ . mage . __ ( ' Prompt Title' ) ,
274
+ content: $ . mage . __ ( $ ( ' .prompt-modal-content' ) ),
274
275
modalClass: ' prompt' ,
275
- value: ' Value by default' ,
276
+ value: $ . mage . __ ( ' Value by default' ) ,
276
277
validation: true ,
277
278
promptField: ' [data-role="promptField"]' ,
278
279
validationRules: [' required-entry' ],
0 commit comments