Problem/Motivation

The label of the "Abbreviation" button is not translated anymore.

Steps to reproduce

1. Configure the button to show in a text format for CKEditor 5
2. Switch to a different language, e.g. German.
3. Open a form showing the CKEditor with that text format
4. Hover over the "Abbreviation" button. The tooltip only says "Abbrevation", with no way to translate it.

Proposed resolution

The CKEditor 4 plugin hat a file "de.js" which translated this button. The new ckeditor5 plugin should use Drupal.t() in `abbreviationui.js` (line 26).

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Ammaletu created an issue. See original summary.

ammaletu’s picture

Once this is fixed, it would be nice to tag a new release. We just migrated from CKEditor 4 to version 5, and this makes this button harder to use for German users.

aaron.ferris made their first commit to this issue’s fork.

aaron.ferris’s picture

Ive had a go at this, the diff for the build is a bit odd though, am I doing something wrong?

1. npm install
2. npm run build

?

aaron.ferris’s picture

Status: Active » Needs review
aaron.ferris’s picture

StatusFileSize
new61.61 KB
new53.22 KB
mparker17’s picture

I think @boromino is more knowledgeable than myself about whether this is the correct solution (and whether the JS got built correctly).


The code looks like Drupal Core's MissingAlternativeTextView custom CKEditor plugin, and I know from experience that Drupal.t() is the correct way to use Drupal's translation system in Drupal-JavaScript, so it seems good to me.

  • boromino committed bce4a856 on 4.0.x
    Issue #3439422 by aaron.ferris, Ammaletu, mparker17: CKEditor 5: Toolbar...
boromino’s picture

Status: Needs review » Fixed

Thanks for the patch. Fixed and created new release.

aaron.ferris’s picture

Thanks! Out of interest, is there something I was doing wrong for the build?

Secondly, sorry to be a pain, would appreciate a contrib credit if you get chance please. Thanks!

mparker17’s picture

You were credited in the commit message; but I've credited you in the issue node as well! Thanks very much!

aaron.ferris’s picture

Thanks @mparker17 :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.