Skip to content

Commit 86a3efa

Browse files
committed
Update for the latest changes
1 parent 50be59c commit 86a3efa

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

app/code/Magento/Translation/Test/Unit/Model/Js/DataProviderTest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public function configDataProvider(): array
191191
[
192192
'patterns' => [
193193
'~\$\.mage\.__\(([\'"])(.+?)\1\)~',
194-
'~i18n\:\s*(["\'])(.*?)(?<!\\\)\1~',
194+
'~(?:i18n\:|_\.i18n\()\s*(["\'])(.*?)(?<!\\\\)\1~',
195195
'~translate\=("\')([^\'].*?)\'\"~',
196196
'~(?s)\$t\(\s*([\'"])(\?\<translate\>.+?)(?<!\\\)\1\s*(*SKIP)\)(?s)~',
197197
'~translate args\=("|\'|"\'|\\\"\')([^\'].*?)(\'\\\"|\'"|\'|")~',
@@ -201,18 +201,22 @@ public function configDataProvider(): array
201201
'hello2' => 'hello2translated',
202202
'hello3' => 'hello3translated',
203203
'hello4' => 'hello4translated',
204+
'ko i18' => 'ko i18 translated',
205+
'underscore i18' => 'underscore i18 translated',
204206
],
205207
'contentsMap' => [
206208
'content1$.mage.__("hello1")content1',
207209
'content2$.mage.__("hello2")content2',
208-
'content2$.mage.__("hello4")content4',
209-
'content2$.mage.__("hello3")content3',
210+
'content2$.mage.__("hello4")content4 <!-- ko i18n: "ko i18" --><!-- /ko -->',
211+
'content2$.mage.__("hello3")content3 <% _.i18n("underscore i18") %>',
210212
],
211213
'translateMap' => [
212214
[['hello1'], [], 'hello1translated'],
213215
[['hello2'], [], 'hello2translated'],
214216
[['hello3'], [], 'hello3translated'],
215217
[['hello4'], [], 'hello4translated'],
218+
[['ko i18'], [], 'ko i18 translated'],
219+
[['underscore i18'], [], 'underscore i18 translated'],
216220
]
217221
],
218222
]

0 commit comments

Comments
 (0)