Locale JavaScript translation doesn't take into account AJAX

Created on 21 May 2025, 13 days ago

Problem/Motivation

#2419897: Javascript translations are loaded in the wrong order due to missing dependencies changed locale module from always adding translations to only adding them when a placeholder file from a library is present.

On AJAX requests, the placeholder library has already been loaded by the main page, and therefore the logic doesn't kick in, meaning translations won't be parsed for any js files added by the AJAX request.

Since that issue landed, ckeditor5 copied the same technique, and has the same problem. 🐛 CKEditor 5 loads all plugin translations on AJAX operations Active is open for ckeditor5, but I could find an issue for locale anywhere.

Steps to reproduce

Proposed resolution

Either replace the placeholder logic entirely, or add a code path that handles AJAX requests.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

locale.module

Created by

🇬🇧United Kingdom catch

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

Comments & Activities

Production build 0.71.5 2024