def _get_js_translation_entries(filename):
 js_entries = set()
 for entry in polib.pofile(filename):
  if entry.obsolete:
   continue
  for occ in entry.occurrences:
   if occ[0].endswith(u'.js'):
    js_entries.add(entry.msgid)
 return js_entries

def _get_js_translation_entries ( filename ) : js_entries = set ( ) for entry in polib . pofile ( filename ) : if entry . obsolete : continue for occ in entry . occurrences : if occ [ 0 ] . endswith ( u'.js' ) : js_entries . add ( entry . msgid ) return js_entries
extract ids of po entries that are used in javascript files .