All source and target text listed in the Source column (importing from MS Word).

Hi,

 I imported a .docx document into Trados Studio 2019 Pro SR1 and whole texts (English and Persian) are listed in the Source column because both language texts were typed in an only document and separate by the simple Enter key. Now, what’s the fastest method to cut and move translated text (Persian Language) to the Target column, in front of their relative source segment without mistakes and missing, in a clean way.

 

Best,

Masoud

Trados Studio interface showing a .docx document imported with English and Persian texts in the Source column, separated by Enter key, with no text in the Target column.



Generated Image Alt-Text
[edited by: Trados AI at 5:11 PM (GMT 0) on 28 Feb 2024]
emoji
  • Hello ,

    Please take a look at this previous thread-

    https://community.sdl.com/product-groups/translationproductivity/f/studio/20508/bilingual-file---target-text-appears-in-the-same-column-as-the-source-text

    This should help you resolve the problem.

    Lydia Simplicio | RWS Group

    _______
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • Hi Steven,

    I read the thread, but it didn't help me to fix my problem!

  • Hello

    could you please show me the layout/formatting of the source file (DOC)? I mean the screenshot of one page of the bilingual source file.

    Make the invisible characters visible, please. I'll try to help you.

    Thanks in advance.

    Regards,

    Rafal

  • Hi Masoud,

    Given that .docx is not a bilingual document format, there is no way to tell Studio to properly import the appropriate texts into the source and target columns.

    But if I'm understanding your question correctly, you are aware of this and simply want to move the target text to appear next to the appropriate source text. If this is the case, you could use a little trick to accomplish this, and even though the result will not be perfect (you will end up with blank source segments, and therefore blank lines in your target document), it will be close to what you need.

    To move the text from the source to the target, you can do this.

    First, go to Project Settings - Project and enable "Allow source editing".

    Now, you can go into each segment that contains the target text, activate source editing (Alt+F2), select all the content of the segment, cut it and paste it in the target section of the appropriate segment.

    This process can be automated with an AutoHotkey script as follows (make sure the cursor is placed in the target side of a segment containing target text before triggering the script):

    #SingleInstance, Force
    #IfWinActive ahk_exe SDLTradosStudio.exe

    #t::  ;hotkey: Windows key + t (can be changed to any other key combination you prefer)
    Send {F6}   ;move cursor to source
    Sleep 200   ;wait 200 ms
    Send !{F2}   ;activate source editing
    Sleep 200
    Send ^+{PgDn}   ;select whole segment
    Sleep 200
    Send ^x   ;cut
    Sleep 200
    Send {F6}   ;move cursor to target
    Sleep 200
    Send {Up}   ;move cursor to previous segment (where text will be pasted)
    Sleep 200
    Send ^v   ;paste text
    Sleep 200
    Send {Down 3}  ;go down 3 segments
    Return

    This is how that would work:

    If you're new to AutoHotkey, follow these simple instructions to use the script above:

    1. Download AutoHotkey (www.autohotkey.com) and install it. Once installed, you won't see anything open, that's normal. AutoHotkey runs in the background and allows you to run your own scripts (macros).

    2. Go to a folder in Windows Explorer where you would like to save your script (I have a folder called AutoHotkey Scripts just to keep them all in one place). Right-click on an empty space in the folder and select New-AutoHotkey Script. Give a name to your script and save it.

    So far, you have the empty "skeleton" of a script. Now you need to enter the actions you want it to execute.

    3. Right-click on the script and select Open, then open it with a text editor, such as Notepad (I prefer Notepad++, available for free).

    4. Once the file is open, paste the script code in a new line.

    5. Save the file. Now double-click the file, and this will load the script. Look for a green square with a white H in it in your system tray, which indicates that the script is active.

  • Hi Rafal,

    The documents don't have a special layout, a paragraph in English, and the next is its translation.

    Screenshot of Trados Studio showing a document with alternating paragraphs in English and its translation, no visible errors or warnings.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 5:11 PM (GMT 0) on 28 Feb 2024]
  • Hi Masoud,

    thanks for the screenshot. Just as I thought.

    I'd recommend you to:

    1. Use Find/replace in MS Word all (only) black paragraph marks (these between the source and the target) into tab or semicolon (but NOT comma, as it may be present in some sentences).
    2. Save the file as a TXT.
    3. Open Excel and go to "File->Open" (or CTRL+O in Windows). Do not double-click the file or drag and drop into Excel because the wizard won't show
    4. Open this TXT file (if you cannot see it then check if the file extension filter is set to "All file types (*.*)I).
    5. You will be prompted (by the importing wizard) to choose if the file is delimited or fixed width - choose the delimited option and click next.
    6. Here choose the semicolon or tab - depends on what you've chosen before.
    7. It doesn't matter what you choose in the 3rd step, just finish the wizard.
    8. Here you go. If everything was properly done you should have two-column bilingual excel.
    9. Now you have to save the file as XLSX or XLS and create a project in Trados using the Bilingual Excel filter. Let me know if you don't know how to do it.

    That's - in my opinion - the shortest way with 99% chance of success. The most critical stage is to change the black paragraph marks into delimiter. Next steps are easy to follow (carefully).

    Please keep in mind that you can use find/replace whore whole file or only for parts. If you change the enter between segments by hand it should work as well. The method doesn't matter - you just have to change the segment's divider into consistent one delimiter in the whole file then follow the instruction.

    It's simple and great especially for bigger batched f.e. hundreds of pages with the same formatting/styles what makes the find/replace and "replace all" possible.

    If you encounter any difficulties just let me know and/or send me the file and I will send you back the bilingual excel (if there will be the same formatting int he whole file - as said before) - or, let's say, I'll try to help and prepare such bilingual excel - of course, free of charge.

    Regards,

    Rafal

  • Hi Nora,

    Manually method is fine but for my long documents is boring task. So I go for the AutoHot Key mean and then followed your instructions, but I don't know why it didn't answer. When I opened Notepad ++; some lines were in there and I paste the code in the below lines, was it correct or I should delete those lines and paste the code? I don't understand what should I do after I ran the scripts exactly! Sorry, I'm not good scripting and almost very weak at this matter. But I'm sure it's very helpful. Thank you for complete and clear description. I'll try again with Autobot Key. 

  • Hi Masoud, 

    No need to delete those lines, they are part of the AutoHotkey file. Once the script has been loaded (you'll see the little green square with the white H in the system tray), you'll need to use the hotkey in Trados to trigger the actions in the script. In this case, the hotkey is the Windows key + the T key. So when you place the cursor in the target section of a segment containing the text you want to cut and paste, press Win+T and the actions will be executed. The cursor will then be placed in the next segment where the actions need to be executed, and you will need to press Win+T each time for that to happen.

    Hope that helps!

  • Do you actually have AutoHotkey installed? Do you know what AutoHotkey actually is?

  • Hi Nora,

    I tried for the second time and it answered! Grinning. Tha't a magic and I guess you graduate from Hogwarts school and know much magic! The AutoHotKey matter is cool matter and I'm considering to learn more about it in the topic in this community and in the web. Thank You very much Nora!

    Best,

    Masoud