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?


Thanks woorden,


Aaaargh, the package cointains over 60 files (crying)...


And if I understand that would remove the soft returns, so the files will be a mess when reimported in Excel by the client.

In the DejaVu group (Yahoo), something similar came up. I don't use DV anymore (since I don't use Windows), but maybe you can "borrow" from the solution below:


A quick workaround of those pesky soft returns: Import, export into an 
EV, check whetehr the file includes any hard returns. If not, copy 
source to target, hide the source and IDs, batch replace soft returns 
with hard returns in the target. You might like to hide all tags as 
well. Reimport as a new SOURCE file. Translate the nicely segmented and 
clean text. Export, unhide and reimport the EV back into  your initial 
source file.

Sounds more complicated than it actually is. It gives you some extra 
work but it's well worth it with large-ish files.

HTH
Martin

A rather strange editor, Tex-Edit Plus, shareware (worth every penny of the USD 15), with heaps of AppleScripts, 199 available here. Some CT users have dismissed it, though.


H.

woorden: Could this solve the problem?


Mysterious woorden, where does this menu come from? I don't see it in TextWrangler. BBedit?

AC: Reopened the package from scratch in Studio


That's not what I want. I don't have Studio (God forbid), and I don't use Windows (God forbid). Could this solve the problem?



H.

Thank you Hans, you understood my problem :-)


I tried a few things in TextWrangler, but nothing works. I also noticed that some soft returns (of the source sdlxliff file) are dislpayed as an upside-down question mark in TextWrangler, and that most display simply as return signs. Don't know why.


To be safe, here is what I did finally:


  • Completed the translation in CT
  • Reopened the package from scratch in Studio
  • Imported the tmx created by CT


It worked, the leading and trailing returns are ignored and I get 100% matches for almost all segments.

It would have been a pain in the XXX if my segments contained lots of tags, but they don't. So I'm will simply reviewing my translation in Studio, to make sure that the all the returns (hard, soft or wathever they are) stay untouched between the segments.

I'm trying to understand what you are meaning here. This is my attempt. In Excel the segments are surrounded by NewLines:



(These NewLines are inserted via Ctrl+Option+Enter.)


Studio doesn't take these surrounding NewLines into the segment, CafeTran does. They are hindering you with both FMs and during editing in CafeTran's Translation Editor. So you want to get them out there too.


It looks to me that this will require a modification to the way CafeTran interprets SDLXLIFF, or even a second flavour of the interpretation to stay on the safe side (not to break the current implementation).


As a work-around I could imagine using a bilingual review table. How does that look in CafeTran for this particular project?


Re: regular expressions, I have no idea.

Confused? You won't be after this episode of.... Soap!


H.

Thank you woorden, I installed Keycodes and I got this. 


Let's wait for the experts...


Where do you want me to type it?


I told you, wait for the experts. I use KeyCodes, but I don't guarantee a thing.


H. (also confused as always if it concerns regexes, scripting, or anything else having to do with computers)

woorden: can't really check, because I can't typ it. You can


Where do you want me to type it? (confused)

AC: But it doesn't work in the Find and Replace window.


Doesn't work in TW either. Nor in TextEdit. You may need the unicode, which is probably 0x2028. Or something else, of course (can't really check, because I can't typ it. You can).



H.

Even if one is very old, one learns every day.


H.

Indeed I can insert soft returns in the editor's pane, with shift-fn + space.


Screenshot of a soft one, followed by a hard one. But it doesn't work in the Find and Replace window.



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