Problems with merging segments

If I merge two segments and then try to merge the resulting segment with the next segment (i.e. the segment following the original two segments that were merged), I find that the merge option is unavailable (greyed out).

For example, here is a simple test file before the merge:

Here is the same file with segments 13 and 14 merged:

Now when I try to merge segments 13 and 15, the merge option is unavailable:

If I use Ctrl-Z to undo the merge (for some reason I have to use Ctrl-Z twice), the editor view jumps to segment 1, so that I lose my place in the file.

After I move back to segment 13, you can see that segment 14 is not shown in the editor:

If I try to merge segments 13 and 15, the merge option is still unavailable (greyed out):

If I save the file and re-open it, segment 14 is now shown in the editor:

If I now try to merge segments 13 to 15, the merge option is available:

Another problem that does not show up in this file: When I merge two segments, the resulting target segment is often no longer shown in the editor window. This typically happens when I merge two segments in a large file. Trying to find the merged segment again is difficult unless you happen to have noted the segment numbers.

A quick way to re-display the merged segment without searching for it is by typing Ctrl-A (this typically shows the last line of the merged segment at the top of the editor window), followed by the Left arrow key (to show all of the merged segment in the editor window).

I have attached the simple test file I used. The Default project template was used to create the sdlxliff file. I am using fully up-to-date Studio 2017.

5047.test.docx

Best regards,
Bruce Campbell
ASAP Language Services

  • Here is an example of the merged segment not being shown in the editor window.

    Here is the file before segments 807 and 808 are merged:

    Here is what the editor window looks like after segments 807 and 808 are merged:

    In this case, the merged segment is just before the first segment shown in the editor window. It is often farther away. The target side of the editor window can also show completely different segments than the source side after a merge. I.e. the source and target sides may no longer be in sync after a merge.

    Generally, Ctrl-A followed by the Left arrow key will re-display the merged segment.

    Best regards,
    Bruce Campbell
    ASAP Language Services

  • Hi Bruce,

    I'm wondering if you would like a job in our QA team!

    I tested this same file, edited to use soft breaks instead so it doesn't move across paragraph boundaries, and this behaves as expected... allows merging them all and Ctrl+Z sets everything back so you can see all the segments again.  But when you cross hard breaks as your file then I have the same behaviour.

    Clearly related to handling paragraph boundaries.  So if you display the empty merged segments (Editor -> Automation) then you actually see this:

    So you can start to get a feel for why this is tricky as the merging across breaks is really a trick that just automates copying the text from segment 14 and placing it into 13, then hiding segment 14.

    I think the problem is that second merge should not be allowed at all.  In fact if you display the empty segment like this then you cannot merge it again even with your workarounds, and Ctrl+Z does in fact work.

    I have reported this as development can take a look.  Thanks for reporting it in here.

    Regards

    Paul

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • Thank you Paul,

    I had forgotten where the "Hide empty segments that have been merged" checkbox was! Thank you for pointing me to it.

    The default is for the empty segment to be locked, which I guess makes sense, as you would not want anything accidentally entered into the target segment. (Is it too risky to show these empty segments when you filter on "All content"?)

    Manually unlocking the empty segment makes it possible to merge segments 13 and 15. (You can't merge across a locked segment.)

    And if the "Hide empty segments ..." checkbox is *not* checked, the all of the original segments are visible in the editor window when the merge is undone.

    It looks like Studio simply forgets to unhide the segment when a merge is undone.

    When segments 13 and 14 are merged, then segment 14 becomes the hidden empty segment. When the merge is undone, the content is moved back to segment 14 -- but Studio forgets to unhide it. Saving and re-opening the file automatically unhides the segment.

    Instead of saving and re-opening the file, you can also unhide segment 14 by opening the editor options, unchecking the "Hide empty segments ..." checkbox, closing the editor options, re-opening editor options, and then checking the "Hide empty segments ..." checkbox again.

    Best regards,
    Bruce Campbell
    ASAP Language Services