public MemoQXliffAsset(XElement file, ZipArchiveEntry zip_entry) : base(file) { // memoQ bilingual files appear not to support XLIFF segmentation. SegmentationAllowed = false; // Parse skeleton if this file has one and is available. ParseSkeleton(file, zip_entry); // segment status column is made initially visible by popular demand. PropMan.MarkVisible("status"); }
public MemoQXliffAsset(XElement file, ZipArchiveEntry zip_entry) : base(file) { // memoQ bilingual files appear not to support XLIFF segmentation. SegmentationAllowed = false; // Parse skeleton if this file has one and is available. ParseSkeleton(file, zip_entry); // segment status column is made initially visible by popular demand. PropMan.MarkVisible("status"); // "locked" attribute should be visible (if any) for a kind of compatilibity for older versions of disfr. PropMan.MarkVisible("locked"); }
public TradosXliffAsset(XElement file) : base(file) { var comments = file.Parent.Elements(SDL + "doc-info").Descendants(SDL + "cmt-def") .ToDictionary(c => (string)c.Attribute("id"), c => c.Descendants(SDL + "Comment").Select(s => s.Value.TrimEnd()).ToArray()); SdlComments = comments.Count == 0 ? null : comments; var tags = file.Element(X + "header")?.Element(SDL + "tag-defs")?.Elements(SDL + "tag")?.ToArray(); PhTags = tags?.Where(tag => tag.Element(SDL + "ph") != null)?.ToDictionary(tag => (string)tag.Attribute("id"), tag => tag); PtTags = tags?.Where(tag => tag.Element(SDL + "bpt") != null)?.ToDictionary(tag => (string)tag.Attribute("id"), tag => tag); StTags = tags?.Where(tag => tag.Element(SDL + "st") != null)?.ToDictionary(tag => (string)tag.Attribute("id"), tag => tag); Cxts = file.Element(X + "header")?.Element(SDL + "cxt-defs")?.Elements(SDL + "cxt-def")?.ToDictionary(d => (string)d.Attribute("id"), d => (string)d.Attribute("type")); // confirmation status column is made initially visible by popular demand. PropMan.MarkVisible("conf"); }