Don't include JS translation library if files were not generated yet

Created on 29 July 2024, 9 months ago
Updated 12 August 2024, 8 months ago

Problem/Motivation

There may be scenarios in which the JS translation files were not generated yet but variants_locale_js_alter() will attempt to add those files unconditionally. This results in 404s errors on those translation JS files when loading the page.

Steps to reproduce

Delete all the files in the sites/default/files/translations folder.

Proposed resolution

Check if files actually exist before altering the JS in variants_locale_js_alter().

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024