Ver código fonte

Changed default heading dropdown label. Added it to translation contexts.

Szymon Kupś 8 anos atrás
pai
commit
1a4e1e159c

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

@@ -1,6 +1,7 @@
 {
 	"Paragraph": "Drop-down option label for the paragraph format.",
-	"Heading": "Tooltip and default label for the heading drop-down.",
+	"Heading": "Tooltip for the heading drop-down.",
+	"Choose heading": "Default label for heading drop-down.",
 	"Heading 1": "Drop-down option label for the heading level 1 format.",
 	"Heading 2": "Drop-down option label for the heading level 2 format.",
 	"Heading 3": "Drop-down option label for the heading level 3 format."

+ 1 - 1
packages/ckeditor5-heading/src/heading.js

@@ -39,7 +39,7 @@ export default class Heading extends Plugin {
 		const options = this._getLocalizedOptions();
 		const commands = [];
 		const t = editor.t;
-		const defaultTitle = t( 'Chose heading' );
+		const defaultTitle = t( 'Choose heading' );
 		const dropdownTooltip = t( 'Heading' );
 
 		for ( let option of options ) {

+ 3 - 3
packages/ckeditor5-heading/tests/heading.js

@@ -13,7 +13,7 @@ import { add } from '@ckeditor/ckeditor5-utils/src/translation-service';
 import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
 
 add( 'pl', {
-	'Chose heading': 'Wybierz nagłówek',
+	'Choose heading': 'Wybierz nagłówek',
 	'Paragraph': 'Akapit',
 	'Heading': 'Nagłówek',
 	'Heading 1': 'Nagłówek 1',
@@ -58,7 +58,7 @@ describe( 'Heading', () => {
 			expect( dropdown ).to.be.instanceOf( DropdownView );
 			expect( dropdown.buttonView.isEnabled ).to.be.true;
 			expect( dropdown.buttonView.isOn ).to.be.undefined;
-			expect( dropdown.buttonView.label ).to.equal( 'Chose heading' );
+			expect( dropdown.buttonView.label ).to.equal( 'Choose heading' );
 			expect( dropdown.buttonView.tooltip ).to.equal( 'Heading' );
 		} );
 
@@ -110,7 +110,7 @@ describe( 'Heading', () => {
 					commands[ name ].value = false;
 				}
 
-				expect( dropdown.buttonView.label ).to.equal( 'Chose heading' );
+				expect( dropdown.buttonView.label ).to.equal( 'Choose heading' );
 
 				commands.heading2.value = true;
 				expect( dropdown.buttonView.label ).to.equal( 'Heading 2' );