Difference between revisions of "Talk:Pootle"

From SME Server
Jump to navigationJump to search
m
 
(171 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Thanks Normando, I have my pootle server running, but I'm don't see how to import the language files,
+
Managing SME translations with pootle have been moved to [[Translations]]
have you imported them ?
 
  
A lot would come from sourceforge cvs > smeserver > smeserver-locale, but not all
+
== Please use common packages and default package names (where possible) ==
  
maybe we could trial pootle on contrib translations, say
+
A lot of the RPM's are in the DAG repository, no use of packaging them yourself or sharing them by copying them from the providing website and sharing them under a different name.
sourceforge cvs > smecontribs > smeserver-vacation
 
  
Getting pootle to intergrate to the way SME currently updates files may be difficult
+
:What packages exactly? All packages are build from the sources code with the command "python setup.py bdist_rpm" (under python 2.4), and the packge itself create the RPM. The only packages I have changed the name is smeserver-pylucene, because it has a lot of problem to build at the same time of build rpm. Instead, I have only package the installed files. But in the next release of "Translate Toolkin", support for PyLucene 2.X and I have this package correctly builded.
I suggest see what the shad and charlie think in your bug 3782
 
  
[[User:Snoble|Snoble]] 05:08, 21 January 2008 (MST)
+
Please point users to download python-kid (replacing you kid RPM), python-lxml (replacing your lxml RPM), python-sqllite (replacing pysqlite RPM), python_Levenshtein and python-elementtree (which you called elementtree) which is also available in the DAG repository and AFAIK is already installed on SME Server by default.
  
----
+
:These packages don't run under python2.4.
Hello Snoble
 
  
First, I have added a test project, and assign to me and add a few languages. Then, because I am the admin of the project, I can add files to the project to translate.
+
On top of that not everything is required to install Pootle, only requirements AFAIK could find on the Pootle site are listed [http://translate.sourceforge.net/wiki/pootle/installation#pre-requisite_software here] and because of the jToolkit requiring pythonabi-2.4 you have problems installing against pythonabi-2.3 which is installed on SME Server 7.3, perhaps you can find an older jToolkit, or recompile jToolkit from source and see if it will also work with pythonabi-2.3, this would drop the hack you have to do to make it work on SME Server 7.x.
  
The only files handle for pottle are PO or POT files. BUT it has a few of converters to make convertions between '''file.xxx''' to '''file.po''' and revert '''file.po''' to '''file.xxx'''. One of them converters is '''txt2po''' and '''po2txt''' (http://translate.sourceforge.net/wiki/toolkit/txt2po) .
+
:Yes, requirements say python 2.3 is supported, but preferable 2.4. This page is out of date. If you search through pootle mailing lists you will found a lot of problems with python 2.3. Of couser I was preferable python 2.3, and make my own packages and test with python 2.3 but without sucess. I have a lot of headache with python 2.3 to try (only try) to run pootle. So, python 2.4 is mandatory. Also has a superb efficiently above 2.3 with some new functions that pootle use.
 +
:See http://translate.svn.sourceforge.net/viewvc/translate/src/trunk/Pootle/README?r1=6098&r2=6144
  
Pootle handle directly po files under /usr/share/locale to translate.
+
:I am not finish this howto yet. Sorry for not warn about that. Now I put a template box with a warn.
 +
:Only when I have finished this howto, I will included in smecontribs.
  
I think to make a parser or analizer to convert formmagick panels to txt files, and then to .po, handled with pootle.
 
  
See http://translate.sourceforge.net/wiki/toolkit/formats about all converters. I think it is possible to make translations for formmagick panels within pootle.
+
- [[User:Cactus|Cactus]] 14:09, 19 February 2008 (MST)
 
 
I have setup a demo pootle. Access at:
 
 
 
http://www.unixlan.com.ar:8888
 
 
 
user: smeserver with same password. You can test, delete, modify, etc.
 
 
 
Thank for the comment snoble
 
 
 
--[[User:PicsOne|Normando Hall]] 11:46, 21 January 2008 (MST)
 
 
 
== I need your help ==
 
I want to colaborate with SME comunity with a translation system. With Pootle you can upload directly the PO files, those reside at /usr/share/locale. BUT formmagick panel can't, because these files are XML.
 
 
 
The idea is to convert from XML to PO before import in Pootle. To acomplish this, I tried some solutions.
 
 
 
The first is the converters come with Pootle without success (HTML2PO - TXT2PO).
 
 
 
The second is PO4A ( http://po4a.alioth.debian.org/index.php ), again, without success.
 
 
 
You can install enabling ATRPMS repo and install po4a.
 
 
 
To test, at your panels dir /etc/e-smith/locale/en-us/etc/e-smith/web/functions choose one file to translate (ex. backup), and run
 
 
 
po4a-gettextize -f xml -o tagsonly="<trans>" -m backup -p backup.po
 
 
 
Then you can upload the file backup.po in Pootle and translate. Then run the following command to return the PO file to normal XML again.
 
 
 
po4a-translate -k 0 -f xml -o tagsonly="<trans>" -m backup -p backup.po -l new_backup
 
 
 
 
 
The last is XML2PO ( http://linux.die.net/man/1/xml2po )
 
 
 
I have packaged for a better installation. You can download from
 
http://mirror.contribs.org/smeserver/contribs/nhall/sme7/contribs/pootle/rpm/gnome-doc-utils-0.12.0-1.noarch.rpm
 
 
 
Before try, you must edit a few files. The first is /usr/bin/xml2po
 
 
 
Change at line 115 from "charset=UTF-8" to "charset=iso-8859-1"
 
 
 
Then change /usr/share/xml2po/empty.py
 
 
 
Line 27 from "return []" to "return ['base']"
 
 
 
Line 31 from "return []" to "return ['trans', 'A']"
 
 
 
Line 35 from "return []" to "return ['trans']"
 
 
 
Now you can test xml2po.
 
 
 
To test, at your panels dir /etc/e-smith/locale/en-us/etc/e-smith/web/functions choose one file to translate (ex. backup), and run
 
 
 
xml2po -m empty -e -o backup.po backup
 
 
 
View the new bakup.po file in the new PO format. Excelent. Now you can translate PO with pootle, and return again to formmagick panel with this command:
 
 
 
xml2po -p backup.po backup > new_backup
 
 
 
As you can see, if you not translate backup.po, new_backup file is equal to original backup file, BUT with one diference. new_backup file has added at the header:
 
 
 
<?xml version="1.0" encoding="utf-8"?>
 
 
 
Remove this line.
 
 
 
== The problem ==
 
 
 
With xml2po I can convert from formmagick panels to PO, but can't handle tags as CDATA. Try and test the file initial.cig and you can see section CDATA not appear at the PO file.
 
 
 
I have downloaded FormMagick from sourceforge to try if has a tool to extract ALL the text between <trans> and </trans> tags, but I don't know how to do it.
 
 
 
Please, if you can modify xml2po or po4a or formmagick processor to extract these lines and convert to PO, we can make a good online translation system for SME server. If contribs.org can't hosted, I can offer my server to host this system online.
 
 
 
Sorry my bad english.
 
 
 
--[[User:PicsOne|Normando Hall]] 08:31, 24 January 2008 (MST)
 
 
 
----
 
Once we have everything worked out how to interact with pootle and the formmagick stuff then I'll get something up on contribs.org that everyone can use.  It would be really nice if we could automate the extraction/import of files that need to be translated into pootle but first things first.  <small>— [[User:Slords|Slords]] ([[User talk:Slords|talk]] • [[Special:Contributions/Slords|contribs]]).</small> 18:23, 24 January 2008 (MST)
 

Latest revision as of 17:44, 10 March 2008

Managing SME translations with pootle have been moved to Translations

Please use common packages and default package names (where possible)

A lot of the RPM's are in the DAG repository, no use of packaging them yourself or sharing them by copying them from the providing website and sharing them under a different name.

What packages exactly? All packages are build from the sources code with the command "python setup.py bdist_rpm" (under python 2.4), and the packge itself create the RPM. The only packages I have changed the name is smeserver-pylucene, because it has a lot of problem to build at the same time of build rpm. Instead, I have only package the installed files. But in the next release of "Translate Toolkin", support for PyLucene 2.X and I have this package correctly builded.

Please point users to download python-kid (replacing you kid RPM), python-lxml (replacing your lxml RPM), python-sqllite (replacing pysqlite RPM), python_Levenshtein and python-elementtree (which you called elementtree) which is also available in the DAG repository and AFAIK is already installed on SME Server by default.

These packages don't run under python2.4.

On top of that not everything is required to install Pootle, only requirements AFAIK could find on the Pootle site are listed here and because of the jToolkit requiring pythonabi-2.4 you have problems installing against pythonabi-2.3 which is installed on SME Server 7.3, perhaps you can find an older jToolkit, or recompile jToolkit from source and see if it will also work with pythonabi-2.3, this would drop the hack you have to do to make it work on SME Server 7.x.

Yes, requirements say python 2.3 is supported, but preferable 2.4. This page is out of date. If you search through pootle mailing lists you will found a lot of problems with python 2.3. Of couser I was preferable python 2.3, and make my own packages and test with python 2.3 but without sucess. I have a lot of headache with python 2.3 to try (only try) to run pootle. So, python 2.4 is mandatory. Also has a superb efficiently above 2.3 with some new functions that pootle use.
See http://translate.svn.sourceforge.net/viewvc/translate/src/trunk/Pootle/README?r1=6098&r2=6144
I am not finish this howto yet. Sorry for not warn about that. Now I put a template box with a warn.
Only when I have finished this howto, I will included in smecontribs.


- Cactus 14:09, 19 February 2008 (MST)