Sunday, June 1, 2008

Off-line mode

The off-line mode is ready for download. Here is what you need to take advantage of it:
  1. Download the latest release of the scripts from this location.
  2. Create .open-tran subfolder in your home directory.
  3. Download nine-en.db (85MB) and place it in the .open-tran folder.
  4. Download a database for your language. To do this, you need to replace en with your language code (e.g.: nine-pt_br.db for Brazilian Portuguese or nine-es.db for Spanish) and place it under .open-tran.
  5. Extract the scripts and enjoy :)
You will find 2 executable scripts in the tarball:
  1. suggest.py is a central part of the web service. You can use it with other Python scripts (the TranDB class has the methods described in our developers' corner). But at the same time, it is a command-line tool for retrieving suggestions. You should run it like this: suggest.py "do you really want to quit" pt_br.
  2. open-tran.py is a GTK tool that opens a po file and provides you suggestions for them. It is a very old tool that I wrote more than year ago. I decided not to develop it any further once I learned that PyGTK is one-threaded. Yesterday I tweaked it to support the off-line mode, but I'm not going to maintain it - it was always meant to provide an example.
It is too late today, I will try to write more in the next days. Anyway, if you have any problems with it, if something crashes, if you need some improvements or don't understand how it works, if you need assistance, send an e-mail to open-tran@googlegroups.com.

4 comments:

Anonymous said...

> once I learned that PyGTK is one-threaded

Huh. That's easily the most bizarre thing I read in months.

Anonymous said...

Thanks for the release, I'll test it as soon as I can!

Anonymous said...

I miss some features from the website, but I'm happy with my local open-tran. I hope it make the gedit and gtranslator plugins even more useful!

Kevin Brubeck Unhammer said...

Could you put this blog post on the Google Code page? It seems like the natural place for this kind of information...

Also, the .db format, what is it? TMX? If not, where is it documented?

(I'd love to try out the combination of TMX with my Bokmål-Nynorsk Apertium pair =D )