Difference between revisions of "Talk:Pootle"

From SME Server
Jump to navigationJump to search
 
(115 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Preliminary ==
+
Managing SME translations with pootle have been moved to [[Translations]]
The Goal is to integrate Pootle with CVS and an automatic converter between XML files and PO at contribs.org :)
 
  
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)
+
== Please use common packages and default package names (where possible) ==
  
Test pootle site: http://www.unixlan.com.ar:8888
+
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.  
  
When you comment on this page, please, add comments in the related section and delete dated text
+
: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.
  
== Formagick ==
+
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.  
Normando suggested a few tools, I'm using XML2PO, see the others in the history
 
http://wiki.contribs.org/index.php?title=Talk:Pootle&oldid=7649#I_need_your_help
 
  
===XML2PO===
+
:These packages don't run under python2.4.
( http://linux.die.net/man/1/xml2po )
 
  
I have packaged for a better installation. You can download from
+
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.
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.  
+
: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
  
The first is /usr/bin/xml2po
+
:I am not finish this howto yet. Sorry for not warn about that. Now I put a template box with a warn.
:Change at line 115 from "charset=UTF-8" to "charset=iso-8859-1"
+
:Only when I have finished this howto, I will included in smecontribs.
  
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']"
 
  
===Create .po===
+
- [[User:Cactus|Cactus]] 14:09, 19 February 2008 (MST)
Now you can test xml2po.
 
 
 
To test the lexicons
 
xml2po -m empty -e -o backup.po backup
 
 
 
View the new bakup.po file in the new PO format. Excellent. 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"?>
 
 
 
Do we have to remove this line. ?
 
 
 
===bugs===
 
xml2po ignores tags as CDATA, CDATA does not appear at the PO file.
 
 
 
The workaround is to find and replace the problem code, add more to the list if you find them
 
 
 
Using a sample panel yum2
 
perl -pi -e 's/<!\[CDATA\[/STARTCDATA/g' yum2
 
perl -pi -e 's/\]\]>/ENDCDATA/g' yum2
 
perl -pi -e 's/\&/AMP/g' yum2
 
 
 
Or delete CDATA if the tag doesn't really require it (for contribs)
 
 
 
===problems on pootle===
 
Newlines aren't clear
 
 
 
the pootle edit box is tiny !!
 
 
 
== revision control using CVS/SVN ==
 
 
 
Today I had a quick look at the pootle pages and found a wiki as well, which has some valuable information like for instance revision control using CVS/SVN: http://translate.sourceforge.net/wiki/pootle/version_control - [[User:Cactus|Cactus]] 03:26, 25 January 2008 (MST)
 
 
 
===progress===
 
we'll look at this later, perhaps starting with contribs
 
 
 
 
 
== Usage ==
 
 
 
===untranslated words===
 
click "Show Editing Functions" and finally at "Quick Translate" for each file or whole language.
 
 
 
Also you can see the suggestions clicking at "Review Suggestions".
 
 
 
===checks===
 
click "show checks" to see a list of syntax errors
 
 
 
acronyms  6 strings (2%) failed
 
brackets 17 strings (6%) failed
 
doublequoting 4 strings (1%) failed
 
doublespacing 1 string (0%) failed
 
endpunc 11 strings (3%) failed
 
endwhitespace 4 strings (1%) failed
 
numbers 2 strings (0%) failed
 
puncspacing 2 strings (0%) failed
 
sentencecount 2 strings (0%) failed
 
simplecaps 16 strings (5%) failed
 
startcaps 6 strings (2%) failed
 
unchanged 7 strings (2%) failed
 
untranslated 53 strings (19%) failed
 
 
 
click on one of the links offered and fix them
 
 
 
See http://translate.sourceforge.net/wiki/guide/pofilter_examples and http://translate.sourceforge.net/wiki/guide/translation/commonerrors
 
 
 
== Remarks ==
 
Now we have entered the data, it makes it clearer where there are missing translations, good work !
 
 
 
===cleanup===
 
 
 
===bugs===
 
 
 
* update .po files
 
http://bugs.contribs.org/show_bug.cgi?id=3833
 
: Templates have been implemented with up to date strings,
 
: now it's over to users to translate them
 
 
 
* .po file names are inconsistent, SV & FR add .tmpl.po
 
http://bugs.contribs.org/show_bug.cgi?id=3834
 
 
 
: .tmpl.po is correct, other languages have been updated
 
 
 
===questions===
 
 
 
*Another item is charset utf8 or iso-8859-1
 
 
 
:charset=iso-8859-1 is mostly being used in the files I've looked at why would we change it ?  SN
 
 
 
===Merging new strings===
 
We should work out how 'update from template' works.
 
 
 
:Please, see this bug http://bugs.contribs.org/show_bug.cgi?id=3833
 
 
 
:: Templates are now up to date, Future changes are added to the templates,
 
:: then other languages are updated with the update link
 
 
 
Merging may leave orphaned strings,
 
 
 
:yes, but they are moved to the bottom of the file and commented out
 
:after review, remove at the shell or d/l the po file, edit and upload again
 

Latest revision as of 18: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)