Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 21049b7

Browse files
authored
Merge pull request #4759 from hardikm-cirkleinc/patch-4
Add __('<your_string>') method in Alert Widget
2 parents 870cc6f + 05467af commit 21049b7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

guides/v2.1/javascript-dev-guide/widgets/widget_alert.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ The alert widget can be initialized with or without binding to a certain element
1919

2020
```javascript
2121
$('#init_element').alert({
22-
title: 'Warning',
23-
content: 'Warning content',
22+
title: $.mage.__('Warning'),
23+
content: $.mage.__('Warning content'),
2424
actions: {
2525
always: function(){}
2626
}
@@ -34,8 +34,8 @@ require([
3434
], function(alert) { // Variable that represents the `alert` function
3535

3636
alert({
37-
title: 'Some title',
38-
content: 'Some content',
37+
title: $.mage.__('Some title'),
38+
content: $.mage.__('Some content'),
3939
actions: {
4040
always: function(){}
4141
}

0 commit comments

Comments
 (0)