8
0
Просмотр исходного кода

Using translations wit Paragraph button label.

Szymon Kupś 7 лет назад
Родитель
Сommit
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 );