How to remove full stops from the end of every source segment using SDLXLIFF Toolkit

Hi everyone,

Does anyone know the regex codes for searching for all the (trailing) full stops at the end of each source segment in Trados and replacing them with nothing (i.e. removing them)?

I've imported an sdlxliff file that was exported from another CAT tool, and for some reason a full stop has been added to every single source segment.

The segments that had no full stops now have one, and the segments that already had one or more full stops at the end now just have one more.

As you'd imagine, I'd prefer not having to manually edit every one of the almost 2000 source segments, if at all possible...



info added
[edited by: Nathanael Fourie at 9:15 AM (GMT 0) on 16 Mar 2023]
emoji
Parents Reply
  •   

    You could take a copy of the sdlxliff and do it in a text editor using regex?  Test the sdlxliff afterwards and if you didn't break it you're good to go.  For example:

    Search for:

    (<source>)([^.<]+)\.+(</source>)

    Replace with:

    $1$2$3

    But be very careful and check it.  I don't have your files and the very simple test I just did with my own file may not match what you have.  So take this approach:

    1. Back up your current sdlxliff file from your target folder by copying it into a new folder somewhere safe.  Then you can easily put it back
    2. run the search and replace on the sdlxliff file in your project in a decent text editor
    3. open the project and test it to make sure of the following at least:
      1. you can still open it,
      2. the changes are correct, 
      3. you can save a target file
      4. etc.

    If anything is broken you easily recover by copying the one you backed up back into the project.  In fact I think I'd even back up the original project just to be sure!!  It's always risky playing with sdlxliff files natively, but it can indeed be a quick way to make changes if you're comfortable with it and understand the risks.

    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

    emoji
Children
No Data