@@ -105,24 +105,31 @@ public function testGetData()
105
105
'hello1 ' => 'hello1translated ' ,
106
106
'hello2 ' => 'hello2translated ' ,
107
107
'hello3 ' => 'hello3translated ' ,
108
- 'hello4 ' => 'hello4translated '
108
+ 'hello4 ' => 'hello4translated ' ,
109
+ 'ko i18 ' => 'ko i18 translated ' ,
110
+ 'underscore i18 ' => 'underscore i18 translated ' ,
109
111
];
110
112
111
113
$ contentsMap = [
112
114
'content1$.mage.__("hello1")content1 ' ,
113
115
'content2$.mage.__("hello2")content2 ' ,
114
- 'content2$.mage.__("hello4")content4 ' , // this value should be last after running data provider
115
- 'content2$.mage.__("hello3")content3 ' ,
116
+ 'content2$.mage.__("hello4")content4 <!-- ko i18n: "ko i18" --><!-- /ko --> ' ,
117
+ 'content2$.mage.__("hello3")content3 <% _.i18n("underscore i18") %> ' ,
116
118
];
117
119
118
120
$ translateMap = [
119
121
[['hello1 ' ], [], 'hello1translated ' ],
120
122
[['hello2 ' ], [], 'hello2translated ' ],
121
123
[['hello3 ' ], [], 'hello3translated ' ],
122
- [['hello4 ' ], [], 'hello4translated ' ]
124
+ [['hello4 ' ], [], 'hello4translated ' ],
125
+ [['ko i18 ' ], [], 'ko i18 translated ' ],
126
+ [['underscore i18 ' ], [], 'underscore i18 translated ' ],
123
127
];
124
128
125
- $ patterns = ['~\$\.mage\.__\(([ \'"])(.+?)\1\)~ ' ];
129
+ $ patterns = [
130
+ '~\$\.mage\.__\(([ \'"])(.+?)\1\)~ ' ,
131
+ '~(?:i18n\:|_\.i18n\()\s*([" \'])(.*?)(?<! \\\\)\1~ ' ,
132
+ ];
126
133
127
134
$ this ->appStateMock ->expects ($ this ->once ())
128
135
->method ('getAreaCode ' )
0 commit comments