def index(self, **kwargs): """ Show the language selection page """ if cfg.configlock() or not sabnzbd.interface.check_access(): return sabnzbd.interface.Protected() if not sabnzbd.interface.check_login(): raise sabnzbd.interface.NeedLogin() info = self.info.copy() lng = None if sabnzbd.WIN32: import util.apireg lng = util.apireg.get_install_lng() logging.debug('Installer language code "%s"', lng) info['lang'] = lng or cfg.language() info['active_lang'] = info['lang'] info['languages'] = list_languages() info['T'] = Ttemplate set_language(info['lang']) sabnzbd.api.clear_trans_cache() if not os.path.exists(self.__web_dir): # If the wizard folder does not exist, simply load the normal page raise cherrypy.HTTPRedirect('') else: template = Template(file=os.path.join(self.__web_dir, 'index.html'), searchList=[info], compilerSettings=sabnzbd.interface.DIRECTIVES) return template.respond()
def index(self, **kwargs): """ Show the language selection page """ info = self.info.copy() info['num'] = '' info['number'] = 0 info['lang'] = cfg.language() info['languages'] = list_languages() info['T'] = Ttemplate if not os.path.exists(self.__web_dir): # If the wizard folder does not exist, simply load the normal page raise cherrypy.HTTPRedirect('') else: template = Template(file=os.path.join(self.__web_dir, 'index.html'), searchList=[info], compilerSettings=sabnzbd.interface.DIRECTIVES) return template.respond()
def index(self, **kwargs): """ Show the language selection page """ info = self.info.copy() lng = None if sabnzbd.WIN32: import util.apireg lng = util.apireg.get_install_lng() logging.debug('Installer language code "%s"', lng) info['lang'] = lng or cfg.language() info['active_lang'] = info['lang'] info['languages'] = list_languages() info['T'] = Ttemplate set_language(info['lang']) sabnzbd.api.clear_trans_cache() if not os.path.exists(self.__web_dir): # If the wizard folder does not exist, simply load the normal page raise cherrypy.HTTPRedirect('') else: template = Template(file=os.path.join(self.__web_dir, 'index.html'), searchList=[info], compilerSettings=sabnzbd.interface.DIRECTIVES) return template.respond()