Edit source in Trados Studio as batch task, find and replace, idml file

Hello,

I need to delete line breaks in all source segments. I can't edit the source file separately (idml file and not possible to use InDesign), so I wonder if there's an efficient way to do this in the studio editor. Unfortunately, find+replace is not possible in the source (in the target only) and search with regex (e.g. \r  or \n) is not possible. Do you know a parameter or plugin which helps editing the source as batch task?

Thanks for your piece of advice

Aurélie

emoji
Parents Reply Children
  •  

    You’ll be able to replace these ↵ returns, not the regular returns, because the XLIFF is segmented (the following is a mockup done in Word, but the concept is the same):

    Table comparing two columns with text. Left column titled 'You can't do anything here' with words 'Here', 'Are', 'My', 'Files' each in a new row. Right column titled 'You may do something here' with the same words in a single line.

    If you have issues of the kind of the first column (you see each line in a separate segment in Editor, but you’d like to have one single segment with the text Here are My Files), you’ll need to remove returns in InDesign, because there is nothing you can do in Trados Studio. I’ve been there and I guess this is your real issue, right?

    On the other hand, if your issue is related to the second column (you see the sentence consisting of 4 lines in one single segment in Editor), I've tried the app Paul mentioned with the following settings, but I only damaged the XLIFF:

    Screenshot of Trados Studio's 'Replace' feature with 'Use regular expressions' checked. Source search field contains 'n' and Replace with field contains a placeholder text.

     I've tried other regexes, but none worked:

    • (?<!\r)\n
    • (?<!\r)\n(?!\r)

    I don’t know if there is a way with the Toolkit app, but I stopped here, because I wouldn’t call issues the issues re. second column of my screenshot above. You’ll see ↵ characters in source, yeah, but you don’t need to type returns in Target.

    FYI, I've managed to delete these returns ↵ it in Notepad++ using this regex: (?<!\r)\n

    But as I said, this may be not your real issue…

    emoji


    Generated Image Alt-Text
    [edited by: RWS Community AI at 3:15 PM (GMT 0) on 18 Mar 2025]