def get_all_messages_from_js_files(app_name=None):
 messages = []
 for app in ([app_name] if app_name else frappe.get_installed_apps()):
  if os.path.exists(frappe.get_app_path(app, u'public')):
   for (basepath, folders, files) in os.walk(frappe.get_app_path(app, u'public')):
    if (u'frappe/public/js/lib' in basepath):
     continue
    for fname in files:
     if (fname.endswith(u'.js') or fname.endswith(u'.html')):
      messages.extend(get_messages_from_file(os.path.join(basepath, fname)))
 return messages

def get_all_messages_from_js_files ( app_name = None ) : messages = [ ] for app in ( [ app_name ] if app_name else frappe . get_installed_apps ( ) ) : if os . path . exists ( frappe . get_app_path ( app , u'public' ) ) : for ( basepath , folders , files ) in os . walk ( frappe . get_app_path ( app , u'public' ) ) : if ( u'frappe/public/js/lib' in basepath ) : continue for fname in files : if ( fname . endswith ( u'.js' ) or fname . endswith ( u'.html' ) ) : messages . extend ( get_messages_from_file ( os . path . join ( basepath , fname ) ) ) return messages
extracts all translatable strings from app .