Hi fellow developers,
I am trying to access revisions in the editor. I wonder if that is actually possible. I have come across various methods to create revisions / comments but none to read them.
Here's what I tried:
var editor = SdlTradosStudio.Application.GetController<EditorController>();
var document = editor.ActiveDocument;
foreach (ISegmentPair seg in document.SegmentPairs)
{
if (seg.Properties.ConfirmationLevel == ConfirmationLevel.RejectedTranslation) //revised segment
{
MessageBox.Show("Hallelujah!");
document.SetActiveSegmentPair(seg.GetProjectFile(), seg.Properties.Id.Id);
var target = seg.Target;
foreach (IAbstractMarkupData item in target.AllSubItems)
{
//seems there is no IRevisionMarker in here... :-?
}
}
}
The "Halleluah!" is shown and the editor jumps to the first segment containing revisions so that is fine. Alas, I cannot seem to actually read these revisions.
Can anybody help me out?
P.S: If instead of using the editor I need to parse the .sdlxliff, so be it. I just preferred I could do this in the editor.
Thanks & best,
Andreas
Translate