Opened 13 years ago
Last modified 12 years ago
#9703 confirmed Bug
Simplify plugin dialog open with language entries — at Initial Version
Reported by: | Garry Yao | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | UI : Dialogs | Version: | 4.0 Beta |
Keywords: | Cc: |
Description
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.