Start a new topic

Soft returns in "Find and Replace" window

Hi,


I can type soft returns in CT's editor pane, but I can't in the "Find and Replace" window...

 For some reason CT inserts hard returns instead of soft ones when it gives a perfect match. I have hundreds of soft returns in my source segments and I need to replace them one by one manually each and every time in the target perfect matches... (my files are Excel files converted to sdlxliff by the client). In Studio the leading and trailing returns are excluded from the Editor's segments, but for some reason they are not in CT. :-(


So... any suggestion to quickly replace all the hard returns to soft ones in CT?


Thank you Igor, it works!


I can't believe it was so simple.

AC: it works!


I believe it. Igor's solutions usually work. But why? As far as I can see, he might as well have said, "Close the project, walk around the church three times, open it again." 


Besides, this procedure will have to be repeated for each file, of the 50+.


H.

Woorden, I glued all files in CT,  so there was no need to do it for every single file.


But still, somes files (the big ones) are corrupted... but this problem initially comes from Studio (there were a few error messages when Studio opened the files), nothing to do with CT.

AC: I glued all files in CT


Smart enough. So only one question left, "Why does Igor's trick work?"


H.

Hi Hans,


When loading Trados files, CT performs some checks for the line breaks and corrects them if needed. Therefore, simple opening the file does the trick.


Igor

IK: simple opening the file does the trick.


Great! And how does the finding and correcting of the line breaks work?


H.

The program finds soft returns (which rule in the Unix ad Java world) and replaces them with hard returns (Windows).


Igor

Igor, does that mean that the Excel file soft returns will be replaced with hard returns? If so, the resulting Excel file will have more cells than the original one. Or am I missing something? 

Thanks, Igor.


H.

> Igor, does that mean that the Excel file soft returns will be replaced with hard returns? If so, the resulting Excel file will have more cells than the original one. Or am I missing something?


I haven't seen sdlxfiff files with soft returns yet so probably they are hidden behind tags.


Igor 

Got it.


By the way, CT opens the files correctly when I glue them, but if I try to open individually one the files that gave an error message in Studio (out of memory), CT stays blank (doesn't open the file). I also think that the content of those big files (around 70 Mb) is not loaded in the glued files (CT seems to ignore them). My guess is that the original Excel files contain lots of illustrations.

Errr.... a regex. Unfortunately, I don't know how they work in CT (apparently you'll need the Java flavour), but I suppose you'll have to search for a return followed by an undercast character. The return can be something like \r or \n or \r\n, whereas the following character probably will be represented by [a-z]. Replace by a space. Perform the action in the S/R box, for SL, regex enabled.


Actually, I'd close/quit the project, open the SDLXLIFF in TextWrangler, perform the action (with "Show invisibles" activated so you'll see what you're doing), and start a new CT project with the cleaned file.


For real advise, you'll have to wait till the genuine regex experts are up and awake, I'm afraid.


H.

Hi woorden,


I will wait for Igor's advice, and try with TextWrangler if there is no other solution. By the way, are you sure that TextWrangler uses soft returns? I tried to replace hard with soft returns yesterday, and it was not possible (at least for me). The other problem is that I need to work only on the target segments inside CT, to make sure I don't replace anything in the source segments.

AC: I will wait for Igor's advice


Hmmm, I was thinking of the real RegExperts...


By the way, are you sure that TextWrangler uses soft returns?


I don't think you can "use" soft returns at all. They just happen, and are reflected by "returns". That's why I wondered how you can "typ soft returns in CT." I don't think you can.


I need to work only on the target segments inside CT


Oops. In that case you can't use TextWrangler, I think (not without making things - read: the regex - extremely difficult). You'd have to use the S/R box in CT. That's waaaay beyond me.


H.




Login to post a comment