Difference between revisions of "Talk:Pootle"

From SME Server
Jump to navigationJump to search
m (refactor)
Line 80: Line 80:
  
 
After you have a clean english .po you can use that as a template and copy and paste the translation in, in a local text file or on pootle. I don't see an easier way
 
After you have a clean english .po you can use that as a template and copy and paste the translation in, in a local text file or on pootle. I don't see an easier way
 +
 +
==Console==
 +
 +
update all .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
  
 
== revision control using CVS/SVN ==
 
== revision control using CVS/SVN ==
Line 88: Line 99:
 
we'll look at this later, perhaps starting with contribs
 
we'll look at this later, perhaps starting with contribs
  
 
+
== Pootle Usage ==
== Usage ==
 
  
 
===untranslated words===
 
===untranslated words===
Line 116: Line 126:
  
 
See http://translate.sourceforge.net/wiki/guide/pofilter_examples and http://translate.sourceforge.net/wiki/guide/translation/commonerrors
 
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 !
 
 
===duplicate translation work===
 
Because some phrases are in multiple panels
 
 
Lets create a list and add them to 'general' All panels check general if the tag isn't found in its lexicon
 
 
:Yes
 
:No
 
:Save
 
:Success
 
 
===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
 
  
 
===Merging new strings===
 
===Merging new strings===
Line 154: Line 139:
 
:yes, but they are moved to the bottom of the file and commented out
 
: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
 
:after review, remove at the shell or d/l the po file, edit and upload again
 +
 +
== Remarks ==
 +
 +
===duplicate translation work===
 +
Because some phrases are in multiple panels
 +
 +
Lets create a list and add them to 'general' All panels check general if the tag isn't found in its lexicon
 +
 +
:Yes
 +
:No
 +
:Save
 +
:Success

Revision as of 14:17, 2 February 2008

Preliminary

The Goal is to integrate Pootle with CVS and an automatic converter between XML files and PO at contribs.org :) Bug http://bugs.contribs.org/show_bug.cgi?id=3782

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. Slords (talkcontribs). 18:23, 24 January 2008 (MST)

Test pootle site: http://www.unixlan.com.ar:8888

Formagick

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

( 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']"

Create .po and export xml

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 > backup.new

As you can see, if you not translate backup.po, new_backup file is equal to original backup file, BUT with one difference, backup.new file has added a line at the header: Do we have to remove this line. ?

<?xml version="1.0" encoding="utf-8"?>

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
don't use double quotes
unless & is in a URL write and
delete CDATA if the tag doesn't really require it (for contribs)

subversion

This is a test case, I'd like to see how far an author will bend in making allowances in using pootle

To create a .po you make a clean copy from the english translation, I removed a lot of \n_____ by changing these, you only have to to it once and we get a cleaner .po file for translators

<trans>
       Successfully deleted repository.
</trans> to

<trans>Successfully deleted repository.</trans>

I've removed half the CDATA tags and just spaced the lines out

is the tag really needed in the lexicon ??

There are a lot of double quotes, xml2po escape them correctly, but it isn't clear how the translator is to do this, and they shouldn't have, single quotes or nothing should do.

something went wrong with the encoding -I created a po, copied to fr, added by copy and paste some of the translations, and uploaded -at pootle the text changed from

modify a repository         /original
modifier un dépôt           /local editor (the characters in dépôt cause the problem)
modifier un dépôt   /pootle

until these are resolved i haven't check when the CDATA text should be changed, maybe it should be changed back directly after xml2po in both directions

After you have a clean english .po you can use that as a template and copy and paste the translation in, in a local text file or on pootle. I don't see an easier way

Console

update all .po files

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

.tmpl.po is correct, other languages have been updated

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 - Cactus 03:26, 25 January 2008 (MST)

progress

we'll look at this later, perhaps starting with contribs

Pootle 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

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

Remarks

duplicate translation work

Because some phrases are in multiple panels

Lets create a list and add them to 'general' All panels check general if the tag isn't found in its lexicon

Yes
No
Save
Success