public ActionResult Update(int id, string language, string value) { Translation translation; using (var t = DbSession.BeginTransaction()) { translation = TranslationService.UpdateTranslation(id, language, value); TranslateSetService.UpdateCounters(translation.Key.Set, translation.Language); t.Commit(); } return(TranslationRow(translation)); }
public ActionResult Index() { throw new NotSupportedException(); var set = TranslateSetService.FindByName("Ziber Websites"); var nl = LanguageService.GetLanguageByIsoCode("nl"); var en = LanguageService.GetLanguageByIsoCode("en"); if (set == null) { set = new TranslateSet { Name = "Ziber Websites", NeedsReviewing = 0, NeedsTranslations = 0, Reviewed = 0 }; TranslateSetService.AddTranslateSet(set); } var category = set.FindOrCreateCategory("Shop"); set.TranslateKeys.Clear(); DbSession.Update(set); if (nl == null) { nl = new Language() { IsoCode = "nl", Name = "Nederlands", IsEnabled = true }; DbSession.Save(nl); } if (en == null) { en = new Language() { IsoCode = "en", Name = "Engels", IsEnabled = true }; DbSession.Save(en); } Import(@"F:\dev\DL\producten\Domain.Resources\KZN\ProductShopTextDefaults.resx", set, category, nl); Import(@"F:\dev\DL\producten\Domain.Resources\KZN\ProductShopTextDefaults.en-US.resx", set, category, en); return(View()); }