Problem/Motivation

When the "Show blocks" button is attached to a CKEditor, the label shown when hovering over the button is always "Show blocks" and is not translated into the user's language.

Steps to reproduce

Assuming a standard Drupal installation, with a (interface) language that is not English and having this CKEditor 5 enabled:

  1. Edit a text format that uses the CKEditor, e.g., /admin/config/content/formats/manage/basic_html.
  2. Add the "Show blocks" button to the active toolbar and save the configuration form.
  3. Create a node that has a text field with support for the CKEditor, e.g., /node/add/page.
  4. Hover over the button to show the block elements and notice that regarding the language of the user interface, "Show blocks" is shown.

Proposed resolution

In core.libraries.yml, the ckeditor5.showBlocks definition seems to miss a dependency to core/ckeditor5.translations.

Remaining tasks

  • Implement the proposed solution and create a merge request.
  • Review merge request.

User interface changes

When a translation of "Show blocks" is available in Drupal in the user's language, the label shown when hovering over the "Show blocks"-button is displayed in the user's language.

Introduced terminology

N.a.

API changes

N.a.

Data model changes

N.a.

Release notes snippet

N.a.

Issue fork drupal-3472458

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

watergate created an issue. See original summary.

watergate’s picture

Assigned: watergate » Unassigned
Issue summary: View changes
Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative
StatusFileSize
new12.32 KB

translations

Manually testing confirmed the issue and that the MR fixed the issue.

Change seems small enough to not need test coverage.

nod_’s picture

Status: Reviewed & tested by the community » Needs review

Can someone check ckeditor5.pasteFromOffice and see if there is an issue with translations there too?

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Don't believe we have a pasteFromOffice button?

  • nod_ committed df1b1692 on 10.3.x
    Issue #3472458 by watergate, smustgrave: CKEditor 5 show blocks label is...

  • nod_ committed 7b7be2a3 on 10.4.x
    Issue #3472458 by watergate, smustgrave: CKEditor 5 show blocks label is...

  • nod_ committed ece59402 on 11.0.x
    Issue #3472458 by watergate, smustgrave: CKEditor 5 show blocks label is...

  • nod_ committed cf44cc8a on 11.x
    Issue #3472458 by watergate, smustgrave: CKEditor 5 show blocks label is...
nod_’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed cf44cc8aa40 to 11.x and ece5940229a to 11.0.x and 7b7be2a3f6c to 10.4.x and df1b1692d10 to 10.3.x. Thanks!

watergate’s picture

Thanks for the quick follow-up.

Status: Fixed » Closed (fixed)

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