Skip to content

Commit 482ab2a

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

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ protected function setUp()
121121
* @param string $area
122122
* @param bool $forceReload
123123
* @param array $cachedData
124+
* @return void
124125
* @dataProvider dataProviderLoadDataCachedTranslation
125126
*/
126127
public function testLoadDataCachedTranslation($area, $forceReload, array $cachedData)
@@ -155,6 +156,7 @@ public function dataProviderLoadDataCachedTranslation()
155156
/**
156157
* @param string $area
157158
* @param bool $forceReload
159+
* @return void
158160
* @dataProvider dataProviderForTestLoadData
159161
* @SuppressWarnings(PHPMD.NPathComplexity)
160162
*/
@@ -255,6 +257,7 @@ public function dataProviderForTestLoadData()
255257
/**
256258
* @param $data
257259
* @param $result
260+
* @return void
258261
* @dataProvider dataProviderForTestGetData
259262
*/
260263
public function testGetData($data, $result)

lib/internal/Magento/Framework/Translate.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public function __construct(
171171
self::CONFIG_LOCALE_KEY => null,
172172
self::CONFIG_SCOPE_KEY => null,
173173
self::CONFIG_THEME_KEY => null,
174-
self::CONFIG_MODULE_KEY => null
174+
self::CONFIG_MODULE_KEY => null,
175175
];
176176
}
177177

@@ -195,7 +195,8 @@ public function loadData($area = null, $forceReload = false)
195195
);
196196

197197
if (!$forceReload) {
198-
if (false !== $data = $this->_loadCache()) {
198+
$data = $this->_loadCache();
199+
if (false !== $data) {
199200
$this->_data = $data;
200201
return $this;
201202
}
@@ -459,11 +460,9 @@ public function getTheme()
459460
/**
460461
* Retrieve cache identifier
461462
*
462-
* @param bool $forceReload
463463
* @return string
464-
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
465464
*/
466-
protected function getCacheId($forceReload = false)
465+
protected function getCacheId()
467466
{
468467
$_cacheId = \Magento\Framework\App\Cache\Type\Translate::TYPE_IDENTIFIER;
469468
$_cacheId .= '_' . $this->_config[self::CONFIG_LOCALE_KEY];

0 commit comments

Comments
 (0)