         log.info("Failed to fetch lexical model list for "+languageID+". error: "+(error as! String))
         self.downloadFailed(forLanguageID: languageID, error: error) //???forKeyboards
       } else if nil == lexicalModels {
+        //TODO: put up an alert instead
         log.info("No lexical models available for language \(languageID) (nil)")
       } else if 0 == lexicalModels?.count {
         log.info("No lexical models available for language \(languageID) (empty)")


// Possible states that a keyboard can be in
public enum KeyboardState {
  case needsDownload
  case needsUpdate
  case upToDate
  case downloading
  case none
}

// Possible states that a lexical model can be in
public enum LexicalModelState {
  case needsDownload
  case needsUpdate
  case upToDate

  }
  
  /// - Returns: The current state for a lexical model
  public func stateForLexicalModel(withID lexicalModelID: String) -> KeyboardState {
    if lexicalModelIdForCurrentRequest() == lexicalModelID {
      return .downloading
    }
