Select Source Text in #OmegaT

There might be a number of situations when the whole text of the current segment’s source is needed for something other than translation itself: performing concordance or web search, writing a translation note in another application, asking your client or project manager about the text, etc.

Currently, in OmegaT it can be achieved in several fairly easy ways:

  • Selecting the text with the mouse (but who wants to do that?)
  • Inserting the source text into the target area (Ctrl+Shift+I or Ctrl+Shift+R) and selecting the text there
  • Unlocking the text caret with F2, and then using arrow buttons and Shift to select the text
    (If you want to have the caret unlocked by default when you start OmegaT, there’s a way to do it)

All that is fine, but it would be much nicer to have a simple shortcut to select that source text, similar to what Ctrl+A does (which in OmegaT Editor selects everything only in the target field, or the complete textual contents of other panes if the got focus). I’ve written a simple script that does just that, and though scripts can be bound only to Ctrl+Shift+F[1-12] keys, it’s better than not having a shortcut at all. Hopefully, this function might appear in OmegaT itself, but before it happened, here you have it:
Get it from SF.net
Get it from GitHub

To learn how to install and use OmegaT scripts, see this quick guide.

Happy selecting!

Export #OmegaT Project to Excel (UPDATE)

The earlier version of this script was described in this article. Here I’m announcing the update to the script which makes it possible to include:

  • Segment ID for each segment (applicable only for some file types)
  • Translator’s ID of the segment’s translation creator
  • Translator’s ID of the segment’s translation editor
  • Segment notes
  • Visual marks to show segments’ uniqueness or repetitions (grayish background, marks 1 or + in the dedicated column: for the first occurrence, or further instances of the repeated segment, respectfully)
  • Visual marks for alternative translations (different font color, mark a with a different background in the dedicated column)
  • Visual marks for untranslated segments (mark NT in the dedicated column)
  • Visual marks for paragraph boundaries (upper border over the source and target text which visually groups the text belonging to the same paragraph)

All of the above features are optional, though they are on by default. To disable or change them, editing the script is required, but all those lines are very easy to understand, they have comments, and are placed almost in the very beginning of the script:

Scripting window with the script options in focus

Unlike the earlier version, the script produces the tabular output:

Segment #Source TextTarget TextUniq/AlSegment IDCreatorChangerNote

The script can be downloaded from
SF.net repository
GitHub repository

To learn how to install and use OmegaT scripts, see this quick guide.

Comments, suggestions, complaints, and donations are always welcome!

Happy spreadsheeting!

Export OmegaT project to an HTML table

A few years ago I wrote a script that exported the whole OmegaT to an HTML table. I used it a lot myself, and I know quite a few other people found it helpful too. The problem with the table produced by that script was that it had no way to show repeated or alternatively translated segments. I’ve rewritten the script since, but never published an announcement about that new version. Now I did a few more changes, and thought that it’s about time to fix that omission.

Continue reading

#OmegaT Merge/Split script updated

These days I often get jobs in IDML format. Luckily such files can be translated in OmegaT either with the Okapi filters plugin, or, if the files are not so plain and simple, by creating an OmegaT project in Okapi Rainbow. But it’s somewhat beyond the point. The point is that with these files the wonderful script to merge and split segments wasn’t working, at least for merging.
As you’ve rightly guessed, this tiny post is to inform you that it has been fixed, and the updated script could be downloaded from the SF.net repository.

December 2022 update: The updated merge and split script is described here.

To learn how to install and use OmegaT scripts, see this quick guide.

Happy merging and splitting, fellow OmegaTers!

Unlock Text Caret on #OmegaT Startup

As many have probably noticed, in OmegaT it’s now possible to unlock cursor. This means that one can select and copy text anywhere in the Editor pane without using the mouse. With the unlocked cursor you simply press up or down, and the text caret will move beyond the target segment. The lock is triggered with F2. Cool! But there’s no way to make this behavior default — every time OmegaT is started, cursor is locked.

Since I prefer it to be unlocked most of the time, here’s a little workaround. Below is a little script that needs to go into scripts_folder/application_startup/:

def gui() {
    editor.editor.lockCursorToInputArea = false
    editor.editor.updateLockInsertMessage()
}
return

This little snippet should be saved as a plaintext file with extension groovy, for instance, unlock.groovy. Next time OmegaT 4.2 or newer is started, the cursor is going to be unlocked from the get-go!

Zip current #OmegaT project

Here is a script that packs the current OmegaT project into a zip-file in the same location as the project folder.

Since the script doesn’t exclude anything, it might be a good idea to use another script to remove target and backup files.

Big kudos to cApStAn sprl for sponsoring the script for zipping.

 

#OmegaT Segment Status in Notes

OmegaT is just an excellent translation tool, but there’s still some room for improvement when it comes to using it for revising translated materials. I really hope that in future what I’m about to present in this post will become completely obsolete, but for now it might be welcomed by people who needed to mark segments with different status markers.

A big shout-out goes to Marc Prior for coming up with the idea and backing up the development.

Continue reading