Explorar el Código

Aligned the code to the latest Locale class API.

Aleksander Nowodzinski hace 6 años
padre
commit
56204c2849

+ 1 - 1
packages/ckeditor5-editor-inline/src/inlineeditoruiview.js

@@ -189,7 +189,7 @@ export default class InlineEditorUIView extends EditorUIView {
 			}
 		];
 
-		if ( this.locale.languageDirection === 'ltr' ) {
+		if ( this.locale.uiLanguageDirection === 'ltr' ) {
 			return positions;
 		} else {
 			return positions.reverse();

+ 6 - 6
packages/ckeditor5-editor-inline/tests/inlineeditoruiview.js

@@ -19,7 +19,7 @@ describe( 'InlineEditorUIView', () => {
 	testUtils.createSinonSandbox();
 
 	beforeEach( () => {
-		locale = new Locale( 'en' );
+		locale = new Locale();
 		editingView = new EditingView();
 		editingViewRoot = createRoot( editingView.document );
 		view = new InlineEditorUIView( locale, editingView );
@@ -115,7 +115,7 @@ describe( 'InlineEditorUIView', () => {
 
 	describe( 'init()', () => {
 		it( 'appends #toolbar to panel#content', () => {
-			locale = new Locale( 'en' );
+			locale = new Locale();
 			const view = new InlineEditorUIView( locale, editingView );
 
 			view.editable.name = editingViewRoot.rootName;
@@ -130,8 +130,8 @@ describe( 'InlineEditorUIView', () => {
 	} );
 
 	describe( 'panelPositions', () => {
-		it( 'returns the positions in the right order (languageDirection="ltr")', () => {
-			locale.languageDirection = 'ltr';
+		it( 'returns the positions in the right order (uiLanguageDirection="ltr")', () => {
+			locale.uiLanguageDirection = 'ltr';
 
 			const uiView = new InlineEditorUIView( locale, editingView );
 			const positions = uiView.panelPositions;
@@ -153,8 +153,8 @@ describe( 'InlineEditorUIView', () => {
 			expect( positions[ 1 ]( editableRect, panelRect ).name ).to.equal( 'toolbar_east' );
 		} );
 
-		it( 'returns the positions in the right order (languageDirection="rtl")', () => {
-			locale.languageDirection = 'rtl';
+		it( 'returns the positions in the right order (uiLanguageDirection="rtl")', () => {
+			locale.uiLanguageDirection = 'rtl';
 
 			const uiView = new InlineEditorUIView( locale, editingView );
 			const positions = uiView.panelPositions;