Video: How to Export TMXs for Specific Files and Time Ranges in OmegaT


This video explains how to make OmegaT create translation memories that only hold translation units from particular source files or segments saved within specific time ranges.

Exporting TMXs for specific files

This function comes in handy when you need to run quality assurance on a translation in a separate QA program, such as Verifika, but want to check just one or several files rather than the entire project TM (that you have in the project_save.tmx file or the three TMX files created in the project’s root folder by pressing Ctrl+D).

  1. Download the write_sel_files2TMXv2.groovy script from Kos Ivantsov’s OmegaT Scripts project.
  2. Save it to your OmegaT scripts folder (configured under ToolsScripting → Scripts Folder).
  3. Go to ToolsScripting.
  4. Select the write_sel_files2TMXv2.groovy script and click Run.
  5. Select the particular files you want to export to a TMX and then select a name for this TMX.
  6. The script will generate this TMX file in the project’s script_output folder.

The best thing about this script is that unlike the project_save.tmx, which lists all TUs in alphabetic order, TMXs created by the script list the units in their natural order (as they appear in the source file and OmegaT). This makes QA easier, because you can see the context. And if you compare TMX files before and after editing, the resulting comparison is also better for the same reason.

Exporting TMXs for particular time ranges

By a time range, I mean the period of time between the moment you started changing segments in a project and the present moment. I can think of at least two common scenarios that call for such export:

  • You have a project with many 100% matches that do not require review. After you translate the new text, you want to run quality assurance in a separate QA program just on those new segments, so you need a TMX limited to those segments.
  • You thought you had finalized a project, but then you realized it required further revision. So you spent three hours revising it. Now you want to run QA on those segments that you changed during these three hours, because you want to be sure you did not introduce any errors. To do so, you need a TMX that includes just the segments that you changed within this time period.

Here is how you create TMXs for such purposes:

  1. Download the write_new_trans2TMX_GUI.groovy script from Kos Ivantsov’s OmegaT Scripts project.
  2. Save it to your OmegaT scripts folder.
  3. Go to ToolsScripting.
  4. Select the write_new_trans2TMX_GUI.groovy script.
  5. In the right pane, locate the option def newdate and insert the starting time for the script, e.g., def newdate = ‘2017-06-22 10:00’.
  6. Click Run.
  7. The script will generate a TMX file in the project’s script_output folder under a name similar to “translated_after_Jun-22-2017_10.00.tmx.” It will include all segments that you changed between the starting time that you entered and the present moment.

If you also want to limit the script to specific files instead of the entire project, enable the select_files option: select_files = ‘yes’.

Special thanks to Kos Ivantsov for writing these indispensable scripts.

If this blog helped you in some way, please share a link to this post on your site or via social media.

 

Add comment