March 29, 2006 18:20

Installing PO-based Online Translation and Localization Engine (Pootle)

Installing PO-based Online Translation and Localization Engine (Pootle)

Pootle and the Flumps

This is the notes i took while installing Pootle in the OpenOffice.org build server that i am working with. To get Pootle running you need the following pieces of software: jToolkit, translate toolkit, Pootle, PyLucene (optional) and psyco (optional)

Downloading the software

  • jToolkit (0.7.6): Python web application framework built on modpython and Apache, http://translate.sourceforge.net/snapshots/ or http://jtoolkit.sourceforge.net/
  • Pootle (0.7a1): Online Translation and Localization Engine, cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/translate co -P src
  • Translate Toolkit (0.9a2): Conversion tools for PO files, cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/translate co -P src
  • PyLucene (1.9.1): Lucene's text indexing and searching capabilities from Python, http://downloads.osafoundation.org/PyLucene/src/
  • Psyco (1.5), A just-in-time (JIT) compiler approach for Python, svn co http://codespeak.net/svn/psyco/dist/ psyco-dist

Installing

  • jToolkit (0.7.6)
    # wget http://translate.sourceforge.net/snapshots/jToolkit-0.7.6/jToolkit-0.7.6.tar.gz
    # tar zxvf jToolkit-0.7.6.tar.gz
    # cd jToolkit-0.7.6
    # ./jToolkitSetup.py install
    
  • Pootle (0.7a1)
    # cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/translate co -P src
    # cd src; ./pootlesetup.py install 
    
  • Translate Toolkit (0.9a2)
    # cd src; ./setup install
    
  • PyLucene (1.9.1) (depends on SWIG)
    # wget http://mesh.dl.sourceforge.net/sourceforge/swig/swig-1.3.24.tar.gz
    # tar zxvf swig-1.3.24.tar.gz
    # cd SWIG-1.3.24
    # ./configure
    # make
    # make install
    # wget http://downloads.osafoundation.org/PyLucene/src/PyLucene-src-1.9.1.tar.gz
    # tar zxvf PyLucene-src-1.9.1.tar.gz
    # cd PyLucene-src-1.9.1
    

    I did not manage to get PyLucene to run (segfaults) using gcc/gcj 4.1, so i did have to install a older version of the gcc compiler. I compiled the compiler from the source as follows:

    # wget ftp://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-3.4.4/gcc-3.4.4.tar.bz2
    # mkdir gcc-3.4.4
    # cd gcc-3.4.4
    # bunzip2 -c ../gcc-3.4.4.tar.bz2 | tar -xvf -
    # mkdir build
    # cd build
    # ../gcc-3.4.4/configure --enable-threads=posix --prefix=/usr/local/gcc-3.4.4 --enable-languages=c,c++,java
    # make bootstrap
    # sudo make install
    

    Once i got gcc 3.4.4 installed, i edit the Makefile of PyLucene as follows:

    # Linux
    PREFIX=/usr/
    PREFIX_PYTHON=$(PREFIX)
    SWIG=/usr/local/bin/swig
    GCJ_HOME=/usr/local/gcc-3.4.4/
    GCJ_VER=3
    ANT=ant
    #DB=$(PYLUCENE)/db-$(DB_VER)
    #DB=/usr/lib/
    #PREFIX_DB=/usr/lib
    
  • Psyco (1.5)
    # wget -r http://codespeak.net/svn/psyco/dist/ -I /svn/psyco/dist 
    # cd codespeak.net/svn/psyco/dist
    # ./setup.py install
    

Related topics:

bulletPootle Installation Guide