Currently, the JS-Translation.json file (which Magento uses on the frontend as a 'dictionary' to translate Javascript strings) is updated when: saving a translation or when the CRON runs to update the missing translations (by default every 24 hours).
However, the script updating the JS-Translation.json file does not 'know' which translations are specifically Javascript and which are 'standard'. So it updates the JS-Translation.json file with every translation of that locale available. This increases the size of the JS-Translation.json from around 10kb (Gzipped, so around 30-40kb on server) to around 300kb (Gzipped, so around 1 megabyte on server). This has a negative influence on the pagespeed of the shop, since the 300kb has to be downloaded and travelled through each time a Javascript files wants to execute.
In this PR is:
Removal of the function to update JS-Translation.json
Removal of the two places (the save & the cron) where the function was used
Added a notice for the merchant to explain that not every string can be translated and seen immediately online
Hi,
Currently, the JS-Translation.json file (which Magento uses on the frontend as a 'dictionary' to translate Javascript strings) is updated when: saving a translation or when the CRON runs to update the missing translations (by default every 24 hours).
However, the script updating the JS-Translation.json file does not 'know' which translations are specifically Javascript and which are 'standard'. So it updates the JS-Translation.json file with every translation of that locale available. This increases the size of the JS-Translation.json from around 10kb (Gzipped, so around 30-40kb on server) to around 300kb (Gzipped, so around 1 megabyte on server). This has a negative influence on the pagespeed of the shop, since the 300kb has to be downloaded and travelled through each time a Javascript files wants to execute.
In this PR is: