Skip to content

Commit 9212f28

Browse files
author
Wiard van Rij
committed
Fixes translations by re-running the loadData for its correct locale
1 parent e649b4c commit 9212f28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/code/Magento/Translation/Model/Json/PreProcessor.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ public function process(Chain $chain)
7777
if ($context instanceof FallbackContext) {
7878
$themePath = $context->getThemePath();
7979
$areaCode = $context->getAreaCode();
80-
$this->translate->setLocale($context->getLocale());
8180
}
8281

8382
$area = $this->areaList->getArea($areaCode);
8483
$area->load(\Magento\Framework\App\Area::PART_TRANSLATE);
84+
85+
$this->translate->setLocale($context->getLocale())->loadData($areaCode, true);
8586

8687
$chain->setContent(json_encode($this->dataProvider->getData($themePath)));
8788
$chain->setContentType('json');

0 commit comments

Comments
 (0)