Skip to content

Commit c892412

Browse files
committed
MAGETWO-72625: [2.3] - Translations from theme do not work(Authorize.net)
1 parent cd9eafa commit c892412

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

app/code/Magento/Translation/view/base/templates/translate.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
<?php $version = $block->getTranslationFileVersion(); ?>
3030

31-
if (versionObj.version !== '<?= $block->escapeJsQuote($version) ?>') {
31+
if (versionObj.version !== '<?= /* @escapeNotVerified */ $block->escapeJsQuote($version) ?>') {
3232
dependencies.push(
3333
'text!<?= /* @noEscape */ Magento\Translation\Model\Js\Config::DICTIONARY_FILE_NAME ?>'
3434
);
@@ -44,7 +44,7 @@
4444
$.localStorage.set(
4545
'mage-translation-file-version',
4646
{
47-
version: '<?= $block->escapeJsQuote($version) ?>'
47+
version: '<?= /* @escapeNotVerified */ $block->escapeJsQuote($version) ?>'
4848
}
4949
);
5050
} else {

dev/tests/integration/testsuite/Magento/Framework/TranslateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ protected function setUp()
7878
)
7979
->getMock();
8080

81-
$designModel->expects($this->any())->method('getDesignTheme')->willReturnValue($theme);
81+
$designModel->expects($this->any())->method('getDesignTheme')->willReturn($theme);
8282

8383
$objectManager->addSharedInstance($designModel, \Magento\Theme\Model\View\Design\Proxy::class);
8484

lib/internal/Magento/Framework/Test/Unit/TranslateTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ public function testLoadData($area, $forceReload)
237237
$this->assertEquals($expected, $this->translate->getData());
238238
}
239239

240+
/**
241+
* @return array
242+
*/
240243
public function dataProviderForTestLoadData()
241244
{
242245
return [
@@ -245,7 +248,7 @@ public function dataProviderForTestLoadData()
245248
['frontend', true],
246249
['frontend', false],
247250
[null, true],
248-
[null, false]
251+
[null, false],
249252
];
250253
}
251254

@@ -264,12 +267,15 @@ public function testGetData($data, $result)
264267
$this->assertEquals($result, $this->translate->getData());
265268
}
266269

270+
/**
271+
* @return array
272+
*/
267273
public function dataProviderForTestGetData()
268274
{
269275
$data = ['original 1' => 'translated 1', 'original 2' => 'translated 2'];
270276
return [
271277
[$data, $data],
272-
[null, []]
278+
[null, []],
273279
];
274280
}
275281

0 commit comments

Comments
 (0)