浏览代码

Fix: Made `Edit block` string translatable.

Maciej Bukowski 7 年之前
父节点
当前提交
8a17f42e7b
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 2 1
      packages/ckeditor5-ui/lang/contexts.json
  2. 2 1
      packages/ckeditor5-ui/src/toolbar/block/blocktoolbar.js

+ 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
 		} );