GET A FREE CONSULTATION OR SAMPLE TO GET YOUR PROJECT GOING.

Yes, I want my consultaion

Using OmegaT More Efficiently with Scripts

Use the scripts to work more efficiently with OmegaTOmegaT has a powerful scripting plugin. It allows running scripts that can make repetitive tasks easier. For example, you can open a project glossary by using a keyboard shortcut instead of browsing through your file manager. Read on to learn how it works and which scripts are currently available.

How it works

Here is a quick procedure for getting started with the scripts:

  1. Download the latest scripting plugin from the SourceForge page.
  2. As with any other OmegaT plugin, you need to put all the plugin files into the “plugins” subfolder within the OmegaT folder.
  3. The download also includes a subfolder named “scripts.” You need to copy it to the OmegaT folder.
  4. All your scripts must reside within this “scripts” subfolder. The folder you downloaded already includes a few scripts. You can add the scripts by writing them yourself using NetRexx, XSLT, Groovy, or JavaScript languages. You can also add the scripts shared by other people. A script is a text file with an extension that represents the programming language used.
  5. Run OmegaT and select Tools > Scripting. You can run any script from this window by clicking a script in the left pane and then clicking Run.
  6. You can also assign keyboard shortcuts to a few scripts. Click a script in the left pane, then click the number button below. If you assigned the script to < 1 >, you’ll press Ctrl+Alt+F1 to run this script.

What it can do

The scripting plugin is designed to make it easier for users to complete routine tasks and also access functionality that’s otherwise unavailable. Here is a non-exhaustive list of scripts that we’re currently using:

  1. Search and replace (written by Didier Briel). Makes replacements globally. We assigned it to Ctrl+Alt+F1.
  2. Open the current source file (written by Yu Tang, Masao Kasuya, Jean-Christophe Helary, and Kos Ivantsov. Launches the source file currently selected in the Editor pane (from the “source” subfolder). It comes in handy when you need to look at a source file e.g. to fix incorrect segmentation or check the structure of the original file such as SDLXLIFF. (Ctrl+Alt+F2)
  3. Open the TM folder (written by Yu Tang). Opens this folder so that you can make changes, e.g. remove unnecessary TMs or add TMs that you think will be helpful. We store all TMs in a central location rather than in individual projects, and this script saves a lot of time that we would otherwise be spending on navigating to the TM folders. (Ctrl+Alt+F3)
  4. Open the glossary (written by Yu Tang). This is an absolutely indispensable script for those who rely on glossaries heavily. It opens the glossary in your text editor, allowing you to make changes directly or prepare a list of terms for feeding to your QA program. (Ctrl+Alt+F4)
  5. Open the project_save.tmx file (written by Yu Tang). Opens the translation memory of your project, allowing you to make changes directly in a text editor. Remember to close the project in OmegaT after you opened this file and started to make changes. Otherwise, OmegaT will overwrite your changes with what’s in the Editor on the next save. (Ctrl+Alt+F5)

You can avoid the hassle of installation and configuration by downloading the build of OmegaT that we use internally. You can also subscribe to our blog to make sure you don’t miss any important suggestions about the scripts in the future.

6 comments

Add comment


About the Author

Roman Mironov
Roman Mironov
CEO & Founder

As the founder of Velior, Roman has had the privilege of being able to turn his passion for languages into a business. He has over 15 years of experience in the translation industry. Roman has helped dozens of clients increase sales by making their products appealing for speakers of other languages.