Closed (fixed)
Project:
Drupal core
Version:
9.3.x-dev
Component:
ckeditor5.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Aug 2021 at 14:59 UTC
Updated:
28 Jan 2022 at 18:29 UTC
Jump to comment: Most recent
Comments
Comment #2
wim leersComment #3
wim leersDevil's advocate: should we really do this?
The strongest reason to do this is to make it simpler to provide translations for the strings in the Drupal-specific CKEditor 5 plugins that are in
core/modules/ckeditor5/js.Comment #5
nod_Comment #6
nod_All right so at least, Using
Drupal.tinside plugin code works. It is kept as-is after the build step and Drupal correctly picks up the string in the minified file (with and without a context defined).So for me I don't think we have anything more to do than make use of Drupal.t inside plugins and adding the dependency to
core/drupalin the drupal library that defines the ckeditor5 plugin assets.Comment #8
wim leersThat sounds good!
The changes in the merge request look great — zero remarks 🤓
The only thing that remains here: test coverage, similar to CKE4's
\Drupal\Tests\ckeditor\Kernel\CKEditorTest::testJSTranslation().Comment #9
nod_Comment #10
wim leersComment #11
nod_Thanks for the text suggestions, always having trouble with that :)
Comment #12
wim leersYeah I wish that were just part of
phpcs… some day!No more remarks here.
Comment #13
lauriiiWe need a Drupal 10 version of the MR too 😇
Comment #15
nod_10.x MR opened
Comment #16
wim leersThe two MRs are making identical functional changes, the only differences are in the compiled JS.
Comment #21
lauriiiCommitted cf6f4be and pushed to 10.0.x. Also committed the 9.x patch to 9.4.x and cherry-picked to 9.3.x because this only impacts CKEditor 5 which is experimental, and this makes some strings translatable that previously weren't which is nice improvement. Thanks!