Opened 12 years ago

Last modified 12 years ago

#9703 confirmed Bug

Simplify plugin dialog open with language entries

Reported by: Garry Yao Owned by:
Priority: Normal Milestone:
Component: UI : Dialogs Version: 4.0 Beta
Keywords: Cc:

Description (last modified by Piotrek Koszuliński)

It's now over-killed to open dialog in plugin, which has language files defined, e.g. the a11yhelp plugin:

	var langCode = editor.langCode;
	langCode =
		plugin.availableLangs[ langCode ] ? langCode :
		plugin.availableLangs[ langCode.replace( /-.*/, '' ) ] ? langCode.replace( /-.*/, '' ) :
		'en';

	CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( plugin.path + 'dialogs/lang/' + langCode + '.js' ), function() {
		editor.lang.a11yhelp = plugin.langEntries[ langCode ];
		editor.openDialog( commandName );
	});

It would be as easy as just adding the available language list to the plugin meta, the language file loading should be handled be the dialog plugin instead.

Change History (3)

comment:1 Changed 12 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 4.0.1

comment:2 Changed 12 years ago by Piotrek Koszuliński

Description: modified (diff)

comment:3 Changed 12 years ago by Jakub Ś

Status: newconfirmed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy