Pages in topic:   < [1 2 3] >
Trados 2017 Any trick or idea to paste multiple rows of text in the target column?
Thread poster: javierxp
Nora Diaz
Nora Diaz  Identity Verified
Mexico
Local time: 00:30
Member (2002)
English to Spanish
+ ...
Two things to troubleshoot May 25, 2018

Hi Stepan,

I have two suggestions to troubleshoot the script.

1. Before running the script, open the Find dialog and make sure the Use regular expressions box is unchecked. Otherwise, the script will uncheck the box first, instead of checking it. Once you have done this, close the Find dialog and start the process.

2. If #1 is not the problem, try increasing the sleep (wait) times at the appropriate points in the script.

I hope one of those hel
... See more
Hi Stepan,

I have two suggestions to troubleshoot the script.

1. Before running the script, open the Find dialog and make sure the Use regular expressions box is unchecked. Otherwise, the script will uncheck the box first, instead of checking it. Once you have done this, close the Find dialog and start the process.

2. If #1 is not the problem, try increasing the sleep (wait) times at the appropriate points in the script.

I hope one of those helps!
Collapse


 
Stepan Konev
Stepan Konev  Identity Verified
Russian Federation
Local time: 10:30
English to Russian
Great! May 25, 2018

Nora Diaz wrote:
1. Before running the script, open the Find dialog and make sure the Use regular expressions box is unchecked. Otherwise, the script will uncheck the box first, instead of checking it. Once you have done this, close the Find dialog and start the process.

I did step 1 first exactly according to your instruction in your brief article.
But I could find a clue: my keyboard language was set to target (Russian). Once I switched the language to source (English), the "Use: Regular expression" checkbox started working as designed.
Thank you again for your useful input.
javierxp, I am sorry for invading your post =)

[Edited at 2018-05-25 08:07 GMT]


 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 08:30
Member (2006)
English to Afrikaans
+ ...
My own little script May 25, 2018

Stepan Konev wrote:
Samuel Murray wrote:
Nora's AHK script seems to be a good solution, and it automates something that I often do myself manually.

Have you managed to get the expected result with this same script?


I haven't tried Nora's script, but since this is something I have to do often, I quickly wrote my own script:

https://we.tl/czYAsENCL7

You need to install AutoIt for the script to work. Double-click the script so that it runs in the background. Then, whenever you press the shortcut WinKey+W, the script will read the clipboard and paste it into Trados, line by line.

In other words, to use the script, first select the text that you want to paste, then copy it (so that it is on the clipboard), and then press WinKey+W. The script will ask for confirmation each time, just in case you make a mistake and decide not to paste. Click YES on the confirmation, and then click in the first segment in Trados from where you want to paste the lines. The script will then paste the lines. Note that you can undo in Trados by pressing Ctrl+Z.


 
Stepan Konev
Stepan Konev  Identity Verified
Russian Federation
Local time: 10:30
English to Russian
Hope your link would survive 10 days May 25, 2018

I cannot download it right now because of corporate Internet Security policies, but I will try it when I go back home.
Thank you Samuel.


 
Nora Diaz
Nora Diaz  Identity Verified
Mexico
Local time: 00:30
Member (2002)
English to Spanish
+ ...
Share the code? May 25, 2018

Hi Samuel,

Would it be possible to share the code? I'm not familiar with AutoIt, but would love to see the code to keep learning!

By the way, in the SDL Community AHK Forum Jesús Prieto has suggested further enhancing the script, so let's see if we can automate the process completely! Any suggestions over there would be greatly appreciated.


 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 08:30
Member (2006)
English to Afrikaans
+ ...
More about my little script May 25, 2018

Nora Diaz wrote:
Would it be possible to share the code?


The code is at that link. But I've uploaded here as well:
http://www.leuce.com/autoit/paste-lines-in-trados.zip

From what I can understand about Javier's requirement, this script ought to suffice. I've added a file with comments.

By the way, ... Jesús Prieto has suggested further enhancing the script, so let's see if we can automate the process completely!


What would you consider "complete" automation? (-:

I often CAT hop, i.e. process text from one CAT tool in another tool and then somehow get it back into the original tool. Sometimes this is possible by copying the text from the UI itself, but in the case of Trados, the tags do not survice copy/pasting.

It is not possible to copy tagged content from Trados in such a way that the text can be processed in another tool in plain text format, and then pasted back into Trados with the tags intact. In fact, it's not possible to access the rich text portion of the clipboard when using Trados, for Trados somehow does not make the rich text portion available to the operating system. In addition, automated ways of tagging text by interacting with menus do not work in Trados because its tagging system is so convoluted. You need a human with human eyes and a human hand to tag text in Trados.

So essentially, the most "complete" solution that we can achieve with AHK or AU3 is pasting untagged or tagless text.

I suppose one could make the script more fancy, by e.g. adding an option to the user's right-click menu so that he can paste the text across multiple segments by right-clicking instead of by pressing a shortcut, but that's just eye candy and increases the risk that the script might not work on a particular user's computer.



[Edited at 2018-05-25 19:21 GMT]


 
Nora Diaz
Nora Diaz  Identity Verified
Mexico
Local time: 00:30
Member (2002)
English to Spanish
+ ...
Thanks May 25, 2018

Samuel Murray wrote:


What would you consider "complete" automation? (-:

...

You need a human with human eyes and a human hand to tag text in Trados.

So essentially, the most "complete" solution that we can achieve with AHK or AU3 is pasting untagged or tagless text.





Thank you Samuel.

Not really thinking that far ahead in terms of automation (completely agree that it would be great if tagged text could be copied/pasted), but really just parsing the contents of the clipboard in a loop without having to paste the whole chunk of text first and without having to tell the script how many times the loop should run. I've posted an alternative script that does this in the AHK forum in the SDL Community, but it doesn't really work as reliably as my initial very simple macro script.


 
javierxp
javierxp
Spain
TOPIC STARTER
I post the solution with a videotutorial May 27, 2018

First of all, thanks to everyone for the participation and the interest in the subject.

The way to paste multiple rows of text in the target column would be to "inject" text coming from a bilingual review. For this reason I have created this videotutorial in which you can follow step by step the process, made easy for everyone.

The videotutorial is bilingual (English / Spanish) but the audio is in Spanish. I want to create a different version with the audio in English,
... See more
First of all, thanks to everyone for the participation and the interest in the subject.

The way to paste multiple rows of text in the target column would be to "inject" text coming from a bilingual review. For this reason I have created this videotutorial in which you can follow step by step the process, made easy for everyone.

The videotutorial is bilingual (English / Spanish) but the audio is in Spanish. I want to create a different version with the audio in English, anyway, for the moment this video is enough because you have the english subtitles along with the Spanish subtitles.

I hope you like it, and it may help many people having the same problem.

Here is the video:

https://youtu.be/N53gY4lQQ48

Enjoy.
Collapse


 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 08:30
Member (2006)
English to Afrikaans
+ ...
@Javier May 27, 2018

javierxp wrote:
The way to paste multiple rows of text in the target column would be to "inject" text coming from a bilingual review.


Trados creates a DOCX file with tracked changes enabled, but you don't need them. You can disable tracked changes, paste the text, and import it in the same way.


 
javierxp
javierxp
Spain
TOPIC STARTER
As far as I know only the method I describe is the one working May 28, 2018

Samuel Murray wrote:
Trados creates a DOCX file with tracked changes enabled, but you don't need them. You can disable tracked changes, paste the text, and import it in the same way.


I tried that way and don't work, the only way to make it works is to copy the source text into the target segments, and with the track changes activated... paste the new text inside Word and then, update the text in Trados via the bilingual review discarding the old text.
If you can explain in a video how to do the same without the track changes, I am very interesting to take a look to it.


 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 08:30
Member (2006)
English to Afrikaans
+ ...
@Javier May 28, 2018

javierxp wrote:
Samuel Murray wrote:
Trados creates a DOCX file with tracked changes enabled, but you don't need them. You can disable tracked changes, paste the text, and import it in the same way.

I tried that way and don't work...


I'm sorry to hear that. I have no idea why it works for me but doesn't work for you. I just tried it again, and it works (for me). I export a DOCX file from Trados, then I open that DOCX file in Word, then I go to the Review tab and switch off Tracked Changes. Then I paste the text (or edit it), then I save and close Word, and then I import the DOCX file back into Trados.


 
javierxp
javierxp
Spain
TOPIC STARTER
Only my method is working for the moment May 28, 2018

Samuel Murray wrote:

javierxp wrote:
Samuel Murray wrote:
Trados creates a DOCX file with tracked changes enabled, but you don't need them. You can disable tracked changes, paste the text, and import it in the same way.

I tried that way and don't work...


I'm sorry to hear that. I have no idea why it works for me but doesn't work for you. I just tried it again, and it works (for me). I export a DOCX file from Trados, then I open that DOCX file in Word, then I go to the Review tab and switch off Tracked Changes. Then I paste the text (or edit it), then I save and close Word, and then I import the DOCX file back into Trados.


It's very strange because switching off the track changes Trados cannot absorb the pre-translation. I tried your method and don't work, in my Trados 2017, don't work...
The only way to absorb the pre-translation is the method I am showing in my video...

https://youtu.be/N53gY4lQQ48

Anyway would be really interesting to see in action the method you propose, if you can please, post a video.


 
Nora Diaz
Nora Diaz  Identity Verified
Mexico
Local time: 00:30
Member (2002)
English to Spanish
+ ...
Works for me too Jun 1, 2018

Samuel Murray wrote:

I'm sorry to hear that. I have no idea why it works for me but doesn't work for you. I just tried it again, and it works (for me). I export a DOCX file from Trados, then I open that DOCX file in Word, then I go to the Review tab and switch off Tracked Changes. Then I paste the text (or edit it), then I save and close Word, and then I import the DOCX file back into Trados.


It works for me too, no need to keep tracked changes in Word. Here's a very short demo:

https://youtu.be/IkwOEBlqv-Y


 
Samira Jamalova
Samira Jamalova  Identity Verified
Azerbaijan
English to Azerbaijani
+ ...
Export and Import Dec 11, 2020

I would do in this way:

1. Copy All Source to Target
2. Export for Bilingual Review
3. Open the bilingual file and edit/translate it as requested
4. Save and Close the bilingual file.
5. Updated from Bilingual Review
6. Accept all track changes


 
Stefano Crivellaro
Stefano Crivellaro  Identity Verified
Italy
Local time: 08:30
Italian to English
+ ...
Here is a ahk script that does that from a simple text file Feb 4, 2021

;The script begins here
;Use this script at your own risk. It works on my system, but I provide no warranty on its functionality.
;Test the script in a safe environment before using it in your production system.
;This script needs AutoHotKey to run.
;Please note: the segments are automatically confirmed as "Translated" by this script.
;
;
;This where you indicate which keystroke combination triggers the script - in this case it is WIN+v
;Before tri
... See more
;The script begins here
;Use this script at your own risk. It works on my system, but I provide no warranty on its functionality.
;Test the script in a safe environment before using it in your production system.
;This script needs AutoHotKey to run.
;Please note: the segments are automatically confirmed as "Translated" by this script.
;
;
;This where you indicate which keystroke combination triggers the script - in this case it is WIN+v
;Before triggering the script, place the cursor in the first row that needs replacing in the editor target column.
#v::
;
Loop
{
;Here you indicate the path to the file with the target text (source.txt is the file here)
;Each line of the file (source.txt in this instance) should hold the text to be placed into the target row of the editor
FileReadLine, line, C:\tmp\source.txt, %A_Index%
if ErrorLevel
break
Clipboard := Line
Sleep 200
Send ^a
Sleep 200
Send ^v
Sleep 200
Send ^!{Enter}
Sleep 200
}
MsgBox, End of file reached.
return
;the script ends here

[Edited at 2021-02-04 20:47 GMT]
Collapse


 
Pages in topic:   < [1 2 3] >


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Trados 2017 Any trick or idea to paste multiple rows of text in the target column?







Trados Business Manager Lite
Create customer quotes and invoices from within Trados Studio

Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.

More info »
TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »