Quickly Create a TMX File From Two Text Files

Sometimes I'm in the middle of a project and need to research a term. When I find this term in a document for which a translation is available, I decide to create a TMX (since my CAT tool, CafeTran Espresso, can open it without conversion).

But it has to be quick, since I'm concentrating on the text to be translated.

I quickly copy the paragraphs containing the source terms/info to a file 'source.txt' on my Desktop and then I copy the paragraphs containing the target terms/info to a file 'target.txt' on my Desktop.

Then I run the macro—et voila: a TM named 'aligned.tmx' is created on the Desktop.

NOTE: You'll have to adjust the paths and language codes.

Create TMX from tab-del.kmmacros (7.4 KB)


12221

1 Like

I added three extra conversions:

New macro file:
Create TMX from tab-del.kmmacros (9.2 KB)

Oops, the ampersand replacement should be first, of course. Shame on me.

Hey Hans,

Just for efficiency I'd probably use a couple of variables or a couple of named clipboards to copy the given texts into and let Keyboard Maestro do the work of writing to the files.

Or – better yet I'd just use Keyboard Maestro's clipboard history.

That way you simply have to:

  • Copy
  • Copy
  • Run the macro

You can leave the items in the history, or delete them when you run the macro.

-Chris