parameters: (self, request)
return_statement: return cached
docstring: Override the original js catalog function to include additional
          js translation messages based on a yawd-admin setting and cache
          the results per language.
docstring_summary: Override the original js catalog function to include additional
          js translation messages based on a yawd-admin setting and cache
          the results per language.
docstring_tokens: Override the original js catalog function to include additional js translation messages based on a yawd - admin setting and cache the results per language .
function: def i18n_javascript(self, request):
          """
          Override the original js catalog function to include additional
          js translation messages based on a yawd-admin setting and cache
          the results per language.
          """
          cache_key = 'ya-jsi18n-%s' % get_language()
          cache_timeout = getattr(settings, 'ADMIN_JS_CATALOG_CACHE_TIMEOUT', 60 * 60)
          cached = cache.get(cache_key)
  
          if not cached or not cache_timeout:
              if settings.USE_I18N:
                  from django.views.i18n import javascript_catalog
              else:
                  from django.views.i18n import null_javascript_catalog as javascript_catalog
  
              cached = javascript_catalog(request, packages=['django.conf',
                                                       'django.contrib.admin',
                                                       'yawdadmin']
                                    + getattr(settings, 'ADMIN_JS_CATALOG', []))
              cache.set(cache_key, cached, cache_timeout)
  
          return cached
function_tokens: def i18n_javascript ( self , request ) : cache_key = 'ya-jsi18n-%s' % get_language ( ) cache_timeout = getattr ( settings , 'ADMIN_JS_CATALOG_CACHE_TIMEOUT' , 60 * 60 ) cached = cache . get ( cache_key ) if not cached or not cache_timeout : if settings . USE_I18N : from django . views . i18n import javascript_catalog else : from django . views . i18n import null_javascript_catalog as javascript_catalog cached = javascript_catalog ( request , packages = [ 'django.conf' , 'django.contrib.admin' , 'yawdadmin' ] + getattr ( settings , 'ADMIN_JS_CATALOG' , [ ] ) ) cache . set ( cache_key , cached , cache_timeout ) return cached