Changes

From SME Server
Jump to navigationJump to search
2,447 bytes added ,  12:41, 11 May 2010
m
categorisation
Line 1: Line 1: −
==pootle==
+
==Pootle Translations==
 +
{{Level|Advanced}}
    +
===Description===
 
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.
 
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'''
 
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.
 
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 ==
+
=== Install ===
{{Warning box|This contrib installation is not recommended for beginners.}}
  −
 
   
Download all rpms to one directory:
 
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/python2.4/rpms/alternatives-0.2.0rc3-9.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/python2.4/rpms/python24-2.4.2-10.el4.pyv.i386.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/rpms/elementtree-1.2.7-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/rpms/jToolkit-0.7.8-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/rpms/kid-0.9.6-1.noarch.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/rpms/Pootle-1.2.0-1.noarch.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/rpms/lxml-1.2-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/rpms/psyco-1.6-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/rpms/pysqlite-2.4.1-1.i386.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/rpms/python-Levenshtein-0.10.1-1.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/rpms/translate-toolkit-1.2.0-1.noarch.rpm
  wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpm/PyLucene-2.2.0-2.svn338.i386.rpm
+
  wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpms/xapian-core-libs-1.0.4-1.i386.rpm
 +
  wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpms/xapian-bindings-python-1.0.4-1.i386.rpm
 +
  wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpms/xapian-bindings-1.0.4-1.i386.rpm
    
Install with yum:
 
Install with yum:
Line 30: Line 31:  
  yum localinstall *.rpm
 
  yum localinstall *.rpm
   −
== Fixing alternatives ==
+
=== 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
 
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
   Line 40: Line 41:  
Now you have again python 2.3 running as default
 
Now you have again python 2.3 running as default
   −
== Start pootle server ==
+
=== 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:
+
Before you can start pootle server, you will must configure an user account. Pootle come with a default user account "startup" with the same password. Edit the file '''/usr/lib/python2.4/site-packages/Pootle/users.prefs''' and uncomment the following lines:
    
  startup:
 
  startup:
Line 52: Line 53:     
Then you can add a new user with admin privileges as say in pootle site, and for security reasons, comment again the user "startup".
 
Then you can add a new user with admin privileges as say in pootle site, and for security reasons, comment again the user "startup".
 +
 +
I suggest you to enable '''stats_db''' in the '''pootle.prefs''' file for improve the speed. Of course, make the cache directory and uncomment the line '''stats_db = "/var/cache/pootle/stats.db"'''
    
Manually you can start pootle server as indicate in pootle site:
 
Manually you can start pootle server as indicate in pootle site:
Line 57: Line 60:  
  python2.4 /usr/bin/PootleServer --port=8081 > /var/log/pootle.log 2>&1 &
 
  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''
+
Or better create a file  under /etc/e-smith/events/local:
 +
nano /etc/e-smith/events/local/S99Pootle
 +
 +
#!/bin/sh
 +
/usr/bin/python2.4 /usr/bin/PootleServer --port=8081 > /var/log/pootle.log 2>&1 &
 +
 
 +
chmod 0755 /etc/e-smith/events/local/S99Pootle
 +
 
 +
To run, execute the above file. To stop Pootle kill the pootle task. The above file allow the server to run pootle at every boot time.
 +
 
 +
''If you can 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
 
Access at http://your_server:8081
Line 70: Line 83:  
Or proxying through apache: http://forums.contribs.org/index.php?topic=40081
 
Or proxying through apache: http://forums.contribs.org/index.php?topic=40081
   −
== Conclusions ==
+
=== Updating from Pootle 1.1.0 to 1.2.0 ===
 +
Before you try to update, keep a backup copy of '''/usr/lib/python2.4/site-packages/Pootle'''
 +
 
 +
Because new pootle version has a bug with PyLucene search engine, you must remove before continue.
 +
 
 +
http://bugs.locamotion.org/show_bug.cgi?id=425
 +
 
 +
We replace PyLucene with xapian search engine
 +
 
 +
So, before update you must kill (stop) all instances of PootleServer
 +
 
 +
Remove PyLucene
 +
 
 +
yum remove PyLucene
 +
 
 +
Download the new packages under a folder
 +
 
 +
wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpms/Pootle-1.2.0-1.noarch.rpm
 +
wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpms/translate-toolkit-1.2.0-1.noarch.rpm
 +
wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpms/xapian-core-libs-1.0.4-1.i386.rpm
 +
wget http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpms/xapian-bindings-python-1.0.4-1.i386.rpm
 +
 
 +
Install them with yum
 +
 
 +
yum localinstall *.rpm
 +
 
 +
Now copy from you Pootle backup the files '''pootle.prefs''' and '''users.prefs''' under '''/usr/lib/python2.4/site-packages/Pootle'''
 +
 
 +
Merge the new configuration sections if they are need it: '''Pootle.stats_db''' and '''Pootle.enablealtsrc'''
 +
 
 +
I suggest you to enable '''stats_db''' in the '''pootle.prefs''' file for improve the speed. Of course, make the cache directory and uncomment the line '''stats_db = "/var/cache/pootle/stats.db"'''
 +
 
 +
For cleanup your old pylucene indexes remove all folders '''.poindex-project-lang''' under '''po/your-project''' folder.
 +
 
 +
Now you can start PootleServer again.
 +
 
 +
=== 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.
 
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.
    
'''News:''' Now SME server use an online translation tool based in Pootle at http://translate.contribs.org
 
'''News:''' Now SME server use an online translation tool based in Pootle at http://translate.contribs.org
   −
== References ==
+
=== References ===
 
==== Python 2.4 come from the repository PYVAULT ====
 
==== Python 2.4 come from the repository PYVAULT ====
 
If you want to add the repo:
 
If you want to add the repo:
Line 89: Line 138:  
and then expand template
 
and then expand template
   −
  expand-template /etc/yum.conf
+
  signal-event yum-modify
    
Use as --enablerepo=pyvault
 
Use as --enablerepo=pyvault
Line 100: Line 149:  
http://translate.sourceforge.net/wiki/start
 
http://translate.sourceforge.net/wiki/start
   −
----
      
[[Category: Contrib]]
 
[[Category: Contrib]]
 +
[[Category:Development Tools]]

Navigation menu