Pootle

From SME Server
Revision as of 18:51, 24 January 2008 by PicsOne (talk | contribs)
Jump to navigationJump to search
Warning.png Warning:
This contrib installation is not recommended for beginners.


Important.png Note:
I need your help. Plase, read



From the pootle website:

The Translate Toolkit and Pootle provide a way to make it easier to localise using standards based file formats (PO and XLIFF). Our goal is to make the life of a localiser easier, making it easy to localise, creating high quality tools that help you to work quicker and with higher quality.


Pootle and translation toolkit require python 2.4. SME 7.3 come with python 2.3 configured to run yum and other system utilities. Then you must install python 2.4 without affecting the original python 2.3

Because python 2.4 installation will set as default, you must install in one step all rpms, before yum stop working. Don't worry about that. New python 2.4 come with a dependency package named "alternatives". With alternatives you can set the default python will system be use. For this intallation, will we not utilize alternatives, and will we restore the original links. If you know a better way to use alternatives and make python 2.3 as default, and 2.4 automatic, please share with us.


Install

Download all rpms to one directory:

wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpm/elementtree-1.2.7-1.noarch.rpm
wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpm/jToolkit-0.7.8-1.noarch.rpm
wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpm/kid-0.9.6-1.noarch.rpm
wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpm/Pootle-1.0.2-1.noarch.rpm
wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpm/translate-toolkit-1.0.1-1.noarch.rpm
wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/python2.4/rpm/alternatives-0.2.0rc3-9.noarch.rpm
wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/python2.4/rpm/python24-2.4.2-10.el4.pyv.i386.rpm

Install with yum:

yum localinstall *.rpm

Fixing alternatives

If you run python at command line, you will see version 2.4, and you can't use yum anymore, because yum is installed under python 2.3

To fixing, run the following command:

/usr/sbin/alternatives-helper --remove python24
mv /usr/bin/python.alternatives_save /usr/bin/python
mv /usr/share/man/man1/python.1.gz.alternatives_save /usr/share/man/man1/python.1.gz

Now you have again python 2.3 running

Start pootle server

Before you can start pootle server, you will must configure an user account. Pootle come with a default use account "startup" with the same password. Edit the file /usr/lib/python2.4/site-packages/Pootle/user.prefs and uncomment the following lines:

startup:
 activated = 1
 passwdhash = 'dd82c1882969461de74b46427961ea2c'
 rights.siteadmin = True
 name = 
 email = 


Then you can add a new user with admin privileges as say in pootle site, and for security reasons, comment again the user "startup".

Manually you can start pootle server as indicate in pootle site:

python2.4 /usr/bin/PootleServer --port=8081 --autorestart -B < /dev/null >> /var/log/pootle 2>&1

If you make init scrypt as say ( http://translate.sourceforge.net/wiki/pootle/service_scripts ) share with us and then we will make the service rpm

Access at http://your_server:8081

Of course you can choose other port.

To make accesible outside your lan, run these commands:

config set pootle service access public status enabled TCPPort 8081
signal-event remoteaccess-update

Conclusions

Pootle is a very good tool to make translations for po files, and with a little configuration, you can translate between various file formats. I think it is usesful for implement at contribs.org for make translations more easily, with all the community online. Also formmagick panels.

References

Python 2.4 come from the repository PYVAULT

If you want to add the repo:

/sbin/e-smith/db yum_repositories set pyvault repository \
Name 'PyVault RPM Repository [stable] for Redhat Enterprise Linux 4 (i386)' \
BaseURL 'http://python.org/pyvault/centos-4-i386' \
EnableGroups no \
GPGCheck yes \
GPGKey http://python.org/pyvault/pyvault.asc \
Visible no \
status disabled

and then expand template

expand-template /etc/yum.conf

Use as --enablerepo=pyvault


Alternatives

See http://alternatives.sourceforge.net/ page information, or run "man alternatives" at your command prompt.

Pootle website

http://translate.sourceforge.net/wiki/start