public virtual string GetString(string stringName, string stringValue = null, string langId = null, string viewName = null) { bool found; var ret = TranslationToolOnlineStorage.GetTranslated(this, stringName, stringValue, langId, viewName, out found); if (found) { TranslationToolOnlineStorage.AddTranslated(this, stringName, ret.Item1, ret.Item2, langId); } return(ret.Item1); }
public ActionResult TranslationGridUpdatePartial(string curClassName, string curAccept) { var transes = TranslationToolOnlineStorage.GetTranslated(curClassName); string id = Request.Params["Key"]; var item = transes.First(c => c.Key == id); item.Val = Request.Params["Val"]; if (ModelState.IsValid) { try { if (item.Split == "true" || curAccept != null) { if (curAccept == "split") { item.Split = "true"; } SaveTranslated(item); } else { string[] keys = id.Split('*'); if (WebResourceUsage.Instance.DisplayResourceUsage(keys[0], "", keys[2], keys[3], keys[3]) != ResourceAction.Accept) { var list = WebResourceUsage.Instance.ResourceUsageList(keys[0], keys[2], keys[3]); ViewData["EditError"] = " ";//"This term is used in other forms. Do you want to save the term translation?"; ViewData["EditableProduct"] = item; ViewData["ResourceUsage"] = list; } } } catch (Exception e) { ViewData["EditError"] = e.Message; } } else { ViewData["EditError"] = "Please, correct all errors."; ViewData["EditableProduct"] = item; } return(PartialView("TranslationToolGrid", transes)); }
public ActionResult TranslationGridPartial(string curClassName) { return(PartialView("TranslationToolGrid", TranslationToolOnlineStorage.GetTranslated(curClassName))); }
public ActionResult Translation(string curClassName) { ViewBag.AppClassName = curClassName; return(PartialView("TranslationToolDlg", TranslationToolOnlineStorage.GetTranslated(curClassName))); }