About this blog

Translator's Shack is a collection of links, news, reviews and opinions about translation technologies. It's edited and updated by Roberto Savelli, an English to Italian translator, project manager and company owner of Albatros Soluzioni Linguistiche, a team of English-Italian translators, which hosts and supports this blog.


The Life as a PM category, managed by Gabriella Ascari, contains topics that are less technical in nature, but which we're sure will be appreciated by owners of small translation businesses and freelancers.


Here are links to my pages on some social networks:


Highly recommended:


Translating WordFast TXML files in MemoQ

Please note that this procedure no longer applies since version 5 of memoQ, which allows to open, translate and export TXML files directly.

(Updated on 2010-09-24 with some corrections, new filters and procedures for pretranslated files, and simplified procedure)

We sometimes receive files that have been processed using the latest version of WordFast Pro. These are recognizable from the .txml extension.

This format is just a specific XML structure, and as such it should be possible to translate the files using MemoQ after formatting them properly. Here is a simple workflow that will allow you to process the files in memoQ.

 

1. Copy the source segments to the target column

There are three possible situations:

 

 

1.a. There are only a few files in the project and you do not need to preserve any 100% pretranslated segments found in the source Wordfast files 1.b.  No matter how many files are in the project, you want to preserve any 100% translated  segments contained in the Wordfast files by masking them out in memoQ 1.c. For projects including many files, perform a batch search/replace (caveat: you will lose any 100% translated segments contained in your Wordfast files)
In this case, open each file in Wordfast and use the keyboard shortcut ctrl-shift-insto copy the source segments to the target column by overwriting all target segments, no matter what their status is. 

 

 

 

 

If there are any translated segments in the file, they will be overwritten. Save and close the files, and proceed to step 2.

In this case you will have to open every file and confirm every segment with Wordfast’s shortcut ALT-down arrow. There are some prerequisites:

In the Wordfast preferences, go to Translation Memory and enable Copy source on no match.

To prevent Wordfast’s sluggish UI from slowing you down, make sure the outline is off (Window > Show view > Outline)

For even more speed, switch the Wordfast view to Text mode (see below)
image

Once you have completed the prerequisites above, place the cursor in the first segment of your Wordfast file and press and hold ALT-down arrow until you have scrolled through the whole file. Save and close the files, and proceed to step 2.

Open the .txml file using the jEdit text editor. Click here to go to the download page. It is important to use this editor because it allows for a very simple search/replace syntax that takes care of “greedy” wildcards. You can obtain the same results using a different editor, but the syntax to use might be different.

After opening the file in JEdit, place the cursor at the top and choose Search > Find…

In the Search for field, insert the string below (be careful not to add superfluous spaces if copying from this page):
<segment(.*?)>(.*?)<source>(.*?)</source>(.*?)</segment>

In the Replace with field, insert the following string:
<segment$1>$2<source>$3</source>$4<target>$3</target></segment>

Check that the search options are configured as in the screenshot below:
image

Click on Replace All, save the file and quit jEdit. Proceed to step 2.

 

2.  Open the modified file in memoQ

  1. First perform a quick check by opening the file you just saved with Wordfast. Now the target column should be identical to the source column, tags included. The total number of segments should be identical to the value you saw when you first opened the file in Wordfast. After checking this, you can open the file in memoQ.
  2. Add the .xml extension to the file name (e.g. filename.txml.xml), since memoQ likes this better.
  3. Open memoQ and create a new project. Call it for instance “Wordfast”, so you can re-use it easily for subsequent projects that involve translating WordFast files.
  4. Go to Translations > Add document as…
  5. Select the file with .XML extension and open it.
  6. The Document import settings window is displayed.
    If you followed procedure 1.a or 1.c (no preservation of pretranslated material) download this  MemoQ XML definition file (right click, Save As).
    If you followed procedure 1.b above (preservation of pretranslated material) download this  MemoQ XML definition file (right click, Save As).
  7. Click on the on top to import the file downloaded in sub-step 6 above.
  8. Click OK at the bottom of the window. The window closes and the file is imported.
  9. Open the file in memoQ. memoQ should have inserted the any tags in the correct positions corresponding to the tags contained in WordFast. If you followed procedure 1.b (preservation of pretranslated material), the 100% translated segments contained in the original Wordfast files are hidden. They should however be restored when exporting from memoQ.
  10. Translate the file normally.
  11. When ready, export it with Export (dialog)

3.  Check the translated file in Wordfast

  1. Restore the .txml extension and open the translated file in Wordfast. You should get no error messages. Check that the total number of segments is identical to the original files, check the tag positions, etc.
  2. Make one simple modification in the file with Wordfast (e.g. add and delete a space), and save the file.  This step will rewrite some specific Wordfast headers and guarantees compatibility.

9 comments to Translating Wordfast Pro TXML files in memoQ

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>