Edit template - Scripting to transform documents before importing and after exporting

Experts only: Don't proceed if you're not familiar with scripts, programs, services, and users in Windows. If you don't have this experience, you need to call an expert, possibly an IT specialist.

Some documents must be transformed before you can import them into memoQ. This is done in project templates, through scripting.

Can't do this without templates: You can do this in projects created from project templates only.

When it's already in a project, it works like this:

  1. You import a document in the project.
  2. memoQ automatically runs the document through a program. That produces another, transformed, document. This step is called pre-processing.
  3. The transformed document is imported in the project.
  4. You work on the transformed document.
  5. When you export the document, you'll get a transformed document with the translations.
  6. Then memoQ runs the exported document through another program, which transforms it back to the original format. This step is called post-processing.

Here's an example:

Years ago, Help documentation was written in a program that produced the Help pages in XML format. But if you imported these XML files directly, the segments - sentences - would be fragmented, and you needed to join every second segment with the next one to get sensible sentences.

There was a program that turned these XML files into slightly different XML files, where the fragments were already joined together. We imported and translated these slightly different XML files. After they were exported, they needed to be transformed back, so that the authoring program could open them again. So they were run through another program that split the segments apart again into the fragments. (Technically speaking, the same program was run with different arguments, but it could have just as well been a completely different one.)

You need to set this up in a project template. Then the transformation will work in all projects that you create from this project template.

Set up your server first: If you need this for online projects, you must set up your server first. This is described in the What can you do? section, later in this topic.

You need to write or acquire the program: memoQ doesn't come with programs that make the necessary changes to documents or to the project. Either you need to write these, or acquire them from a programmer. Or, you can turn to memoQ Business Services, who will write it for you for a fee.

To prepare or touch up text documents, use the built-in Find and replace tool: To learn more, see the topic about the Find and replace script.

How to get here

  1. Open the Resource Console.
  2. On the left, click Project templates.
  3. Select the template you want to edit.

    To set up a template for online projects or resources: Use an online template for this. Choose your memoQ TMS at the top of Resource console. Click the Select icon_selectserver button.

  4. Under the list, click Edit.
  5. On the left, click Automated actions. To set up the transformation that runs before the documents are imported: Click the Script before import tab. To set up the transformation that runs after the documents are exported: Click the Script after export tab. You will probably need both.

projtemp_automatedactions_scriptimport

What can you do?

When you finish

To save the project template, and return to Resource console: Click OK.

Possible next step: After you finish working on the template, close the Resource console, and create a project from the template.

To continue working on the project template: choose another category, and fine-tune other settings.

To return to Resource console, and not save the project template: Click Cancel.