Ver código fonte

Code refactoring.

Aleksander Nowodzinski 9 anos atrás
pai
commit
b2f5fa5e12
1 arquivos alterados com 5 adições e 5 exclusões
  1. 5 5
      packages/ckeditor5-heading/src/headingengine.js

+ 5 - 5
packages/ckeditor5-heading/src/headingengine.js

@@ -33,9 +33,9 @@ export default class HeadingEngine extends Plugin {
 		 *
 		 *
 		 * @readonly
 		 * @readonly
 		 * @protected
 		 * @protected
-		 * @member {Object} #_formatLabels
+		 * @member {Object} #_localizedFormatLabels
 		 */
 		 */
-		const labels = this._formatLabels = {
+		const labels = this._localizedFormatLabels = {
 			'Paragraph': t( 'Paragraph' ),
 			'Paragraph': t( 'Paragraph' ),
 			'Heading 1': t( 'Heading 1' ),
 			'Heading 1': t( 'Heading 1' ),
 			'Heading 2': t( 'Heading 2' ),
 			'Heading 2': t( 'Heading 2' ),
@@ -130,13 +130,13 @@ export default class HeadingEngine extends Plugin {
 
 
 		return editor.config.get( 'heading.formats' )
 		return editor.config.get( 'heading.formats' )
 			.map( format => {
 			.map( format => {
-				// Translate `label`s in the config to with current locale using `#_formatLabels` because
+				// Translate `label`s in the config to with current locale using `#_localizedFormatLabels` because
 				// there's no way to use t() when the config is defined i.e. when the editor does not
 				// there's no way to use t() when the config is defined i.e. when the editor does not
 				// exist yet.
 				// exist yet.
-				if ( this._formatLabels[ format.label ] ) {
+				if ( this._localizedFormatLabels[ format.label ] ) {
 					// Clone the format to avoid altering the original `config.heading.formats`.
 					// Clone the format to avoid altering the original `config.heading.formats`.
 					format = Object.assign( {}, format, {
 					format = Object.assign( {}, format, {
-						label: this._formatLabels[ format.label ]
+						label: this._localizedFormatLabels[ format.label ]
 					} );
 					} );
 				}
 				}