Difference between revisions of "Pootle"

From SME Server
Jump to navigationJump to search
Line 33: Line 33:
 
  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/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
 
  wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/python2.4/rpm/python24-2.4.2-10.el4.pyv.i386.rpm
  wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpm/smeserver-PyLucene-1.9.1-py24.1.noarch.rpm
+
  wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpm/PyLucene-2.2.0-2.svn338.i386.rpm
  
 
Install with yum:
 
Install with yum:

Revision as of 00:50, 4 March 2008

Incomplete.png Incomplete:
This article or section needs to be expanded. Please help to fill the gaps or discuss the issue on the talk page



Important.png Note:
Please, read Talk:Pootle

Talk:Pootle contains information on the Trial SME Server translation site,
you don't need to install pootle on your server to help with translations




pootle

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 installation, 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

Warning.png Warning:
This contrib installation is not recommended for beginners.


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.1.0rc2-1.noarch.rpm
wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpm/lxml-1.2-1.i386.rpm
wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpm/psyco-1.6-1.i386.rpm
wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpm/pysqlite-2.4.1-1.i386.rpm
wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpm/python-Levenshtein-0.10.1-1.i386.rpm
wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpm/translate-toolkit-1.1.1rc4-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
wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpm/PyLucene-2.2.0-2.svn338.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 as default

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 > /var/log/pootle.log 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

Or proxying through apache: http://forums.contribs.org/index.php?topic=40081

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