def jet_static_translation_urls(): language_codes = get_possible_language_codes() urls = [] url_templates = [ 'jet/js/i18n/jquery-ui/datepicker-__LANGUAGE_CODE__.js', 'jet/js/i18n/jquery-ui-timepicker/jquery.ui.timepicker-__LANGUAGE_CODE__.js', 'jet/js/i18n/select2/__LANGUAGE_CODE__.js' ] static_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'static') for tpl in url_templates: for language_code in language_codes: url = tpl.replace('__LANGUAGE_CODE__', language_code) path = os.path.join(static_dir, url) if os.path.exists(path): urls.append(url) break return urls
def jet_static_translation_urls(): language_codes = get_possible_language_codes() urls = [] url_templates = [ 'jet/js/i18n/jquery-ui/datepicker-__LANGUAGE_CODE__.js', 'jet/js/i18n/jquery-ui-timepicker/jquery.ui.timepicker-__LANGUAGE_CODE__.js', 'jet/js/i18n/select2/__LANGUAGE_CODE__.js' ] static_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'static') for tpl in url_templates: for language_code in language_codes: url = tpl.replace('__LANGUAGE_CODE__', language_code) path = os.path.join(static_dir, url) if os.path.exists(path): urls.append(url) break return urls