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.
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.
Even if one is very old, one learns every day.
H.
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.
woorden: can't really check, because I can't typ it. You can
Where do you want me to type it? (confused)
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)
Thank you woorden, I installed Keycodes and I got this.
Let's wait for the experts...
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.
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:
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.
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.
woorden: Could this solve the problem?
Mysterious woorden, where does this menu come from? I don't see it in TextWrangler. BBedit?
alain
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?