Strings in CKEditor plugin/dialog are not translated

Created on 11 July 2018, over 6 years ago
Updated 2 March 2023, over 1 year ago

Drupal locale collects strings that are translatable in javascript files that are added by either #attached or drupal_add_js. These strings are stored in Drupal.locale.strings and will be used to translate strings by Drupal.t();

However, CKEditor plugins are not loaded by Drupal, but are loaded externally by CKEditor instead. This means any strings going through Drupal.t() won't be translated as they were never detected by Drupal in the first place .

There is an 8.x issue similar to this posted here: https://www.drupal.org/project/drupal/issues/2035721

Steps to reproduce
- Translate any of the defined default strings used by the dialog in the translation interface. (For example the default blocked message).
- Optionally clear caches
- Open de dialog within an editor
- Expected result : The default blocked message shows the translated string.

Proposed solution:
Either:
- Define the strings somewhere where Drupal does detect them (f.e. a seperate JS defining the strings.) and use those within the plugin.
- Propose another solution, which most likely will need to be solved outside of this module.

🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇳🇱Netherlands steven buteneers

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