tmp=function(){var a=Core.lang.getLocalizer("Dictionary");var c=Core.text.endsWith;var b="disabled";var d={name:"DictionaryCL",title:a("TITLE"),icon:"ABC",activate:function(){var h=d.options.dictionary;if(h===b){Core.ui.showMsg([a("WARN_DICT_DISABLED")]);}else{var g=Core.config.userDictionaryPath+h;if(FileSystem.getFileInfo(g)){var f=Core.config.addonsPath+"DictionaryCL/";kbook.autoRunRoot.sandbox.dictionaryParams=params;kbook.autoRunRoot.sandbox.exec=Core.shell.exec;kbook.autoRunRoot.sandbox.getFileContent=Core.io.getFileContent;kbook.autoRunRoot.sandbox.getSoValue=Core.system.getSoValue;kbook.autoRunRoot.sandbox.setSoValue=Core.system.setSoValue;kbook.autoRunRoot.sandbox.maxSmartZoom=d.options.maxSmartZoom;kbook.autoRunRoot.sandbox.resultSize=d.options.resultSize;kbook.autoRunRoot.sandbox.dictPath=g;kbook.autoRunRoot.path=f+"dictionary.xml";kbook.autoRunRoot.enterIf(kbook.model);}else{Core.ui.showMsg([a("WARN_DICT_DOESNT_EXIST")]);}}},actions:[{name:"launchDictionary",title:a("ACTION_DICTIONARY"),group:"Utils",icon:"ABC",action:function(){d.activate();}}],optionDefs:[{name:"dictionary",title:a("OPTION_DICTIONARY"),icon:"ABC",defaultValue:b,values:[b],valueTitles:{disabled:a("VALUE_DISABLED")}},{name:"resultSize",title:"Results size",icon:"ABC",defaultValue:25,values:[15,20,25,30,35],valueTitles:{15:"15",20:"20",25:"25",30:"30",35:"35"}},{name:"maxSmartZoom",title:"Max smart zoom",icon:"ABC",defaultValue:20,values:[0,10,20,25,40,50],valueTitles:{0:"Disabled",10:"10 %",20:"20 %",25:"25 %",40:"40 %",50:"50 %"}}],onPreInit:function(){this.root=Core.config.userDictionaryPath;if(!FileSystem.getFileInfo(this.root)){return;}var g=new FileSystem.Iterator(this.root);try{var h,i;var f=this.optionDefs[0];while(h=g.getNext()){if(h.type=="file"){i=h.path;if(c(i,".dic")){f.values.push(i);f.valueTitles[i]=i;}}}}finally{g.close();}}};Core.addAddon(d);};try{tmp();}catch(e){log.error("in Dictionary by Clementseken & Lisak",e);}