Development WordPress

🐛 WordPress 5.5: how to fix the translation issue on JS generated strings

In WordPress 5.5 there is a small bug on localized instances of WP. By localized, I mean translated WordPress installations.

Indeed, a change in the scripts loading process led to a timing issue between the loading of the translations and the loading of those scripts.

Here is a video screenshot of the issue, in a French WordPress installation. We can see that the dynamically generated translation strings are not loaded so they stay in English:

This is a known issue and it will be fixed in WordPress 5.5.1, planned on September 2020.

If you want to hotfix the issue now, you can download the following file:

Once the file is unzipped, just upload the class.wp-scripts.php provided file in the wp-includes folder of your WordPress installation. It will replace the existing file and fix the translation issue.

The issue will be ultimately fixed when WordPress 5.5.1 will be released. If you applied this hotfix, it will be automatically replaced with the new version, so you’ll just have to update WordPress as you usually do.

Here is a video screenshot of the hotfix results on a French WordPress installation:

Was it useful? Feel free to buy me a beer 😃🍺 or to leave a kind comment on this post! 🥰

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.