public ModificationResult Modify(Project.Translation translation) { if (translation is Translation t) { this.Translation = t; project.Save(); project.OnTranslationChanged(new TranslationChangedEventArgs(this, t, TranslationChangedReason.InPlaceModification)); return(ModificationResult.WithSuccess(Translation)); } else { return(ModificationResult.WithUnsupported("attempted to save translation with extra data")); } }
public Context(Project.Translation translation, SimpleProject project) { this.project = project; this.Translation = translation; }