OmegaT 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:
- Download the latest scripting plugin from the SourceForge page.
- As with any other OmegaT plugin, you need to put all the plugin files into the “plugins” subfolder within the OmegaT folder.
- The download also includes a subfolder named “scripts.” You need to copy it to the OmegaT folder.
- 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.
- 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:
- Search and replace (written by Didier Briel). Makes replacements globally. We assigned it to Ctrl+Alt+F1.
- 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)
- 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)
- 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)
- 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.