public ActionResult Translate(string text) { ViewBag.text = text; try { Translator t = new Translator(); t.translate(text); ViewBag.steps = t.steps; ViewBag.tree = t.toJson(); } catch (Exception e) { Console.WriteLine(e); ViewBag.steps = null; ViewBag.tree = null; ViewBag.error = "Błąd składni"; } return View("Index"); }