def getCommonTemplateValues(self, urlLocale, prefix=None, word=None): userLocale = getLocale(urlLocale, self.request.headers.get('accept_language')) i18n.setLocale(userLocale) template_values = { 'htmlTitle': getHtmlTitle(userLocale, self.__class__.__name__, i18n, prefix, word), 'userLocale': userLocale, 'langQs': json.dumps(parseAcceptLanguage(self.request.headers.get('accept_language'))), 'urlLocale': urlLocale, 'isTrack': isTrack(self.request.GET.get('track')), 'isDevServer': isDevServer(), } return template_values
def commonTemplateValues(urlLocale, reqHandlerName, prefix=None, word=None): userLocale = getLocale(urlLocale, web.ctx.env.get('HTTP_ACCEPT_LANGUAGE')) i18n.setLocale(userLocale) template_values = { # 'serverEnv': 'ec2', # 'tpkWebAppUrl': 'http://tipitaka.sutta.org/', 'serverEnv': 'appspot', # 'tpkWebAppUrl': 'http://epalitipitaka.appspot.com/', 'tpkWebAppUrl': 'http://tipitaka.online-dhamma.net/', 'htmlTitle': getHtmlTitle(userLocale, reqHandlerName, i18n, prefix, word), 'userLocale': userLocale, 'langQs': json.dumps(parseAcceptLanguage(web.ctx.env.get('HTTP_ACCEPT_LANGUAGE'))), 'urlLocale': urlLocale, 'isTrack': isTrack(web.input(track=None).track), 'isDevServer': isDevServer(), } return template_values
def getCommonTemplateValues(self, urlLocale, prefix=None, word=None): userLocale = getLocale(urlLocale, self.request.headers.get('accept_language')) i18n.setLocale(userLocale) template_values = { 'htmlTitle': getHtmlTitle(userLocale, self.__class__.__name__, i18n, prefix, word), 'userLocale': userLocale, 'langQs': json.dumps( parseAcceptLanguage(self.request.headers.get('accept_language'))), 'urlLocale': urlLocale, 'isTrack': isTrack(self.request.GET.get('track')), 'isDevServer': isDevServer(), } return template_values
def commonTemplateValues(urlLocale, reqHandlerName, prefix=None, word=None): userLocale = getLocale(urlLocale, web.ctx.env.get('HTTP_ACCEPT_LANGUAGE')) i18n.setLocale(userLocale) template_values = { # 'serverEnv': 'ec2', # 'tpkWebAppUrl': 'http://tipitaka.sutta.org/', 'serverEnv': 'appspot', 'tpkWebAppUrl': 'http://epalitipitaka.appspot.com/', 'dicWebAppUrl': 'http://palidictionary.appspot.com/', # 'tpkWebAppUrl': 'http://tipitaka.online-dhamma.net/', # 'dicWebAppUrl': 'http://dictionary.online-dhamma.net/', 'htmlTitle': getHtmlTitle(userLocale, reqHandlerName, i18n, prefix, word), 'userLocale': userLocale, 'locales': json.dumps(i18n.locales), 'localeLanguageMapping': json.dumps(i18n.localeLanguageMapping), 'langQs': json.dumps(parseAcceptLanguage(web.ctx.env.get('HTTP_ACCEPT_LANGUAGE'))), 'urlLocale': urlLocale, 'isTrack': isTrack(web.input(track=None).track), 'isDevServer': isDevServer(), } return template_values