浏览代码

Using translations wit Paragraph button label.

Szymon Kupś 7 年之前
父节点
当前提交
f1178d9686
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      packages/ckeditor5-paragraph/src/paragraphbuttonui.js

+ 3 - 1
packages/ckeditor5-paragraph/src/paragraphbuttonui.js

@@ -30,11 +30,13 @@ import icon from '../theme/icons/paragraph.svg';
 export default class ParagraphButtonUI extends Plugin {
 	init() {
 		const editor = this.editor;
+		const t = editor.t;
+
 		editor.ui.componentFactory.add( 'paragraph', locale => {
 			const view = new ButtonView( locale );
 			const command = editor.commands.get( 'paragraph' );
 
-			view.label = 'Paragraph';
+			view.label = t( 'Paragraph' );
 			view.icon = icon;
 			view.tooltip = true;
 			view.bind( 'isEnabled' ).to( command );