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:
- Edit a text format that uses the CKEditor, e.g.,
/admin/config/content/formats/manage/basic_html. - Add the "Show blocks" button to the active toolbar and save the configuration form.
- Create a node that has a text field with support for the CKEditor, e.g.,
/node/add/page. - 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.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | Screenshot 2024-09-10 at 12.07.51 PM.png | 12.32 KB | smustgrave |
Issue fork drupal-3472458
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:
- 3472458-ckeditor-5-show
changes, plain diff MR !9432
Comments
Comment #3
watergate commentedComment #4
smustgrave commentedManually testing confirmed the issue and that the MR fixed the issue.
Change seems small enough to not need test coverage.
Comment #5
nod_Can someone check
ckeditor5.pasteFromOfficeand see if there is an issue with translations there too?Comment #6
smustgrave commentedDon't believe we have a pasteFromOffice button?
Comment #12
nod_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!
Comment #13
watergate commentedThanks for the quick follow-up.