OmegaTagAdapt

A small utility for OmegaT

I wrote a small utility for performing two simple tasks when translating using OmegaT.

I called it OmegaTagAdapt and it does 2 simple tasks:

  1. Replaces the tags of the TM entry with the tags of the source segment.
  2. Inserts group of tags all at once

This small application is written with AutoHotKey, so it can be used on Windows machines only.

It executes two small tasks and has a small configuration window to customize the keyboard shortcuts.

Note: This utility is just a small workaround for resolving a problem I had on some jobs. It is far from perfect. It will be removed from sourceforge when the omegaT developers or groovy gurus will insert functions and feature to adapt tags and to inserts tag groups.

Download

You can download OmegaTagAdapt from here: http://sourceforge.net/projects/omegatagadapt/

Installation

This small software is included in a portable .zip file. To run it, just unzip the file and launch OmegaTagAdapt.exe. The exe file does just one thing: launch the autohotkey script TagAdapt.ahk that you can find in the TAdapt folder. Obviously, beingh a simple text file, you can edit the ahk file, if you feel comfortable with AutoHotKey syntax.

Note: In Windows 7 and 8 inserting the TagAdapt folder in the C:\Programs makes impossible to edit the program files. The script will work, but it will be impossible to change the shortcuts through the Preferences window.

1. Tag replacement

Let's suppose your projects contains the following segments:

<p>The <b>cat</b> is on the <i>table</i>.</p>

<p>The <strong>cat</strong> is on the <b>table</b>.</p>

As you can see, the only difference between these segments is in tags. After translating the first segment, the second one is a quasi-full match for omegaT. If you insert the fuzzy (CTRL+I), you have to manually delete all the wrong tags retrieved from the TM, and then insert the correct ones.

With OmegaTagAdapt you can automate this operation pressing ALT+A.

Adapt Tags with OmegaTagAdapt in OmegaT Editor

2. Inserting tag groups

The purpose of this feature is to avoid pressing CTRL+T several times to insert several consecutive tags. These long tag sequences are often found in XML files.

Let’s suppose you have to translate this segment:

The <animal><mammal><canis>dog</canis></mammal></animal> is under the <obj><furniture>table</furniture></obj>.

In this small sentence, we have 10 tags; this means we have to press CTRL+T 10 times to insert them all. In most cases, in this kind of segments is most practical to insert the source and then type the translation between the tags. But sometimes you have some very good fuzzy match in your TM, so if you insert it, you still have to insert all the tags manually. OmegaTagAdapt allows you to insert tags in group. The default shortcut for it is ALT+T. The first time you press it, it will insert the first three tags; the second time, it will insert the second group of three tags and so on.

Insert Tag Groups in OmegaT Editor with OmegaTagAdapt


Please note: This feature is still experimental, so in some cases can be quicker to use the default omegat CTRL+T shortcut. In particular, it creates some problem in very long sentences. Should this happen, the application can badly damage the inserted translation. To return to the previous text you inserted in the target segment, you can press ALT+Z.

Shortcuts Customization

When you launch OmegaTagAdapt, you will see a small agent icon on the System Tray (the area next the System clock on Windows). If you right-click on this agent, you will see a small menu. In this menu, if you click on the Preferences item, the Preferences window opens. Here you can customize the OmegaTagAdapt shortcuts. Note that there is a shortcut to undo every operation made with OmegaTagAdapt and to restore the previous version of the target text.

OmegaTagAdapt System Tray

OmegaTagAdapt Preferences Window

Note: This utility is just a small workaround for resolving a problem I had on some jobs. It is far from perfect. It will be removed from sourceforge when the omegaT developers or groovy gurus will insert functions and feature to adapt tags and to inserts tag groups.

Please, feel free to comment on this utility features and bugs in this page.

dasmi Friday 11 July 2014 - 3:34 pm | | Translator tools

One comment

Roman Mironov

Thanks a lot! Looking forward to trying the script.

Roman Mironov, (URL) - 03-10-’14 12:01
(optional field)
(optional field)

Comment moderation is enabled on this site. This means that your comment will not be visible until it has been approved by an editor.

Remember personal info?
Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.