Customizing #OmegaT Kaptain Launcher (GNU/Linux)

OmegaT for GNU/Linux comes with a nifty launcher that gives you a comprehensive GUI to most of the startup parameters without needing to do anything on the command line. Along with that I’m not sure that many Linux user use this script. I think, one of the reasons for that is that the script doesn’t save your choices and you have to enter them at each run, which isn’t too bad if OmegaT was installed by the provided installation script (a rare case, as far as I can tell). And then the launcher is written in a somewhat obscure scripting language that requires some familiarization if the defaults are to be edited. In this article I’ll show which parts of the code correspond to the respective GUI elements and what can be edited to make this script customized. Continue reading

Advertisements

Installing and using #OmegaT scripts (Reblog/Translation)

I meant to write a short article about OmegaT script basics for a long time, but never found time to do so. This mishap got fixed without me, and out of gratitude I’m posting my translation of Gli script di OmegaT by LanguageLane. Continue reading

“Filtered” Note Export in #OmegaT

This script is variation of the one published before that exports all notes in the current project. The only difference is that this one allows you to select which notes will get exported based on the first line of the note. The resultant HTML table will consist of four columns: Source, Target, Filtered Notes (adjustable heading name), and Reply.
Say, you want to be able to export only the notes that start with <query>, as you’ve been using this word (<query>) to mark your questions to the client. In order to do so, go to line 14 and specify which mark-word was used. Note: The mark-word used to filter notes should be found in the very beginning of the very first line of the note, otherwise it’ll be ignored. In line 15 you can specify the column heading.

All project notes

All project notes

Only filtered notes

Only filtered notes

Continue reading

Export #OmegaT Project Notes

Here’s a new script that lets you export OmegaT project notes to a HTML table. It may help you to discuss different translation issues with the client/editor/your spiritual guru or review your own translation if you use notes for yourself.

When the script is invoked, it will create a file named PROJECTNAME_notes.html in /script_output subfolder of the current project root (the subfolder will be created if it doesn’t exist, and PROJECTNAME is the actual name, of course).

Exported notes screenshot
Continue reading

XLIFF to TMX

One of the recent scripts published here allowed OmegaT users who wanted their project to be worked on in a different CAT tool, to export the whole OmegaT project to an XLIFF file. To get the completed work back to OmegaT, one had to run Okapi Rainbow to convert XLIFF to TMX, possibly using the Rainbow settings file created by the script.

In this post I’ll share how to convert those OmegaT-created XLIFF files finished (or partly finished) in Trados/MemoQ/Deja Vu/WhatNotCAT back to TMX that can be used in OmegaT (all tags preserved, of course, that was the whole point), right from within OmegaT, without running Rainbow manually. Continue reading

Locked OmegaT Team Project (SVN)

Situation

One of the translators involved in a team translation project using a very cool OmegaT Team project feature gets a message about the project being locked.

16

Problem

The translator’s connectivity is rather limited and re-downloading the whole project would be very undesirable. There’s also no SVN software installed on her computer (other than OmegaT itself). Otherwise the quickest solution would be either getting OmegaT to download the project anew into an empty folder, or run “svn cleanup” on the project’s folder using one of the available SVN tools. Bad luck this time.

Solution

Since OmegaT can act as a SVN client itself (that’s what it does when a Team project is loaded), and there’s a cool scripting functionality, why not just exploit OmegaT to do the cleanup on any folder of our choice? So, here’s the script (the heading is also a link):

  • svn_cleanup_selected.groovy

    /*
     * Perform SVN cleanup on any local SVN repository
     *
     * @author	Yu Tang
     * @author	Kos Ivatsov
     * @date	2014-01-17
     * @version	0.2
     */
    
    import javax.swing.JFileChooser
    import org.omegat.core.team.SVNRemoteRepository
    import org.tmatesoft.svn.core.wc.*
    
    def folder
    
    if (project.isProjectLoaded()) {
    	def prop = project.getProjectProperties()
    	folder = new File(prop.getProjectRoot())
    	}else{
    	JFileChooser fc = new JFileChooser(
    		dialogTitle: &amp;amp;quot;Choose SVN repository to perform cleanup&amp;amp;quot;,
    		fileSelectionMode: JFileChooser.DIRECTORIES_ONLY, 
    		multiSelectionEnabled: false
    		)
    	if(fc.showOpenDialog() != JFileChooser.APPROVE_OPTION) {
    		console.println &amp;amp;quot;Canceled&amp;amp;quot;
    		return
    		}
    	folder = new File(fc.getSelectedFile().toString())
    	}
    
    if (SVNRemoteRepository.isSVNDirectory(folder)) { 
    	def clientManager = SVNClientManager.newInstance()
    	clientManager.getWCClient().doCleanup(folder)
    	console.println(&amp;amp;quot;Cleanup done!!&amp;amp;quot;)
    	}
    return
    

    If that pesky message pops up, it should usually suffice to fire up the script (it works even if no project is currently loaded, otherwise it cleans up the current project if it happens to be a Team project), browse to the problematic project folder and get “Cleanup done!!” message in the Scripting console. After that, the project should open without problems.

    After the fix there might be a problem with sync, and OmegaT may throw a message like this:

    sync problem

    but that is usually easily fixed with Ctrl+S (Save) or F5 (Reload).

I wish you all good and stable Internet connection, responsive and responsible team members and a glitch-less work-flow.

But as of now,

Good luck

UPDATE:

The script is now bundled with OmegaT, you’ll get it along with the program. No need to download it from the links posted here.

Convert OmegaT project to XLIFF for other CAT tools

I’m back with another little script that might be pretty handy for those who need to work on the same material in different CAT tools, or for translation agencies who use OmegaT as their main CAT application but farm out the work to translators using their CAT tools of choice. As a matter of fact, the script was requested by translation agency Velior for this very reason.
When the script is invoked, it writes out a file named PROJECTNAME.xlf (PROJECTNAME is the actual name of the project, not this loudly yelled word, of course), and the file is located in script_output subfolder of the current project. It exports both translated (they get “final” state in the resultant XLF file) and untranslated segments, and for untranslated segments the source is copied to the target, and such segments get “needs-translation” state. OmegaT segmentation and tags are preserved. Tags get enveloped in <ph id=”x”> and </ph>, so that they are treated as tags in other CAT tools. Continue reading

Live OmegaT Statistics and Wages Calculator (Linux)

This post is to announce Dimitry Prihodko’s nice little program that shows live OmegaT statistics and calculates wages based on it. All of that can be done in a spreadsheet, of course, but Dimitry’s solution is faster both in that it doesn’t require any additional preparation of a spreadsheet and copying data from OmegaT’s project_stats.txt, and in the way in constantly updates data without any intervention on a user’s part.
OTStats window showing a project statistics Continue reading

Adjustable Standing Desk

I’ve been thinking of a standing desk for some time. Being a GNU/Linux user I wanted to brew one myself, just for the fun of it. Designing and building it turned out to be a very interesting project that provided some quality time with my son (he’s nine and still thinks his Dad is a pretty awesome guy).

So, here’s the final product.

standing desk
back

back_upclose