How to reprodice
The following command will wrongly generate an empty js-translation.json
file for the ru_RU
locale:
rm -rf pub/static/* && bin/magento setup:static-content:deploy -f en_US ru_RU --area frontend --theme Magento/luma
The following command will wrongly generate an empty js-translation.json
file for the ru_RU
locale:
rm -rf pub/static/* && bin/magento setup:static-content:deploy -f en_US ru_RU --area frontend --theme Magento/luma
Locate the method Magento\Deploy\Service\DeployTranslationsDictionary::deploy()
:
Add the following code at the beginning for the method:
/** @var \Magento\Framework\TranslateInterface $t */
$t = \Magento\Framework\App\ObjectManager::getInstance()->get(
\Magento\Framework\TranslateInterface::class
);
$t->setLocale($locale)->loadData($area, true);