@register.simple_tag(takes_context=True)
def locale_js_include(context):
 request = context['request']
 try:
  lang_code = request.LANGUAGE_CODE
 except AttributeError:
  return ''
 if ((lang_code == 'en') or (lang_code not in settings.SUPPORTED_LANGUAGES)):
  return ''
 href = get_asset_url('sentry', (('dist/locale/' + lang_code) + '.js'))
 return '<script src="{0}"{1}></script>'.format(href, crossorigin())

@ register . simple_tag ( takes_context = True ) def locale_js_include ( context ) : request = context [ 'request' ] try : lang_code = request . LANGUAGE_CODE except AttributeError : return '' if ( ( lang_code == 'en' ) or ( lang_code not in settings . SUPPORTED_LANGUAGES ) ) : return '' href = get_asset_url ( 'sentry' , ( ( 'dist/locale/' + lang_code ) + '.js' ) ) return '<script src="{0}"{1}></script>' . format ( href , crossorigin ( ) )
if the user has a non-english locale set .