FAQ

What is the Best way to Process Memsource MXLIFF Files in MemoQ?

 

Note: This is a third party solution. Memsource cannot guarantee it is 100% compatible with Memsource and the Memsource Editor. Use at your own risk.

 

Provided courtesy of Marek Pawelec.

If for whatever reason, you need to consider the use of a translation editor other than Memsource, Marek has offered a way to process MXLIFF files in MemoQ. The following extract is taken from his website at http://wasaty.pl/blog/:

 

To do so, I’m running pre-translation with a relatively low threshold, downloading project files and opening them in memoQ with another copy in Memsource for concordance and TB checks. After translation, I open the files in Memsource Editor and use the upload functionality to synchronize files with the server.

Memsource and MemoQ are not 100% synchronized when it comes to how certain features should be implemented in the XLIFF, so things like match rate and translation status are not imported by default and need some tinkering. I have created a template that can be used to import Memsource files in a bit more comfortable way.

The template works by performing automated actions—the files are edited with regex-based Find and Replace rules to insert additional attributes for match rate and segment states (regex rules are included in .xml configuration files). Subsequently, a customized XLIFF filter is used, configured to recognize the introduced attributes, and regex-based tagging is run to convert Memsource tags into memoQ tags.

To use the template, you need to follow the instructions below for import and setup. When everything is configured correctly, you can create a project from a template and work with Memsource files more comfortably. But always remember to back up your files in case something goes wrong. Also, while the conversions and template were tested by two people without any issues (at the time of publication), I can’t predict every possible case and setup, so you are doing this at your own risk—if something goes wrong, I may try to help, but I won’t be held responsible.

Before you start: the template will work only with memoQ 8.x and 7.8, not older. However, the executable file “FindAndReplace.exe” is only installed with memoQ version 8.1 and newer. If you have an older version, you need to download it separately (see below).

The Template Memsource does the following:

  • Match rate will be visible in memoQ
  • The locked status will be kept (segments locked in Memsource will be locked in memoQ)
  • The “Translated” status will be kept
  • Segments populated with machine translation will have “MT” status in memoQ
  • Memsource tags will be converted into memoQ tags

Preparation

1. memoQ version 8.1 and newer: none

2. memoQ version 7.8: download and unzip the executable  FindAndReplace (Alternatively, download and install the newest memoQ version. You can still use 7.8, but FindAndReplace will be installed in the default path).

Installation

  1. Download this file:  memsource_updated.zip
  2. Unzip the content (remember where you unzipped it).
  3. Start memoQ, and open the Resource console.
  4. Select Filter configurations.
  5. Select Import new and import: ChainedConverter#memsource-tagged.mqres
  6. Select Project templates.
  7. Select Import new > Memsource.mqres

    The template contains a hard-coded path for the configuration file: C:\memoQ\FindAndReplace\memsource.xml. If you don’t want to edit the template, create this folder and put “_memsource.xml” in this path. Alternatively, you can edit the template:
    Select Resource console > Templates > Memsource with states > Edit > Automated actions > Script before import and edit the path in the Command line arguments field. Then click Update.



    You can now create a template project and import Memsource files.


The tagging mechanism will create empty (single) tags for numbers enclosed in curly brackets ( {1} ), opening (left) tags for any content starting with a left curly bracket and closed by a “greater than” sign (e.g. {1> or {i> ), and closing (right) tags for any content starting with a “less than” sign and closed by a right curly bracket (e.g. <1} or <i} ). However, it is unlikely but possible that incorrect content will be tagged. In such a case please contact me.

Please note: the templates reference the FindAndReplace.exe file, which should be available in the C:\Program Files (x86)\Kilgray\FindAndReplace Tool folder (for memoQ 8.1 and up). If you have a non-standard memoQ installation path, you need to edit the .exe configuration in Template Settings (see below). If you have a memoQ version older than 8.1, you need to download the file separately and edit the path in Template Settings:

  1. Select Resource console > Templates > Memsource with states > Edit > Automated actions > Script before import > Select findandreplace.exe and click Delete.


  2. Click Add files…, browse to and select FindAndReplace.exe.
  3. Click Update.

The template can be further customized with your default languages, TMs, light resources, etc. Also note that when you export translated .mxliff files, they will still contain extra content introduced in pre-processing, but the desktop editor will strip all unrecognized content so you can simply open the files in the desktop editor and either upload or save and upload online.

Additional help for templates with Find and Replace scripts can be found here:  https://help.memoq.com/8-3/en/index.html?edit-template-find-and-replace.html

The template configuration file (the actual find and replace commands) is commented and you can customize it any way you like.