I am using some translation packages from Packagist (
magento2translations/*) and I have some translation files in my theme at
app/design/frontend/Mytheme/mytheme/i18n. On the PHP side, they all work flawlessly. But in client-side code, the translations aren't working at all.
I tracked the problem down to the generated
js-translation.json files. They are all empty (i.e. the only contain an empty array "
I found some people having the same problem here and on GitHub and some (very different) solutions, but none of them have worked for me. Every time I run
bin/magento setup:static-content:deploy <locale>, the deployed JSON file is still empty.
js-translation.json is only populated in languages that I have language packages installed for, but not for languages I translated in
Also, the translations from
app/design/frontend/Omv/omv/i18n aren't present in
js-translation.json - not even for languages I have a language pack for. Is this intended or a bug?
Edit 2: The
js-translation.json files are not empty in my local development environment. I have no idea why.