From a8423666a68d1dd7d5cc37ad459a4d9e2230ecb1 Mon Sep 17 00:00:00 2001 From: Maciej Bukowski Date: Fri, 5 Oct 2018 13:11:31 +0200 Subject: [PATCH] Fix: Made `Edit block` string translatable. --- lang/contexts.json | 3 ++- src/toolbar/block/blocktoolbar.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lang/contexts.json b/lang/contexts.json index a808ba47..48febc63 100644 --- a/lang/contexts.json +++ b/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)" } diff --git a/src/toolbar/block/blocktoolbar.js b/src/toolbar/block/blocktoolbar.js index 91c1127b..e83fc334 100644 --- a/src/toolbar/block/blocktoolbar.js +++ b/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 } );