Parcourir la source

Fix: Made `Edit block` string translatable.

Maciej Bukowski il y a 7 ans
Parent
commit
8a17f42e7b

+ 2 - 1
packages/ckeditor5-ui/lang/contexts.json

@@ -1,4 +1,5 @@
 {
 	"Rich Text Editor, %0": "Title of the CKEditor5 editor.",
-	"Rich Text Editor": "Title of the CKEditor5 editor."
+	"Rich Text Editor": "Title of the CKEditor5 editor.",
+	"Edit block": "Label of the block toolbar icon (a block toolbar is displayed next to each paragraph, heading, list item, etc. and contains e.g. block formatting options)"
 }

+ 2 - 1
packages/ckeditor5-ui/src/toolbar/block/blocktoolbar.js

@@ -208,10 +208,11 @@ export default class BlockToolbar extends Plugin {
 	 */
 	_createButtonView() {
 		const editor = this.editor;
+		const t = editor.t;
 		const buttonView = new BlockButtonView( editor.locale );
 
 		buttonView.set( {
-			label: editor.t( 'Edit block' ),
+			label: t( 'Edit block' ),
 			icon: iconPilcrow,
 			withText: false
 		} );