@@ -20,7 +20,7 @@ The prompt widget can be initialized with or without binding to a certain elemen
2020
2121``` javascript
2222$ (' #prompt_init' ).prompt ({
23- title: ' Prompt title' ,
23+ title: $ . mage . __ ( ' Prompt title' ) ,
2424 actions: {
2525 confirm : function (){}, // callback on 'Ok' button click
2626 cancel : function (){}, // callback on 'Cancel' button click
@@ -33,12 +33,13 @@ $('#prompt_init').prompt({
3333
3434``` javascript
3535require ([
36+ ' jquery' ,
3637 ' Magento_Ui/js/modal/prompt'
37- ], function (prompt ) { // Variable that represents the `prompt` function
38+ ], function ($ , prompt ) { // Variable that represents the `prompt` function
3839
3940 prompt ({
40- title: ' Some title' ,
41- content: ' Some content' ,
41+ title: $ . mage . __ ( ' Some title' ) ,
42+ content: $ . mage . __ ( ' Some content' ) ,
4243 actions: {
4344 confirm : function (){},
4445 cancel : function (){},
@@ -223,9 +224,9 @@ The prompt widget implements the following events:
223224 ' use strict' ;
224225
225226 $ (' .prompt-modal-content' ).prompt ({
226- title: ' Prompt Title' ,
227+ title: $ . mage . __ ( ' Prompt Title' ) ,
227228 modalClass: ' prompt' ,
228- value: ' Value by default' ,
229+ value: $ . mage . __ ( ' Value by default' ) ,
229230 validation: true ,
230231 promptField: ' [data-role="promptField"]' ,
231232 validationRules: [' required-entry' ],
@@ -269,10 +270,10 @@ The prompt widget implements the following events:
269270 ' use strict' ;
270271
271272 prompt ({
272- title: ' Prompt Title' ,
273- content: $ ( ' .prompt-modal-content' ),
273+ title: $ . mage . __ ( ' Prompt Title' ) ,
274+ content: $ . mage . __ ( $ ( ' .prompt-modal-content' ) ),
274275 modalClass: ' prompt' ,
275- value: ' Value by default' ,
276+ value: $ . mage . __ ( ' Value by default' ) ,
276277 validation: true ,
277278 promptField: ' [data-role="promptField"]' ,
278279 validationRules: [' required-entry' ],
0 commit comments