Config translation embedded for all languages (performance issue)

Created on 16 April 2021, over 3 years ago
Updated 22 May 2023, over 1 year ago

Problem/Motivation

The module configuration is quite verbose, containing interface texts that are passed to the necessary script. Once these have been translated into multiple languages, it results in a heavy Drupal.settings object that has to be embedded on every page.

For example, with 7 languages, we're seeing the Drupal settings object of 60KB.

Steps to reproduce

- Install the module.
- Enable several languages on the site.
- Add some example cookie categories with some typical category descriptions.
- Translate the Cookie configuration ("Cookie Control Alternative Languages" tab).
- View the source code for any page.
- Notice how the embedded Drupal.settings object contains the full config for all languages.

Proposed resolution

Only the settings for the current language should be added to the page.

Remaining tasks

- Identify and implement a method to embed only the settings for a particular language.
- Confirm that the associated Drupal.settings object has been reduced.

πŸ“Œ Task
Status

Fixed

Component

Code

Created by

πŸ‡ΏπŸ‡¦South Africa Gomez_in_the_South

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024